XTRF Home Portal API
XTRF Home Portal APIv2.0
XTRF Home Portal API enables you to perform operations on Projects, Quotes, Customers, Vendors etc. as a XTRF Home Portal user. The documentation is generated from OpenAPI specification 3.0 available here The API client/consumer code may be easily generated in 60+ programming languages using an open source code generator available at the time of writing this documentation at https://editor.swagger.io/ Thank you for using XTRF Application Programming interface (XTRF API). By using the API you agree to the terms below. If you disagree with any of these terms, XTRF does not grant you a license…
- Endpoints
- 284 (117 GET, 86 PUT, 56 POST, 25 DELETE)
- Base URL
https://presentation.s.xtrf.eu/home-api- Authentication
- API key
- Spec format
- OpenAPI 3.0.1
- API version
- 2.0
- Source
- presentation.s.xtrf.eu
- Provider
- xtrf.eu
- License
- Apache 2.0
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://presentation.s.xtrf.eu/home-api) and your API key credentials, then send requests.
POST
Creates view for given class.
{{baseUrl}}/browser/views/for/:className
QUERY PARAMS
className
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/for/:className");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/browser/views/for/:className")
require "http/client"
url = "{{baseUrl}}/browser/views/for/:className"
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}}/browser/views/for/:className"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/for/:className");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/for/:className"
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/browser/views/for/:className HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/browser/views/for/:className")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/for/:className"))
.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}}/browser/views/for/:className")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/browser/views/for/:className")
.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}}/browser/views/for/:className');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/browser/views/for/:className'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/for/:className';
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}}/browser/views/for/:className',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/for/:className")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/for/:className',
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}}/browser/views/for/:className'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/browser/views/for/:className');
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}}/browser/views/for/:className'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/for/:className';
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}}/browser/views/for/:className"]
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}}/browser/views/for/:className" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/for/:className",
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}}/browser/views/for/:className');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/for/:className');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/for/:className');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/for/:className' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/for/:className' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/browser/views/for/:className")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/for/:className"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/for/:className"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/for/:className")
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/browser/views/for/:className') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/for/:className";
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}}/browser/views/for/:className
http POST {{baseUrl}}/browser/views/for/:className
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/browser/views/for/:className
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/for/:className")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/create.json#responseBody
DELETE
Deletes a single column from view.
{{baseUrl}}/browser/views/:viewId/columns/:columnName
QUERY PARAMS
viewId
columnName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/columns/:columnName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/browser/views/:viewId/columns/:columnName")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName"
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}}/browser/views/:viewId/columns/:columnName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/columns/:columnName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/columns/:columnName"
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/browser/views/:viewId/columns/:columnName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/browser/views/:viewId/columns/:columnName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/columns/:columnName"))
.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}}/browser/views/:viewId/columns/:columnName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/browser/views/:viewId/columns/:columnName")
.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}}/browser/views/:viewId/columns/:columnName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName';
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}}/browser/views/:viewId/columns/:columnName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns/:columnName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/columns/:columnName',
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}}/browser/views/:viewId/columns/:columnName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/browser/views/:viewId/columns/:columnName');
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}}/browser/views/:viewId/columns/:columnName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName';
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}}/browser/views/:viewId/columns/:columnName"]
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}}/browser/views/:viewId/columns/:columnName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/columns/:columnName",
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}}/browser/views/:viewId/columns/:columnName');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/columns/:columnName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/columns/:columnName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/browser/views/:viewId/columns/:columnName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/columns/:columnName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/columns/:columnName")
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/browser/views/:viewId/columns/:columnName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName";
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}}/browser/views/:viewId/columns/:columnName
http DELETE {{baseUrl}}/browser/views/:viewId/columns/:columnName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/browser/views/:viewId/columns/:columnName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/columns/:columnName")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/deleteColumn.json#responseBody
DELETE
Removes a view.
{{baseUrl}}/browser/views/:viewId
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/browser/views/:viewId")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId"
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}}/browser/views/:viewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId"
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/browser/views/:viewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/browser/views/:viewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId"))
.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}}/browser/views/:viewId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/browser/views/:viewId")
.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}}/browser/views/:viewId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId';
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}}/browser/views/:viewId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId',
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}}/browser/views/:viewId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/browser/views/:viewId');
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}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId';
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}}/browser/views/:viewId"]
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}}/browser/views/:viewId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId",
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}}/browser/views/:viewId');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/browser/views/:viewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId")
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/browser/views/:viewId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId";
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}}/browser/views/:viewId
http DELETE {{baseUrl}}/browser/views/:viewId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/browser/views/:viewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns all view's information.
{{baseUrl}}/browser/views/:viewId
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId"
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}}/browser/views/:viewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId"
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/browser/views/:viewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId"))
.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}}/browser/views/:viewId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId")
.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}}/browser/views/:viewId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId';
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}}/browser/views/:viewId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId',
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}}/browser/views/:viewId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId');
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}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId';
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}}/browser/views/:viewId"]
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}}/browser/views/:viewId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId",
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}}/browser/views/:viewId');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId")
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/browser/views/:viewId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId";
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}}/browser/views/:viewId
http GET {{baseUrl}}/browser/views/:viewId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/get.json#responseBody
GET
Returns column's specific settings.
{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings
QUERY PARAMS
viewId
columnName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
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}}/browser/views/:viewId/columns/:columnName/settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
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/browser/views/:viewId/columns/:columnName/settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"))
.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}}/browser/views/:viewId/columns/:columnName/settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.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}}/browser/views/:viewId/columns/:columnName/settings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings';
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}}/browser/views/:viewId/columns/:columnName/settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/columns/:columnName/settings',
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}}/browser/views/:viewId/columns/:columnName/settings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
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}}/browser/views/:viewId/columns/:columnName/settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings';
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}}/browser/views/:viewId/columns/:columnName/settings"]
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}}/browser/views/:viewId/columns/:columnName/settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings",
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}}/browser/views/:viewId/columns/:columnName/settings');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/columns/:columnName/settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
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/browser/views/:viewId/columns/:columnName/settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings";
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}}/browser/views/:viewId/columns/:columnName/settings
http GET {{baseUrl}}/browser/views/:viewId/columns/:columnName/settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/columns/:columnName/settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getColumnSettings.json#responseBody
GET
Returns columns defined in view.
{{baseUrl}}/browser/views/:viewId/columns
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/columns");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/columns")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/columns"
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}}/browser/views/:viewId/columns"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/columns");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/columns"
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/browser/views/:viewId/columns HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/columns")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/columns"))
.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}}/browser/views/:viewId/columns")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/columns")
.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}}/browser/views/:viewId/columns');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/:viewId/columns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/columns';
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}}/browser/views/:viewId/columns',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/columns',
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}}/browser/views/:viewId/columns'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/columns');
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}}/browser/views/:viewId/columns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/columns';
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}}/browser/views/:viewId/columns"]
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}}/browser/views/:viewId/columns" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/columns",
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}}/browser/views/:viewId/columns');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/columns');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/columns');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/columns' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/columns' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/columns")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/columns"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/columns"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/columns")
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/browser/views/:viewId/columns') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/columns";
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}}/browser/views/:viewId/columns
http GET {{baseUrl}}/browser/views/:viewId/columns
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/columns
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/columns")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getColumns.json#responseBody
GET
Returns current view's detailed information, suitable for browser.
{{baseUrl}}/browser/views/details/for/:className
QUERY PARAMS
className
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/details/for/:className");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/details/for/:className")
require "http/client"
url = "{{baseUrl}}/browser/views/details/for/:className"
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}}/browser/views/details/for/:className"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/details/for/:className");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/details/for/:className"
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/browser/views/details/for/:className HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/details/for/:className")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/details/for/:className"))
.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}}/browser/views/details/for/:className")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/details/for/:className")
.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}}/browser/views/details/for/:className');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/details/for/:className'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/details/for/:className';
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}}/browser/views/details/for/:className',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/details/for/:className")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/details/for/:className',
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}}/browser/views/details/for/:className'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/details/for/:className');
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}}/browser/views/details/for/:className'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/details/for/:className';
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}}/browser/views/details/for/:className"]
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}}/browser/views/details/for/:className" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/details/for/:className",
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}}/browser/views/details/for/:className');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/details/for/:className');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/details/for/:className');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/details/for/:className' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/details/for/:className' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/details/for/:className")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/details/for/:className"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/details/for/:className"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/details/for/:className")
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/browser/views/details/for/:className') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/details/for/:className";
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}}/browser/views/details/for/:className
http GET {{baseUrl}}/browser/views/details/for/:className
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/details/for/:className
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/details/for/:className")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getCurrentDetails.json#responseBody
GET
Returns view's detailed information, suitable for browser.
{{baseUrl}}/browser/views/details/for/:className/:viewId
QUERY PARAMS
className
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/details/for/:className/:viewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/details/for/:className/:viewId")
require "http/client"
url = "{{baseUrl}}/browser/views/details/for/:className/:viewId"
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}}/browser/views/details/for/:className/:viewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/details/for/:className/:viewId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/details/for/:className/:viewId"
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/browser/views/details/for/:className/:viewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/details/for/:className/:viewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/details/for/:className/:viewId"))
.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}}/browser/views/details/for/:className/:viewId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/details/for/:className/:viewId")
.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}}/browser/views/details/for/:className/:viewId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/details/for/:className/:viewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/details/for/:className/:viewId';
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}}/browser/views/details/for/:className/:viewId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/details/for/:className/:viewId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/details/for/:className/:viewId',
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}}/browser/views/details/for/:className/:viewId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/details/for/:className/:viewId');
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}}/browser/views/details/for/:className/:viewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/details/for/:className/:viewId';
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}}/browser/views/details/for/:className/:viewId"]
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}}/browser/views/details/for/:className/:viewId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/details/for/:className/:viewId",
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}}/browser/views/details/for/:className/:viewId');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/details/for/:className/:viewId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/details/for/:className/:viewId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/details/for/:className/:viewId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/details/for/:className/:viewId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/details/for/:className/:viewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/details/for/:className/:viewId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/details/for/:className/:viewId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/details/for/:className/:viewId")
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/browser/views/details/for/:className/:viewId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/details/for/:className/:viewId";
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}}/browser/views/details/for/:className/:viewId
http GET {{baseUrl}}/browser/views/details/for/:className/:viewId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/details/for/:className/:viewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/details/for/:className/:viewId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getDetails.json#responseBody
GET
Returns view's filter.
{{baseUrl}}/browser/views/:viewId/filter
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/filter");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/filter")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/filter"
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}}/browser/views/:viewId/filter"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/filter");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/filter"
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/browser/views/:viewId/filter HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/filter")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/filter"))
.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}}/browser/views/:viewId/filter")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/filter")
.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}}/browser/views/:viewId/filter');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser/views/:viewId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/filter';
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}}/browser/views/:viewId/filter',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/filter")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/filter',
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}}/browser/views/:viewId/filter'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/filter');
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}}/browser/views/:viewId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/filter';
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}}/browser/views/:viewId/filter"]
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}}/browser/views/:viewId/filter" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/filter",
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}}/browser/views/:viewId/filter');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/filter');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/filter');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/filter' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/filter' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/filter")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/filter"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/filter"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/filter")
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/browser/views/:viewId/filter') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/filter";
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}}/browser/views/:viewId/filter
http GET {{baseUrl}}/browser/views/:viewId/filter
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/filter
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/filter")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/filter/getTextProperty.json#responseBody
GET
Returns view's local settings (for current user).
{{baseUrl}}/browser/views/:viewId/settings/local
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/settings/local");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/settings/local")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/settings/local"
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}}/browser/views/:viewId/settings/local"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/settings/local");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/settings/local"
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/browser/views/:viewId/settings/local HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/settings/local")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/settings/local"))
.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}}/browser/views/:viewId/settings/local")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/settings/local")
.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}}/browser/views/:viewId/settings/local');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/:viewId/settings/local'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/settings/local';
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}}/browser/views/:viewId/settings/local',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings/local")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/settings/local',
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}}/browser/views/:viewId/settings/local'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/settings/local');
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}}/browser/views/:viewId/settings/local'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/settings/local';
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}}/browser/views/:viewId/settings/local"]
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}}/browser/views/:viewId/settings/local" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/settings/local",
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}}/browser/views/:viewId/settings/local');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/settings/local');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/settings/local');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/settings/local' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/settings/local' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/settings/local")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/settings/local"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/settings/local"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/settings/local")
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/browser/views/:viewId/settings/local') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/settings/local";
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}}/browser/views/:viewId/settings/local
http GET {{baseUrl}}/browser/views/:viewId/settings/local
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/settings/local
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/settings/local")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getLocalSettings.json#responseBody
GET
Returns view's order settings.
{{baseUrl}}/browser/views/:viewId/order
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/order");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/order")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/order"
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}}/browser/views/:viewId/order"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/order");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/order"
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/browser/views/:viewId/order HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/order")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/order"))
.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}}/browser/views/:viewId/order")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/order")
.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}}/browser/views/:viewId/order');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser/views/:viewId/order'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/order';
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}}/browser/views/:viewId/order',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/order")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/order',
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}}/browser/views/:viewId/order'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/order');
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}}/browser/views/:viewId/order'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/order';
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}}/browser/views/:viewId/order"]
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}}/browser/views/:viewId/order" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/order",
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}}/browser/views/:viewId/order');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/order');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/order');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/order' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/order' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/order")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/order"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/order"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/order")
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/browser/views/:viewId/order') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/order";
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}}/browser/views/:viewId/order
http GET {{baseUrl}}/browser/views/:viewId/order
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/order
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/order")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getOrder.json#responseBody
GET
Returns view's permissions.
{{baseUrl}}/browser/views/:viewId/permissions
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/permissions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/permissions")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/permissions"
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}}/browser/views/:viewId/permissions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/permissions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/permissions"
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/browser/views/:viewId/permissions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/permissions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/permissions"))
.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}}/browser/views/:viewId/permissions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/permissions")
.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}}/browser/views/:viewId/permissions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/:viewId/permissions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/permissions';
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}}/browser/views/:viewId/permissions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/permissions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/permissions',
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}}/browser/views/:viewId/permissions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/permissions');
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}}/browser/views/:viewId/permissions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/permissions';
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}}/browser/views/:viewId/permissions"]
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}}/browser/views/:viewId/permissions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/permissions",
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}}/browser/views/:viewId/permissions');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/permissions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/permissions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/permissions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/permissions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/permissions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/permissions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/permissions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/permissions")
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/browser/views/:viewId/permissions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/permissions";
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}}/browser/views/:viewId/permissions
http GET {{baseUrl}}/browser/views/:viewId/permissions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/permissions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/permissions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getPermissions.json#responseBody
GET
Returns view's settings.
{{baseUrl}}/browser/views/:viewId/settings
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/:viewId/settings")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/settings"
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}}/browser/views/:viewId/settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/settings"
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/browser/views/:viewId/settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/:viewId/settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/settings"))
.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}}/browser/views/:viewId/settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/:viewId/settings")
.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}}/browser/views/:viewId/settings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/browser/views/:viewId/settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/settings';
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}}/browser/views/:viewId/settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/settings',
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}}/browser/views/:viewId/settings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/:viewId/settings');
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}}/browser/views/:viewId/settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/settings';
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}}/browser/views/:viewId/settings"]
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}}/browser/views/:viewId/settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/settings",
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}}/browser/views/:viewId/settings');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/:viewId/settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/settings")
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/browser/views/:viewId/settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/settings";
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}}/browser/views/:viewId/settings
http GET {{baseUrl}}/browser/views/:viewId/settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/:viewId/settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/settings")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getSettings.json#responseBody
GET
Returns views' brief.
{{baseUrl}}/browser/views/for/:className
QUERY PARAMS
className
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/for/:className");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/views/for/:className")
require "http/client"
url = "{{baseUrl}}/browser/views/for/:className"
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}}/browser/views/for/:className"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/for/:className");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/for/:className"
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/browser/views/for/:className HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/views/for/:className")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/for/:className"))
.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}}/browser/views/for/:className")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/views/for/:className")
.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}}/browser/views/for/:className');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser/views/for/:className'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/for/:className';
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}}/browser/views/for/:className',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/for/:className")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/for/:className',
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}}/browser/views/for/:className'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/views/for/:className');
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}}/browser/views/for/:className'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/for/:className';
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}}/browser/views/for/:className"]
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}}/browser/views/for/:className" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/for/:className",
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}}/browser/views/for/:className');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/for/:className');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/for/:className');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/for/:className' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/for/:className' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/views/for/:className")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/for/:className"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/for/:className"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/for/:className")
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/browser/views/for/:className') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/for/:className";
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}}/browser/views/for/:className
http GET {{baseUrl}}/browser/views/for/:className
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/views/for/:className
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/for/:className")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/getViewsBrief.json#responseBody
GET
Searches for data (ie. customer, task, etc) and returns it in a CSV form.
{{baseUrl}}/browser/csv
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/csv");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser/csv")
require "http/client"
url = "{{baseUrl}}/browser/csv"
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}}/browser/csv"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/csv");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/csv"
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/browser/csv HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser/csv")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/csv"))
.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}}/browser/csv")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser/csv")
.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}}/browser/csv');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser/csv'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/csv';
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}}/browser/csv',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/csv")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/csv',
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}}/browser/csv'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser/csv');
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}}/browser/csv'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/csv';
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}}/browser/csv"]
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}}/browser/csv" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/csv",
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}}/browser/csv');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/csv');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/csv');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/csv' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/csv' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser/csv")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/csv"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/csv"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/csv")
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/browser/csv') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/csv";
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}}/browser/csv
http GET {{baseUrl}}/browser/csv
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser/csv
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/csv")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/exportToCSV.json#responseBody
GET
Searches for data (ie. customer, task, etc) and returns it in a tabular form.
{{baseUrl}}/browser
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/browser")
require "http/client"
url = "{{baseUrl}}/browser"
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}}/browser"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser"
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/browser HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/browser")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser"))
.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}}/browser")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/browser")
.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}}/browser');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/browser'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser';
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}}/browser',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser',
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}}/browser'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/browser');
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}}/browser'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser';
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}}/browser"]
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}}/browser" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser",
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}}/browser');
echo $response->getBody();
setUrl('{{baseUrl}}/browser');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/browser")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser")
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/browser') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser";
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}}/browser
http GET {{baseUrl}}/browser
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/browser
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/browseProjects.json#responseBody
POST
Selects given view as current and returns its detailed information, suitable for browser.
{{baseUrl}}/browser/views/details/for/:className/:viewId
QUERY PARAMS
className
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/details/for/:className/:viewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/browser/views/details/for/:className/:viewId")
require "http/client"
url = "{{baseUrl}}/browser/views/details/for/:className/:viewId"
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}}/browser/views/details/for/:className/:viewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/details/for/:className/:viewId");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/details/for/:className/:viewId"
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/browser/views/details/for/:className/:viewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/browser/views/details/for/:className/:viewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/details/for/:className/:viewId"))
.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}}/browser/views/details/for/:className/:viewId")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/browser/views/details/for/:className/:viewId")
.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}}/browser/views/details/for/:className/:viewId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/browser/views/details/for/:className/:viewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/details/for/:className/:viewId';
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}}/browser/views/details/for/:className/:viewId',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/details/for/:className/:viewId")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/details/for/:className/:viewId',
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}}/browser/views/details/for/:className/:viewId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/browser/views/details/for/:className/:viewId');
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}}/browser/views/details/for/:className/:viewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/details/for/:className/:viewId';
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}}/browser/views/details/for/:className/:viewId"]
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}}/browser/views/details/for/:className/:viewId" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/details/for/:className/:viewId",
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}}/browser/views/details/for/:className/:viewId');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/details/for/:className/:viewId');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/details/for/:className/:viewId');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/details/for/:className/:viewId' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/details/for/:className/:viewId' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/browser/views/details/for/:className/:viewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/details/for/:className/:viewId"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/details/for/:className/:viewId"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/details/for/:className/:viewId")
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/browser/views/details/for/:className/:viewId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/details/for/:className/:viewId";
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}}/browser/views/details/for/:className/:viewId
http POST {{baseUrl}}/browser/views/details/for/:className/:viewId
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/browser/views/details/for/:className/:viewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/details/for/:className/:viewId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/selectViewAndGetItsDetails.json#responseBody
PUT
Updates all view's information.
{{baseUrl}}/browser/views/:viewId
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/browser/views/:viewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId';
const options = {method: 'PUT'};
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}}/browser/views/:viewId',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId',
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: 'PUT', url: '{{baseUrl}}/browser/views/:viewId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId');
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}}/browser/views/:viewId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId';
const options = {method: 'PUT'};
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}}/browser/views/:viewId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/browser/views/:viewId" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/browser/views/:viewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/browser/views/:viewId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId
http PUT {{baseUrl}}/browser/views/:viewId
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/browser/views/:viewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/update.json#responseBody
PUT
Updates column's specific settings.
{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings
QUERY PARAMS
viewId
columnName
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
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}}/browser/views/:viewId/columns/:columnName/settings"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
payload := strings.NewReader("{}")
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/browser/views/:viewId/columns/:columnName/settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")
.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/browser/views/:viewId/columns/:columnName/settings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"]
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}}/browser/views/:viewId/columns/:columnName/settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings",
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([
]),
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}}/browser/views/:viewId/columns/:columnName/settings', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings');
$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}}/browser/views/:viewId/columns/:columnName/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/browser/views/:viewId/columns/:columnName/settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
payload = {}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings"
payload <- "{}"
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}}/browser/views/:viewId/columns/:columnName/settings")
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 = "{}"
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/browser/views/:viewId/columns/:columnName/settings') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId/columns/:columnName/settings \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http PUT {{baseUrl}}/browser/views/:viewId/columns/:columnName/settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/browser/views/:viewId/columns/:columnName/settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/columns/:columnName/settings")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateColumnSettings.json#responseBody
PUT
Updates columns in view.
{{baseUrl}}/browser/views/:viewId/columns
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/columns");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/columns")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/columns"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId/columns"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/columns");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/columns"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/browser/views/:viewId/columns HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/columns")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/columns"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/columns")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/columns');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/columns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/columns';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/columns',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/columns")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/columns',
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: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/columns'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/columns');
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}}/browser/views/:viewId/columns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/columns';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/columns"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/browser/views/:viewId/columns" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/columns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/columns');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/columns');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/columns');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/columns' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/columns' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/browser/views/:viewId/columns")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/columns"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/columns"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/columns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/browser/views/:viewId/columns') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/columns";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId/columns
http PUT {{baseUrl}}/browser/views/:viewId/columns
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/browser/views/:viewId/columns
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/columns")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateColumns.json#responseBody
PUT
Updates view's filter property.
{{baseUrl}}/browser/views/:viewId/filter/:filterProperty
QUERY PARAMS
viewId
filterProperty
BODY json
{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty");
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 \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty" {:content-type :json
:form-params {:name ""
:settings {}
:settingsPresent false
:type ""}})
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\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}}/browser/views/:viewId/filter/:filterProperty"),
Content = new StringContent("{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/filter/:filterProperty");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"
payload := strings.NewReader("{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\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/browser/views/:viewId/filter/:filterProperty HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/filter/:filterProperty")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/filter/:filterProperty")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
settings: {},
settingsPresent: false,
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty',
headers: {'content-type': 'application/json'},
data: {name: '', settings: {}, settingsPresent: false, type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","settings":{},"settingsPresent":false,"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "settings": {},\n "settingsPresent": false,\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/filter/:filterProperty")
.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/browser/views/:viewId/filter/:filterProperty',
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({name: '', settings: {}, settingsPresent: false, type: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty',
headers: {'content-type': 'application/json'},
body: {name: '', settings: {}, settingsPresent: false, type: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
settings: {},
settingsPresent: false,
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty',
headers: {'content-type': 'application/json'},
data: {name: '', settings: {}, settingsPresent: false, type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","settings":{},"settingsPresent":false,"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"settings": @{ },
@"settingsPresent": @NO,
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"]
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}}/browser/views/:viewId/filter/:filterProperty" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/filter/:filterProperty",
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([
'name' => '',
'settings' => [
],
'settingsPresent' => null,
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty', [
'body' => '{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/filter/:filterProperty');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'settings' => [
],
'settingsPresent' => null,
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'settings' => [
],
'settingsPresent' => null,
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/browser/views/:viewId/filter/:filterProperty');
$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}}/browser/views/:viewId/filter/:filterProperty' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/filter/:filterProperty' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/browser/views/:viewId/filter/:filterProperty", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"
payload = {
"name": "",
"settings": {},
"settingsPresent": False,
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty"
payload <- "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\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}}/browser/views/:viewId/filter/:filterProperty")
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 \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/browser/views/:viewId/filter/:filterProperty') do |req|
req.body = "{\n \"name\": \"\",\n \"settings\": {},\n \"settingsPresent\": false,\n \"type\": \"\"\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}}/browser/views/:viewId/filter/:filterProperty";
let payload = json!({
"name": "",
"settings": json!({}),
"settingsPresent": false,
"type": ""
});
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}}/browser/views/:viewId/filter/:filterProperty \
--header 'content-type: application/json' \
--data '{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}'
echo '{
"name": "",
"settings": {},
"settingsPresent": false,
"type": ""
}' | \
http PUT {{baseUrl}}/browser/views/:viewId/filter/:filterProperty \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "settings": {},\n "settingsPresent": false,\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/browser/views/:viewId/filter/:filterProperty
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"settings": [],
"settingsPresent": false,
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/filter/:filterProperty")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateFilterProperty.json#responseBody
PUT
Updates view's filter.
{{baseUrl}}/browser/views/:viewId/filter
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/filter");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/filter")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/filter"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId/filter"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/filter");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/filter"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/browser/views/:viewId/filter HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/filter")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/filter"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/filter")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/filter")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/filter');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/browser/views/:viewId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/filter';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/filter',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/filter")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/filter',
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: 'PUT', url: '{{baseUrl}}/browser/views/:viewId/filter'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/filter');
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}}/browser/views/:viewId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/filter';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/filter"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/browser/views/:viewId/filter" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/filter');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/filter');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/filter');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/filter' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/filter' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/browser/views/:viewId/filter")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/filter"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/filter"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/browser/views/:viewId/filter') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/filter";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId/filter
http PUT {{baseUrl}}/browser/views/:viewId/filter
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/browser/views/:viewId/filter
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/filter")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateFilter.json#responseBody
PUT
Updates view's local settings (for current user).
{{baseUrl}}/browser/views/:viewId/settings/local
QUERY PARAMS
viewId
BODY json
{
"maxLinesInRow": 0,
"maxRows": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/settings/local");
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 \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/settings/local" {:content-type :json
:form-params {:maxLinesInRow 0
:maxRows 0}})
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/settings/local"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId/settings/local"),
Content = new StringContent("{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/settings/local");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/settings/local"
payload := strings.NewReader("{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/browser/views/:viewId/settings/local HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"maxLinesInRow": 0,
"maxRows": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/settings/local")
.setHeader("content-type", "application/json")
.setBody("{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/settings/local"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings/local")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/settings/local")
.header("content-type", "application/json")
.body("{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}")
.asString();
const data = JSON.stringify({
maxLinesInRow: 0,
maxRows: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/settings/local');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings/local',
headers: {'content-type': 'application/json'},
data: {maxLinesInRow: 0, maxRows: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/settings/local';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"maxLinesInRow":0,"maxRows":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/browser/views/:viewId/settings/local',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "maxLinesInRow": 0,\n "maxRows": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings/local")
.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/browser/views/:viewId/settings/local',
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({maxLinesInRow: 0, maxRows: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings/local',
headers: {'content-type': 'application/json'},
body: {maxLinesInRow: 0, maxRows: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/settings/local');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
maxLinesInRow: 0,
maxRows: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings/local',
headers: {'content-type': 'application/json'},
data: {maxLinesInRow: 0, maxRows: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/settings/local';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"maxLinesInRow":0,"maxRows":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"maxLinesInRow": @0,
@"maxRows": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/browser/views/:viewId/settings/local"]
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}}/browser/views/:viewId/settings/local" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/settings/local",
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([
'maxLinesInRow' => 0,
'maxRows' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/settings/local', [
'body' => '{
"maxLinesInRow": 0,
"maxRows": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/settings/local');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'maxLinesInRow' => 0,
'maxRows' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'maxLinesInRow' => 0,
'maxRows' => 0
]));
$request->setRequestUrl('{{baseUrl}}/browser/views/:viewId/settings/local');
$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}}/browser/views/:viewId/settings/local' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"maxLinesInRow": 0,
"maxRows": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/settings/local' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"maxLinesInRow": 0,
"maxRows": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/browser/views/:viewId/settings/local", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/settings/local"
payload = {
"maxLinesInRow": 0,
"maxRows": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/settings/local"
payload <- "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/settings/local")
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 \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/browser/views/:viewId/settings/local') do |req|
req.body = "{\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/settings/local";
let payload = json!({
"maxLinesInRow": 0,
"maxRows": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId/settings/local \
--header 'content-type: application/json' \
--data '{
"maxLinesInRow": 0,
"maxRows": 0
}'
echo '{
"maxLinesInRow": 0,
"maxRows": 0
}' | \
http PUT {{baseUrl}}/browser/views/:viewId/settings/local \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "maxLinesInRow": 0,\n "maxRows": 0\n}' \
--output-document \
- {{baseUrl}}/browser/views/:viewId/settings/local
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"maxLinesInRow": 0,
"maxRows": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/settings/local")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateLocalSettings.json#responseBody
PUT
Updates view's order settings.
{{baseUrl}}/browser/views/:viewId/order
QUERY PARAMS
viewId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/order");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/order")
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/order"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId/order"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/order");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/order"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/browser/views/:viewId/order HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/order")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/order"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/order")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/order")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/order');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/browser/views/:viewId/order'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/order';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/order',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/order")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/browser/views/:viewId/order',
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: 'PUT', url: '{{baseUrl}}/browser/views/:viewId/order'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/order');
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}}/browser/views/:viewId/order'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/order';
const options = {method: 'PUT'};
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}}/browser/views/:viewId/order"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/browser/views/:viewId/order" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/order');
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/order');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/browser/views/:viewId/order');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/browser/views/:viewId/order' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/order' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/browser/views/:viewId/order")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/order"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/order"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/browser/views/:viewId/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/browser/views/:viewId/order') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/order";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/browser/views/:viewId/order
http PUT {{baseUrl}}/browser/views/:viewId/order
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/browser/views/:viewId/order
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/order")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateOrder.json#responseBody
PUT
Updates view's permissions.
{{baseUrl}}/browser/views/:viewId/permissions
QUERY PARAMS
viewId
BODY json
{
"sharedGroups": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/permissions");
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 \"sharedGroups\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/permissions" {:content-type :json
:form-params {:sharedGroups []}})
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/permissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sharedGroups\": []\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}}/browser/views/:viewId/permissions"),
Content = new StringContent("{\n \"sharedGroups\": []\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}}/browser/views/:viewId/permissions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sharedGroups\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/permissions"
payload := strings.NewReader("{\n \"sharedGroups\": []\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/browser/views/:viewId/permissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"sharedGroups": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/permissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"sharedGroups\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/permissions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"sharedGroups\": []\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 \"sharedGroups\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/permissions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/permissions")
.header("content-type", "application/json")
.body("{\n \"sharedGroups\": []\n}")
.asString();
const data = JSON.stringify({
sharedGroups: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/permissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/permissions',
headers: {'content-type': 'application/json'},
data: {sharedGroups: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/permissions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"sharedGroups":[]}'
};
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}}/browser/views/:viewId/permissions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sharedGroups": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sharedGroups\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/permissions")
.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/browser/views/:viewId/permissions',
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({sharedGroups: []}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/permissions',
headers: {'content-type': 'application/json'},
body: {sharedGroups: []},
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}}/browser/views/:viewId/permissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sharedGroups: []
});
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}}/browser/views/:viewId/permissions',
headers: {'content-type': 'application/json'},
data: {sharedGroups: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/permissions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"sharedGroups":[]}'
};
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 = @{ @"sharedGroups": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/browser/views/:viewId/permissions"]
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}}/browser/views/:viewId/permissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sharedGroups\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/permissions",
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([
'sharedGroups' => [
]
]),
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}}/browser/views/:viewId/permissions', [
'body' => '{
"sharedGroups": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/permissions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sharedGroups' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sharedGroups' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/browser/views/:viewId/permissions');
$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}}/browser/views/:viewId/permissions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"sharedGroups": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/permissions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"sharedGroups": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sharedGroups\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/browser/views/:viewId/permissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/permissions"
payload = { "sharedGroups": [] }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/permissions"
payload <- "{\n \"sharedGroups\": []\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}}/browser/views/:viewId/permissions")
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 \"sharedGroups\": []\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/browser/views/:viewId/permissions') do |req|
req.body = "{\n \"sharedGroups\": []\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}}/browser/views/:viewId/permissions";
let payload = json!({"sharedGroups": ()});
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}}/browser/views/:viewId/permissions \
--header 'content-type: application/json' \
--data '{
"sharedGroups": []
}'
echo '{
"sharedGroups": []
}' | \
http PUT {{baseUrl}}/browser/views/:viewId/permissions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "sharedGroups": []\n}' \
--output-document \
- {{baseUrl}}/browser/views/:viewId/permissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["sharedGroups": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/permissions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updatePermissions.json#responseBody
PUT
Updates view's settings.
{{baseUrl}}/browser/views/:viewId/settings
QUERY PARAMS
viewId
BODY json
{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/browser/views/:viewId/settings");
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 \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/browser/views/:viewId/settings" {:content-type :json
:form-params {:local {:maxLinesInRow 0
:maxRows 0}
:name ""}})
require "http/client"
url = "{{baseUrl}}/browser/views/:viewId/settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/browser/views/:viewId/settings"),
Content = new StringContent("{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/browser/views/:viewId/settings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/browser/views/:viewId/settings"
payload := strings.NewReader("{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\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/browser/views/:viewId/settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/browser/views/:viewId/settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/browser/views/:viewId/settings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/browser/views/:viewId/settings")
.header("content-type", "application/json")
.body("{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
local: {
maxLinesInRow: 0,
maxRows: 0
},
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/browser/views/:viewId/settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings',
headers: {'content-type': 'application/json'},
data: {local: {maxLinesInRow: 0, maxRows: 0}, name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/browser/views/:viewId/settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"local":{"maxLinesInRow":0,"maxRows":0},"name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/browser/views/:viewId/settings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "local": {\n "maxLinesInRow": 0,\n "maxRows": 0\n },\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/browser/views/:viewId/settings")
.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/browser/views/:viewId/settings',
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({local: {maxLinesInRow: 0, maxRows: 0}, name: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings',
headers: {'content-type': 'application/json'},
body: {local: {maxLinesInRow: 0, maxRows: 0}, name: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/browser/views/:viewId/settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
local: {
maxLinesInRow: 0,
maxRows: 0
},
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/browser/views/:viewId/settings',
headers: {'content-type': 'application/json'},
data: {local: {maxLinesInRow: 0, maxRows: 0}, name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/browser/views/:viewId/settings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"local":{"maxLinesInRow":0,"maxRows":0},"name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"local": @{ @"maxLinesInRow": @0, @"maxRows": @0 },
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/browser/views/:viewId/settings"]
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}}/browser/views/:viewId/settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/browser/views/:viewId/settings",
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([
'local' => [
'maxLinesInRow' => 0,
'maxRows' => 0
],
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/browser/views/:viewId/settings', [
'body' => '{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/browser/views/:viewId/settings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'local' => [
'maxLinesInRow' => 0,
'maxRows' => 0
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'local' => [
'maxLinesInRow' => 0,
'maxRows' => 0
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/browser/views/:viewId/settings');
$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}}/browser/views/:viewId/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/browser/views/:viewId/settings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/browser/views/:viewId/settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/browser/views/:viewId/settings"
payload = {
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/browser/views/:viewId/settings"
payload <- "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\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}}/browser/views/:viewId/settings")
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 \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/browser/views/:viewId/settings') do |req|
req.body = "{\n \"local\": {\n \"maxLinesInRow\": 0,\n \"maxRows\": 0\n },\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/browser/views/:viewId/settings";
let payload = json!({
"local": json!({
"maxLinesInRow": 0,
"maxRows": 0
}),
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.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}}/browser/views/:viewId/settings \
--header 'content-type: application/json' \
--data '{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}'
echo '{
"local": {
"maxLinesInRow": 0,
"maxRows": 0
},
"name": ""
}' | \
http PUT {{baseUrl}}/browser/views/:viewId/settings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "local": {\n "maxLinesInRow": 0,\n "maxRows": 0\n },\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/browser/views/:viewId/settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"local": [
"maxLinesInRow": 0,
"maxRows": 0
],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/browser/views/:viewId/settings")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/browsers/views/updateSettings.json#responseBody
POST
Adds a new payment to the client invoice. The invoice payment status (Not Paid, Partially Paid, Fully Paid) is automatically recalculated.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json;charset=UTF-8");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments" {:body "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
headers = HTTP::Headers{
"content-type" => "application/json;charset=UTF-8"
}
reqBody = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
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}}/accounting/customers/invoices/:invoiceId/payments"),
Content = new StringContent("/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json;charset=UTF-8");
request.AddParameter("application/json;charset=UTF-8", "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
payload := strings.NewReader("/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/accounting/customers/invoices/:invoiceId/payments HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: example.com
Content-Length: 86
/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.setHeader("content-type", "application/json;charset=UTF-8")
.setBody("/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"))
.header("content-type", "application/json;charset=UTF-8")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.header("content-type", "application/json;charset=UTF-8")
.body("/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody")
.asString();
const data = '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
xhr.setRequestHeader('content-type', 'application/json;charset=UTF-8');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
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}}/accounting/customers/invoices/:invoiceId/payments',
method: 'POST',
headers: {
'content-type': 'application/json;charset=UTF-8'
},
data: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/payments',
headers: {
'content-type': 'application/json;charset=UTF-8'
}
};
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('/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
req.headers({
'content-type': 'application/json;charset=UTF-8'
});
req.send('/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody');
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}}/accounting/customers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
};
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;charset=UTF-8" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"]
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}}/accounting/customers/invoices/:invoiceId/payments" in
let headers = Header.add (Header.init ()) "content-type" "application/json;charset=UTF-8" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody",
CURLOPT_HTTPHEADER => [
"content-type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments', [
'body' => '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody',
'headers' => [
'content-type' => 'application/json;charset=UTF-8',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$request->setBody('/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
headers = { 'content-type': "application/json;charset=UTF-8" }
conn.request("POST", "/baseUrl/accounting/customers/invoices/:invoiceId/payments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
payload = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
headers = {"content-type": "application/json;charset=UTF-8"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
payload <- "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json;charset=UTF-8'
request.body = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json;charset=UTF-8'}
)
response = conn.post('/baseUrl/accounting/customers/invoices/:invoiceId/payments') do |req|
req.body = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments";
let payload = "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json;charset=UTF-8".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounting/customers/invoices/:invoiceId/payments \
--header 'content-type: application/json;charset=UTF-8' \
--data '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody'
echo '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody' | \
http POST {{baseUrl}}/accounting/customers/invoices/:invoiceId/payments \
content-type:'application/json;charset=UTF-8'
wget --quiet \
--method POST \
--header 'content-type: application/json;charset=UTF-8' \
--body-data '/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody' \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/payments
import Foundation
let headers = ["content-type": "application/json;charset=UTF-8"]
let postData = NSData(data: "/home-api/assets/examples/accounting/customers/invoices/createPayment.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Creates a new invoice.
{{baseUrl}}/accounting/customers/invoices
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices"
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}}/accounting/customers/invoices"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices"
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/accounting/customers/invoices HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices"))
.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}}/accounting/customers/invoices")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounting/customers/invoices');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices';
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}}/accounting/customers/invoices',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices';
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}}/accounting/customers/invoices"]
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}}/accounting/customers/invoices" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices",
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}}/accounting/customers/invoices');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices")
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/accounting/customers/invoices') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices";
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}}/accounting/customers/invoices
http POST {{baseUrl}}/accounting/customers/invoices
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/createMultipleFromTasks.json#responseBody
POST
Duplicate client invoice as pro forma.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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/accounting/customers/invoices/:invoiceId/duplicate/proForma HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices/:invoiceId/duplicate/proForma")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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/accounting/customers/invoices/:invoiceId/duplicate/proForma') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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}}/accounting/customers/invoices/:invoiceId/duplicate/proForma
http POST {{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/proForma
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate/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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/duplicateAsProForma.json#responseBody
POST
Duplicate client invoice.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate"
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}}/accounting/customers/invoices/:invoiceId/duplicate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate"
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/accounting/customers/invoices/:invoiceId/duplicate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate"))
.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}}/accounting/customers/invoices/:invoiceId/duplicate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")
.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}}/accounting/customers/invoices/:invoiceId/duplicate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate';
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}}/accounting/customers/invoices/:invoiceId/duplicate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/duplicate',
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}}/accounting/customers/invoices/:invoiceId/duplicate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate');
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}}/accounting/customers/invoices/:invoiceId/duplicate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate';
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}}/accounting/customers/invoices/:invoiceId/duplicate"]
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}}/accounting/customers/invoices/:invoiceId/duplicate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate",
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}}/accounting/customers/invoices/:invoiceId/duplicate');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices/:invoiceId/duplicate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")
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/accounting/customers/invoices/:invoiceId/duplicate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate";
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}}/accounting/customers/invoices/:invoiceId/duplicate
http POST {{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/duplicate")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/duplicate.json#responseBody
GET
Generates client invoice document (PDF).
{{baseUrl}}/accounting/customers/invoices/:invoiceId/document
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document"
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}}/accounting/customers/invoices/:invoiceId/document"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/document");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document"
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/accounting/customers/invoices/:invoiceId/document HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/document"))
.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}}/accounting/customers/invoices/:invoiceId/document")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")
.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}}/accounting/customers/invoices/:invoiceId/document');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document';
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}}/accounting/customers/invoices/:invoiceId/document',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/document',
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}}/accounting/customers/invoices/:invoiceId/document'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document');
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}}/accounting/customers/invoices/:invoiceId/document'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document';
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}}/accounting/customers/invoices/:invoiceId/document"]
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}}/accounting/customers/invoices/:invoiceId/document" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/document",
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}}/accounting/customers/invoices/:invoiceId/document');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/document');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/document');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/document' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/:invoiceId/document")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")
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/accounting/customers/invoices/:invoiceId/document') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document";
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}}/accounting/customers/invoices/:invoiceId/document
http GET {{baseUrl}}/accounting/customers/invoices/:invoiceId/document
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/document
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/document")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getDocument.json#responseBody
POST
Generates client invoices' documents.
{{baseUrl}}/accounting/customers/invoices/documents
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/documents");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/documents")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/documents"
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}}/accounting/customers/invoices/documents"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/documents");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/documents"
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/accounting/customers/invoices/documents HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/documents")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/documents"))
.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}}/accounting/customers/invoices/documents")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/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('POST', '{{baseUrl}}/accounting/customers/invoices/documents');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/documents'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/documents';
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}}/accounting/customers/invoices/documents',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/documents")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/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: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/documents'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices/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: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/documents'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/documents';
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}}/accounting/customers/invoices/documents"]
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}}/accounting/customers/invoices/documents" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/documents",
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}}/accounting/customers/invoices/documents');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/documents');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/documents');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/documents' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/documents' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices/documents")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/documents"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/documents"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/documents")
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/accounting/customers/invoices/documents') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/documents";
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}}/accounting/customers/invoices/documents
http POST {{baseUrl}}/accounting/customers/invoices/documents
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/documents
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/documents")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/downloadDocuments.json#responseBody
GET
Lists all client invoices in all statuses (including not ready and drafts) that have been updated since a specific date.
{{baseUrl}}/accounting/customers/invoices
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounting/customers/invoices"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounting/customers/invoices HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/accounting/customers/invoices');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounting/customers/invoices',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/customers/invoices"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounting/customers/invoices" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounting/customers/invoices');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounting/customers/invoices') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounting/customers/invoices
http GET {{baseUrl}}/accounting/customers/invoices
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getAll.json#responseBody
DELETE
Removes a client invoice.
{{baseUrl}}/accounting/customers/invoices/:invoiceId
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounting/customers/invoices/:invoiceId")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
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}}/accounting/customers/invoices/:invoiceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
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/accounting/customers/invoices/:invoiceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId"))
.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}}/accounting/customers/invoices/:invoiceId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.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}}/accounting/customers/invoices/:invoiceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId';
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}}/accounting/customers/invoices/:invoiceId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId',
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}}/accounting/customers/invoices/:invoiceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounting/customers/invoices/:invoiceId');
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}}/accounting/customers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId';
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}}/accounting/customers/invoices/:invoiceId"]
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}}/accounting/customers/invoices/:invoiceId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId",
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}}/accounting/customers/invoices/:invoiceId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/accounting/customers/invoices/:invoiceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
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/accounting/customers/invoices/:invoiceId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId";
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}}/accounting/customers/invoices/:invoiceId
http DELETE {{baseUrl}}/accounting/customers/invoices/:invoiceId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a customer payment.
{{baseUrl}}/accounting/customers/payments/:paymentId
QUERY PARAMS
paymentId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/payments/:paymentId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounting/customers/payments/:paymentId")
require "http/client"
url = "{{baseUrl}}/accounting/customers/payments/:paymentId"
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}}/accounting/customers/payments/:paymentId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/payments/:paymentId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/payments/:paymentId"
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/accounting/customers/payments/:paymentId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounting/customers/payments/:paymentId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/payments/:paymentId"))
.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}}/accounting/customers/payments/:paymentId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounting/customers/payments/:paymentId")
.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}}/accounting/customers/payments/:paymentId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounting/customers/payments/:paymentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/payments/:paymentId';
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}}/accounting/customers/payments/:paymentId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/payments/:paymentId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/payments/:paymentId',
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}}/accounting/customers/payments/:paymentId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounting/customers/payments/:paymentId');
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}}/accounting/customers/payments/:paymentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/payments/:paymentId';
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}}/accounting/customers/payments/:paymentId"]
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}}/accounting/customers/payments/:paymentId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/payments/:paymentId",
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}}/accounting/customers/payments/:paymentId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/payments/:paymentId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/payments/:paymentId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/payments/:paymentId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/payments/:paymentId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/accounting/customers/payments/:paymentId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/payments/:paymentId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/payments/:paymentId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/payments/:paymentId")
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/accounting/customers/payments/:paymentId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/payments/:paymentId";
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}}/accounting/customers/payments/:paymentId
http DELETE {{baseUrl}}/accounting/customers/payments/:paymentId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/accounting/customers/payments/:paymentId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/payments/:paymentId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns all payments for the client invoice.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/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/accounting/customers/invoices/:invoiceId/payments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/:invoiceId/payments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/payments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/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/accounting/customers/invoices/:invoiceId/payments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/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}}/accounting/customers/invoices/:invoiceId/payments
http GET {{baseUrl}}/accounting/customers/invoices/:invoiceId/payments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/payments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getPayments.json#responseBody
GET
Returns client invoice details.
{{baseUrl}}/accounting/customers/invoices/:invoiceId
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/:invoiceId")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
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}}/accounting/customers/invoices/:invoiceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
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/accounting/customers/invoices/:invoiceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId"))
.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}}/accounting/customers/invoices/:invoiceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.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}}/accounting/customers/invoices/:invoiceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId';
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}}/accounting/customers/invoices/:invoiceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId',
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}}/accounting/customers/invoices/:invoiceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices/:invoiceId');
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}}/accounting/customers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId';
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}}/accounting/customers/invoices/:invoiceId"]
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}}/accounting/customers/invoices/:invoiceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId",
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}}/accounting/customers/invoices/:invoiceId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/:invoiceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId")
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/accounting/customers/invoices/:invoiceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId";
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}}/accounting/customers/invoices/:invoiceId
http GET {{baseUrl}}/accounting/customers/invoices/:invoiceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getById.json#responseBody
GET
Returns client invoices' internal identifiers.
{{baseUrl}}/accounting/customers/invoices/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/ids")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/ids"
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}}/accounting/customers/invoices/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/ids"
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/accounting/customers/invoices/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/ids"))
.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}}/accounting/customers/invoices/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/ids")
.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}}/accounting/customers/invoices/ids');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/ids';
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}}/accounting/customers/invoices/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/ids',
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}}/accounting/customers/invoices/ids'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices/ids');
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}}/accounting/customers/invoices/ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/ids';
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}}/accounting/customers/invoices/ids"]
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}}/accounting/customers/invoices/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/ids",
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}}/accounting/customers/invoices/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/ids")
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/accounting/customers/invoices/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/ids";
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}}/accounting/customers/invoices/ids
http GET {{baseUrl}}/accounting/customers/invoices/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getIds.json#responseBody
GET
Returns dates of a given client invoice.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates"
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}}/accounting/customers/invoices/:invoiceId/dates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates"
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/accounting/customers/invoices/:invoiceId/dates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates"))
.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}}/accounting/customers/invoices/:invoiceId/dates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")
.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}}/accounting/customers/invoices/:invoiceId/dates');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates';
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}}/accounting/customers/invoices/:invoiceId/dates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/dates',
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}}/accounting/customers/invoices/:invoiceId/dates'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates');
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}}/accounting/customers/invoices/:invoiceId/dates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates';
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}}/accounting/customers/invoices/:invoiceId/dates"]
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}}/accounting/customers/invoices/:invoiceId/dates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates",
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}}/accounting/customers/invoices/:invoiceId/dates');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/:invoiceId/dates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")
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/accounting/customers/invoices/:invoiceId/dates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates";
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}}/accounting/customers/invoices/:invoiceId/dates
http GET {{baseUrl}}/accounting/customers/invoices/:invoiceId/dates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/dates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/dates")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getDates.json#responseBody
GET
Returns payment terms of a given client invoice.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms"
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}}/accounting/customers/invoices/:invoiceId/paymentTerms"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms"
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/accounting/customers/invoices/:invoiceId/paymentTerms HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms"))
.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}}/accounting/customers/invoices/:invoiceId/paymentTerms")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")
.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}}/accounting/customers/invoices/:invoiceId/paymentTerms');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms';
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}}/accounting/customers/invoices/:invoiceId/paymentTerms',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/paymentTerms',
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}}/accounting/customers/invoices/:invoiceId/paymentTerms'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms');
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}}/accounting/customers/invoices/:invoiceId/paymentTerms'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms';
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}}/accounting/customers/invoices/:invoiceId/paymentTerms"]
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}}/accounting/customers/invoices/:invoiceId/paymentTerms" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms",
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}}/accounting/customers/invoices/:invoiceId/paymentTerms');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/customers/invoices/:invoiceId/paymentTerms")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")
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/accounting/customers/invoices/:invoiceId/paymentTerms') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms";
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}}/accounting/customers/invoices/:invoiceId/paymentTerms
http GET {{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/paymentTerms")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/getPaymentTerms.json#responseBody
POST
Sends reminder.
{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder"
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}}/accounting/customers/invoices/:invoiceId/sendReminder"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder"
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/accounting/customers/invoices/:invoiceId/sendReminder HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder"))
.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}}/accounting/customers/invoices/:invoiceId/sendReminder")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")
.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}}/accounting/customers/invoices/:invoiceId/sendReminder');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder';
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}}/accounting/customers/invoices/:invoiceId/sendReminder',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/:invoiceId/sendReminder',
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}}/accounting/customers/invoices/:invoiceId/sendReminder'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder');
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}}/accounting/customers/invoices/:invoiceId/sendReminder'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder';
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}}/accounting/customers/invoices/:invoiceId/sendReminder"]
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}}/accounting/customers/invoices/:invoiceId/sendReminder" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder",
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}}/accounting/customers/invoices/:invoiceId/sendReminder');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices/:invoiceId/sendReminder")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")
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/accounting/customers/invoices/:invoiceId/sendReminder') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder";
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}}/accounting/customers/invoices/:invoiceId/sendReminder
http POST {{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/:invoiceId/sendReminder")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Sends reminders. Returns number of sent e-mails.
{{baseUrl}}/accounting/customers/invoices/sendReminders
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/customers/invoices/sendReminders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/customers/invoices/sendReminders")
require "http/client"
url = "{{baseUrl}}/accounting/customers/invoices/sendReminders"
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}}/accounting/customers/invoices/sendReminders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/customers/invoices/sendReminders");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/customers/invoices/sendReminders"
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/accounting/customers/invoices/sendReminders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/customers/invoices/sendReminders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/customers/invoices/sendReminders"))
.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}}/accounting/customers/invoices/sendReminders")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/customers/invoices/sendReminders")
.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}}/accounting/customers/invoices/sendReminders');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/customers/invoices/sendReminders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/customers/invoices/sendReminders';
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}}/accounting/customers/invoices/sendReminders',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/customers/invoices/sendReminders")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/customers/invoices/sendReminders',
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}}/accounting/customers/invoices/sendReminders'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/customers/invoices/sendReminders');
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}}/accounting/customers/invoices/sendReminders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/customers/invoices/sendReminders';
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}}/accounting/customers/invoices/sendReminders"]
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}}/accounting/customers/invoices/sendReminders" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/customers/invoices/sendReminders",
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}}/accounting/customers/invoices/sendReminders');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/customers/invoices/sendReminders');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/customers/invoices/sendReminders');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/customers/invoices/sendReminders' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/customers/invoices/sendReminders' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/customers/invoices/sendReminders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/customers/invoices/sendReminders"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/customers/invoices/sendReminders"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/customers/invoices/sendReminders")
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/accounting/customers/invoices/sendReminders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/customers/invoices/sendReminders";
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}}/accounting/customers/invoices/sendReminders
http POST {{baseUrl}}/accounting/customers/invoices/sendReminders
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/customers/invoices/sendReminders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/customers/invoices/sendReminders")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/customers/invoices/sendReminders.json#responseBody
POST
Creates a new client.
{{baseUrl}}/customers
BODY json
{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/customers" {:content-type :json
:form-params {:accountOnCustomerServer ""
:accounting {:taxNumbers [{:number ""
:type ""}]}
:billingAddress {:addressLine1 ""
:addressLine2 ""
:city ""
:countryId 0
:postalCode ""
:provinceId 0
:sameAsBillingAddress false}
:branchId 0
:categoriesIds []
:clientFirstProjectDate ""
:clientFirstQuoteDate ""
:clientLastProjectDate ""
:clientLastQuoteDate ""
:clientNumberOfProjects 0
:clientNumberOfQuotes 0
:contact {:emails {:additional []
:cc []
:primary ""}
:fax ""
:phones []
:sms ""
:websites []}
:contractNumber ""
:correspondenceAddress {}
:customFields [{:key ""
:name ""
:type ""
:value {}}]
:fullName ""
:id 0
:idNumber ""
:industriesIds []
:leadSourceId 0
:limitAccessToPeopleResponsible false
:name ""
:notes ""
:persons [{:active false
:contact {:emails {:additional []
:primary ""}
:fax ""
:phones []
:sms ""}
:customFields [{}]
:customerId 0
:firstProjectDate ""
:firstQuoteDate ""
:gender ""
:id 0
:lastName ""
:lastProjectDate ""
:lastQuoteDate ""
:motherTonguesIds []
:name ""
:numberOfProjects 0
:numberOfQuotes 0
:positionId 0}]
:responsiblePersons {:accountManagerId 0
:projectCoordinatorId 0
:projectManagerId 0
:salesPersonId 0}
:salesNotes ""
:status ""}})
require "http/client"
url = "{{baseUrl}}/customers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers"),
Content = new StringContent("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers"
payload := strings.NewReader("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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/customers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1811
{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/customers")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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 \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/customers")
.header("content-type", "application/json")
.body("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountOnCustomerServer: '',
accounting: {
taxNumbers: [
{
number: '',
type: ''
}
]
},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {
emails: {
additional: [],
primary: ''
},
fax: '',
phones: [],
sms: ''
},
customFields: [
{}
],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/customers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/customers',
headers: {'content-type': 'application/json'},
data: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountOnCustomerServer":"","accounting":{"taxNumbers":[{"number":"","type":""}]},"billingAddress":{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false},"branchId":0,"categoriesIds":[],"clientFirstProjectDate":"","clientFirstQuoteDate":"","clientLastProjectDate":"","clientLastQuoteDate":"","clientNumberOfProjects":0,"clientNumberOfQuotes":0,"contact":{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]},"contractNumber":"","correspondenceAddress":{},"customFields":[{"key":"","name":"","type":"","value":{}}],"fullName":"","id":0,"idNumber":"","industriesIds":[],"leadSourceId":0,"limitAccessToPeopleResponsible":false,"name":"","notes":"","persons":[{"active":false,"contact":{"emails":{"additional":[],"primary":""},"fax":"","phones":[],"sms":""},"customFields":[{}],"customerId":0,"firstProjectDate":"","firstQuoteDate":"","gender":"","id":0,"lastName":"","lastProjectDate":"","lastQuoteDate":"","motherTonguesIds":[],"name":"","numberOfProjects":0,"numberOfQuotes":0,"positionId":0}],"responsiblePersons":{"accountManagerId":0,"projectCoordinatorId":0,"projectManagerId":0,"salesPersonId":0},"salesNotes":"","status":""}'
};
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}}/customers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountOnCustomerServer": "",\n "accounting": {\n "taxNumbers": [\n {\n "number": "",\n "type": ""\n }\n ]\n },\n "billingAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n },\n "branchId": 0,\n "categoriesIds": [],\n "clientFirstProjectDate": "",\n "clientFirstQuoteDate": "",\n "clientLastProjectDate": "",\n "clientLastQuoteDate": "",\n "clientNumberOfProjects": 0,\n "clientNumberOfQuotes": 0,\n "contact": {\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\n },\n "contractNumber": "",\n "correspondenceAddress": {},\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "fullName": "",\n "id": 0,\n "idNumber": "",\n "industriesIds": [],\n "leadSourceId": 0,\n "limitAccessToPeopleResponsible": false,\n "name": "",\n "notes": "",\n "persons": [\n {\n "active": false,\n "contact": {\n "emails": {\n "additional": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": ""\n },\n "customFields": [\n {}\n ],\n "customerId": 0,\n "firstProjectDate": "",\n "firstQuoteDate": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "lastProjectDate": "",\n "lastQuoteDate": "",\n "motherTonguesIds": [],\n "name": "",\n "numberOfProjects": 0,\n "numberOfQuotes": 0,\n "positionId": 0\n }\n ],\n "responsiblePersons": {\n "accountManagerId": 0,\n "projectCoordinatorId": 0,\n "projectManagerId": 0,\n "salesPersonId": 0\n },\n "salesNotes": "",\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/customers',
headers: {'content-type': 'application/json'},
body: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
},
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}}/customers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountOnCustomerServer: '',
accounting: {
taxNumbers: [
{
number: '',
type: ''
}
]
},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {
emails: {
additional: [],
primary: ''
},
fax: '',
phones: [],
sms: ''
},
customFields: [
{}
],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
});
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}}/customers',
headers: {'content-type': 'application/json'},
data: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountOnCustomerServer":"","accounting":{"taxNumbers":[{"number":"","type":""}]},"billingAddress":{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false},"branchId":0,"categoriesIds":[],"clientFirstProjectDate":"","clientFirstQuoteDate":"","clientLastProjectDate":"","clientLastQuoteDate":"","clientNumberOfProjects":0,"clientNumberOfQuotes":0,"contact":{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]},"contractNumber":"","correspondenceAddress":{},"customFields":[{"key":"","name":"","type":"","value":{}}],"fullName":"","id":0,"idNumber":"","industriesIds":[],"leadSourceId":0,"limitAccessToPeopleResponsible":false,"name":"","notes":"","persons":[{"active":false,"contact":{"emails":{"additional":[],"primary":""},"fax":"","phones":[],"sms":""},"customFields":[{}],"customerId":0,"firstProjectDate":"","firstQuoteDate":"","gender":"","id":0,"lastName":"","lastProjectDate":"","lastQuoteDate":"","motherTonguesIds":[],"name":"","numberOfProjects":0,"numberOfQuotes":0,"positionId":0}],"responsiblePersons":{"accountManagerId":0,"projectCoordinatorId":0,"projectManagerId":0,"salesPersonId":0},"salesNotes":"","status":""}'
};
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 = @{ @"accountOnCustomerServer": @"",
@"accounting": @{ @"taxNumbers": @[ @{ @"number": @"", @"type": @"" } ] },
@"billingAddress": @{ @"addressLine1": @"", @"addressLine2": @"", @"city": @"", @"countryId": @0, @"postalCode": @"", @"provinceId": @0, @"sameAsBillingAddress": @NO },
@"branchId": @0,
@"categoriesIds": @[ ],
@"clientFirstProjectDate": @"",
@"clientFirstQuoteDate": @"",
@"clientLastProjectDate": @"",
@"clientLastQuoteDate": @"",
@"clientNumberOfProjects": @0,
@"clientNumberOfQuotes": @0,
@"contact": @{ @"emails": @{ @"additional": @[ ], @"cc": @[ ], @"primary": @"" }, @"fax": @"", @"phones": @[ ], @"sms": @"", @"websites": @[ ] },
@"contractNumber": @"",
@"correspondenceAddress": @{ },
@"customFields": @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ],
@"fullName": @"",
@"id": @0,
@"idNumber": @"",
@"industriesIds": @[ ],
@"leadSourceId": @0,
@"limitAccessToPeopleResponsible": @NO,
@"name": @"",
@"notes": @"",
@"persons": @[ @{ @"active": @NO, @"contact": @{ @"emails": @{ @"additional": @[ ], @"primary": @"" }, @"fax": @"", @"phones": @[ ], @"sms": @"" }, @"customFields": @[ @{ } ], @"customerId": @0, @"firstProjectDate": @"", @"firstQuoteDate": @"", @"gender": @"", @"id": @0, @"lastName": @"", @"lastProjectDate": @"", @"lastQuoteDate": @"", @"motherTonguesIds": @[ ], @"name": @"", @"numberOfProjects": @0, @"numberOfQuotes": @0, @"positionId": @0 } ],
@"responsiblePersons": @{ @"accountManagerId": @0, @"projectCoordinatorId": @0, @"projectManagerId": @0, @"salesPersonId": @0 },
@"salesNotes": @"",
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/customers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]),
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}}/customers', [
'body' => '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/customers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/customers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers"
payload = {
"accountOnCustomerServer": "",
"accounting": { "taxNumbers": [
{
"number": "",
"type": ""
}
] },
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": False
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": False,
"name": "",
"notes": "",
"persons": [
{
"active": False,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [{}],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers"
payload <- "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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/customers') do |req|
req.body = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers";
let payload = json!({
"accountOnCustomerServer": "",
"accounting": json!({"taxNumbers": (
json!({
"number": "",
"type": ""
})
)}),
"billingAddress": json!({
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}),
"branchId": 0,
"categoriesIds": (),
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": json!({
"emails": json!({
"additional": (),
"cc": (),
"primary": ""
}),
"fax": "",
"phones": (),
"sms": "",
"websites": ()
}),
"contractNumber": "",
"correspondenceAddress": json!({}),
"customFields": (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
),
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": (),
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": (
json!({
"active": false,
"contact": json!({
"emails": json!({
"additional": (),
"primary": ""
}),
"fax": "",
"phones": (),
"sms": ""
}),
"customFields": (json!({})),
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": (),
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
})
),
"responsiblePersons": json!({
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
}),
"salesNotes": "",
"status": ""
});
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}}/customers \
--header 'content-type: application/json' \
--data '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
echo '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}' | \
http POST {{baseUrl}}/customers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountOnCustomerServer": "",\n "accounting": {\n "taxNumbers": [\n {\n "number": "",\n "type": ""\n }\n ]\n },\n "billingAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n },\n "branchId": 0,\n "categoriesIds": [],\n "clientFirstProjectDate": "",\n "clientFirstQuoteDate": "",\n "clientLastProjectDate": "",\n "clientLastQuoteDate": "",\n "clientNumberOfProjects": 0,\n "clientNumberOfQuotes": 0,\n "contact": {\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\n },\n "contractNumber": "",\n "correspondenceAddress": {},\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "fullName": "",\n "id": 0,\n "idNumber": "",\n "industriesIds": [],\n "leadSourceId": 0,\n "limitAccessToPeopleResponsible": false,\n "name": "",\n "notes": "",\n "persons": [\n {\n "active": false,\n "contact": {\n "emails": {\n "additional": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": ""\n },\n "customFields": [\n {}\n ],\n "customerId": 0,\n "firstProjectDate": "",\n "firstQuoteDate": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "lastProjectDate": "",\n "lastQuoteDate": "",\n "motherTonguesIds": [],\n "name": "",\n "numberOfProjects": 0,\n "numberOfQuotes": 0,\n "positionId": 0\n }\n ],\n "responsiblePersons": {\n "accountManagerId": 0,\n "projectCoordinatorId": 0,\n "projectManagerId": 0,\n "salesPersonId": 0\n },\n "salesNotes": "",\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/customers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountOnCustomerServer": "",
"accounting": ["taxNumbers": [
[
"number": "",
"type": ""
]
]],
"billingAddress": [
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
],
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": [
"emails": [
"additional": [],
"cc": [],
"primary": ""
],
"fax": "",
"phones": [],
"sms": "",
"websites": []
],
"contractNumber": "",
"correspondenceAddress": [],
"customFields": [
[
"key": "",
"name": "",
"type": "",
"value": []
]
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
[
"active": false,
"contact": [
"emails": [
"additional": [],
"primary": ""
],
"fax": "",
"phones": [],
"sms": ""
],
"customFields": [[]],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
]
],
"responsiblePersons": [
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
],
"salesNotes": "",
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/create.json#responseBody
POST
Creates a new person.
{{baseUrl}}/customers/persons
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/customers/persons")
require "http/client"
url = "{{baseUrl}}/customers/persons"
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}}/customers/persons"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons"
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/customers/persons HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/customers/persons")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons"))
.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}}/customers/persons")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/customers/persons")
.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}}/customers/persons');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/customers/persons'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons';
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}}/customers/persons',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons',
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}}/customers/persons'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/customers/persons');
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}}/customers/persons'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons';
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}}/customers/persons"]
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}}/customers/persons" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons",
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}}/customers/persons');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/customers/persons")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons")
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/customers/persons') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons";
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}}/customers/persons
http POST {{baseUrl}}/customers/persons
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/customers/persons
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/create.json#responseBody
POST
Generates a single use sign-in token.
{{baseUrl}}/customers/persons/accessToken
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/accessToken");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/customers/persons/accessToken")
require "http/client"
url = "{{baseUrl}}/customers/persons/accessToken"
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}}/customers/persons/accessToken"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/accessToken");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/accessToken"
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/customers/persons/accessToken HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/customers/persons/accessToken")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/accessToken"))
.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}}/customers/persons/accessToken")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/customers/persons/accessToken")
.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}}/customers/persons/accessToken');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/customers/persons/accessToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/accessToken';
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}}/customers/persons/accessToken',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/accessToken")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/accessToken',
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}}/customers/persons/accessToken'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/customers/persons/accessToken');
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}}/customers/persons/accessToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/accessToken';
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}}/customers/persons/accessToken"]
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}}/customers/persons/accessToken" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/accessToken",
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}}/customers/persons/accessToken');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/accessToken');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/accessToken');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/accessToken' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/accessToken' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/customers/persons/accessToken")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/accessToken"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/accessToken"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/accessToken")
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/customers/persons/accessToken') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/accessToken";
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}}/customers/persons/accessToken
http POST {{baseUrl}}/customers/persons/accessToken
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/customers/persons/accessToken
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/accessToken")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/generateSingleUseSignInToken.json#responseBody
DELETE
Removes a client.
{{baseUrl}}/customers/:customerId
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/customers/:customerId")
require "http/client"
url = "{{baseUrl}}/customers/:customerId"
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}}/customers/:customerId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId"
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/customers/:customerId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/customers/:customerId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId"))
.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}}/customers/:customerId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/customers/:customerId")
.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}}/customers/:customerId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/customers/:customerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId';
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}}/customers/:customerId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId',
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}}/customers/:customerId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/customers/:customerId');
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}}/customers/:customerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId';
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}}/customers/:customerId"]
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}}/customers/:customerId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId",
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}}/customers/:customerId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/customers/:customerId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId")
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/customers/:customerId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId";
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}}/customers/:customerId
http DELETE {{baseUrl}}/customers/:customerId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/customers/:customerId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a customer price list.
{{baseUrl}}/customers/priceLists/:priceListId
QUERY PARAMS
priceListId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/priceLists/:priceListId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/customers/priceLists/:priceListId")
require "http/client"
url = "{{baseUrl}}/customers/priceLists/:priceListId"
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}}/customers/priceLists/:priceListId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/priceLists/:priceListId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/priceLists/:priceListId"
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/customers/priceLists/:priceListId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/customers/priceLists/:priceListId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/priceLists/:priceListId"))
.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}}/customers/priceLists/:priceListId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/customers/priceLists/:priceListId")
.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}}/customers/priceLists/:priceListId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/customers/priceLists/:priceListId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/priceLists/:priceListId';
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}}/customers/priceLists/:priceListId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/priceLists/:priceListId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/priceLists/:priceListId',
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}}/customers/priceLists/:priceListId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/customers/priceLists/:priceListId');
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}}/customers/priceLists/:priceListId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/priceLists/:priceListId';
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}}/customers/priceLists/:priceListId"]
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}}/customers/priceLists/:priceListId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/priceLists/:priceListId",
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}}/customers/priceLists/:priceListId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/priceLists/:priceListId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/priceLists/:priceListId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/priceLists/:priceListId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/priceLists/:priceListId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/customers/priceLists/:priceListId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/priceLists/:priceListId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/priceLists/:priceListId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/priceLists/:priceListId")
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/customers/priceLists/:priceListId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/priceLists/:priceListId";
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}}/customers/priceLists/:priceListId
http DELETE {{baseUrl}}/customers/priceLists/:priceListId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/customers/priceLists/:priceListId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/priceLists/:priceListId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a person.
{{baseUrl}}/customers/persons/:personId
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/customers/persons/:personId")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId"
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}}/customers/persons/:personId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId"
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/customers/persons/:personId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/customers/persons/:personId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId"))
.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}}/customers/persons/:personId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/customers/persons/:personId")
.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}}/customers/persons/:personId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/customers/persons/:personId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId';
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}}/customers/persons/:personId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId',
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}}/customers/persons/:personId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/customers/persons/:personId');
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}}/customers/persons/:personId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId';
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}}/customers/persons/:personId"]
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}}/customers/persons/:personId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId",
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}}/customers/persons/:personId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/customers/persons/:personId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId")
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/customers/persons/:personId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId";
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}}/customers/persons/:personId
http DELETE {{baseUrl}}/customers/persons/:personId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/customers/persons/:personId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns address of a given client.
{{baseUrl}}/customers/:customerId/address
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/address");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/address")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/address"
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}}/customers/:customerId/address"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/address");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/address"
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/customers/:customerId/address HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/address")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/address"))
.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}}/customers/:customerId/address")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/address")
.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}}/customers/:customerId/address');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/address'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/address';
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}}/customers/:customerId/address',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/address")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/address',
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}}/customers/:customerId/address'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/address');
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}}/customers/:customerId/address'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/address';
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}}/customers/:customerId/address"]
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}}/customers/:customerId/address" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/address",
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}}/customers/:customerId/address');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/address');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/address');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/address' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/address' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/address")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/address"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/address"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/address")
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/customers/:customerId/address') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/address";
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}}/customers/:customerId/address
http GET {{baseUrl}}/customers/:customerId/address
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/address
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/address")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/address/getAddress.json#responseBody
GET
Returns categories of a given client.
{{baseUrl}}/customers/:customerId/categories
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/categories");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/categories")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/categories"
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}}/customers/:customerId/categories"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/categories");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/categories"
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/customers/:customerId/categories HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/categories")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/categories"))
.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}}/customers/:customerId/categories")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/categories")
.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}}/customers/:customerId/categories');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/categories'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/categories';
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}}/customers/:customerId/categories',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/categories")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/categories',
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}}/customers/:customerId/categories'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/categories');
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}}/customers/:customerId/categories'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/categories';
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}}/customers/:customerId/categories"]
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}}/customers/:customerId/categories" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/categories",
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}}/customers/:customerId/categories');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/categories');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/categories');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/categories' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/categories' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/categories")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/categories"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/categories"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/categories")
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/customers/:customerId/categories') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/categories";
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}}/customers/:customerId/categories
http GET {{baseUrl}}/customers/:customerId/categories
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/categories
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/categories")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getCategories.json#responseBody
GET
Returns client details.
{{baseUrl}}/customers/:customerId
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId")
require "http/client"
url = "{{baseUrl}}/customers/:customerId"
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}}/customers/:customerId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId"
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/customers/:customerId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId"))
.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}}/customers/:customerId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId")
.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}}/customers/:customerId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/customers/:customerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId';
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}}/customers/:customerId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId',
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}}/customers/:customerId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId');
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}}/customers/:customerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId';
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}}/customers/:customerId"]
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}}/customers/:customerId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId",
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}}/customers/:customerId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId")
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/customers/:customerId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId";
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}}/customers/:customerId
http GET {{baseUrl}}/customers/:customerId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getById.json#responseBody
GET
Returns clients' internal identifiers.
{{baseUrl}}/customers/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/ids")
require "http/client"
url = "{{baseUrl}}/customers/ids"
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}}/customers/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/ids"
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/customers/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/ids"))
.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}}/customers/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/ids")
.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}}/customers/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/customers/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/ids';
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}}/customers/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/ids',
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}}/customers/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/ids');
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}}/customers/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/ids';
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}}/customers/ids"]
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}}/customers/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/ids",
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}}/customers/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/ids")
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/customers/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/ids";
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}}/customers/ids
http GET {{baseUrl}}/customers/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/ids")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/customers/getIds.json#responseBody
GET
Returns contact of a given client.
{{baseUrl}}/customers/:customerId/contact
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/contact");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/contact")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/contact"
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}}/customers/:customerId/contact"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/contact");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/contact"
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/customers/:customerId/contact HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/contact")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/contact"))
.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}}/customers/:customerId/contact")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/contact")
.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}}/customers/:customerId/contact');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/contact';
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}}/customers/:customerId/contact',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/contact")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/contact',
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}}/customers/:customerId/contact'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/contact');
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}}/customers/:customerId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/contact';
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}}/customers/:customerId/contact"]
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}}/customers/:customerId/contact" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/contact",
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}}/customers/:customerId/contact');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/contact');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/contact');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/contact' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/contact' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/contact")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/contact"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/contact"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/contact")
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/customers/:customerId/contact') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/contact";
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}}/customers/:customerId/contact
http GET {{baseUrl}}/customers/:customerId/contact
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/contact
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/contact")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getContact.json#responseBody
GET
Returns contact of a given person.
{{baseUrl}}/customers/persons/:personId/contact
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId/contact");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/persons/:personId/contact")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId/contact"
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}}/customers/persons/:personId/contact"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId/contact");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId/contact"
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/customers/persons/:personId/contact HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/persons/:personId/contact")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId/contact"))
.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}}/customers/persons/:personId/contact")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/persons/:personId/contact")
.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}}/customers/persons/:personId/contact');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId/contact';
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}}/customers/persons/:personId/contact',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/contact")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId/contact',
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}}/customers/persons/:personId/contact'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/persons/:personId/contact');
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}}/customers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId/contact';
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}}/customers/persons/:personId/contact"]
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}}/customers/persons/:personId/contact" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId/contact",
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}}/customers/persons/:personId/contact');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId/contact');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId/contact');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId/contact' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId/contact' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/persons/:personId/contact")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId/contact"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId/contact"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId/contact")
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/customers/persons/:personId/contact') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId/contact";
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}}/customers/persons/:personId/contact
http GET {{baseUrl}}/customers/persons/:personId/contact
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/persons/:personId/contact
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId/contact")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/getContact.json#responseBody
GET
Returns correspondence address of a given client.
{{baseUrl}}/customers/:customerId/correspondenceAddress
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/correspondenceAddress");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/correspondenceAddress")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/correspondenceAddress"
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}}/customers/:customerId/correspondenceAddress"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/correspondenceAddress");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/correspondenceAddress"
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/customers/:customerId/correspondenceAddress HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/correspondenceAddress")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/correspondenceAddress"))
.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}}/customers/:customerId/correspondenceAddress")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/correspondenceAddress")
.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}}/customers/:customerId/correspondenceAddress');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/correspondenceAddress'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/correspondenceAddress';
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}}/customers/:customerId/correspondenceAddress',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/correspondenceAddress")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/correspondenceAddress',
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}}/customers/:customerId/correspondenceAddress'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/correspondenceAddress');
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}}/customers/:customerId/correspondenceAddress'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/correspondenceAddress';
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}}/customers/:customerId/correspondenceAddress"]
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}}/customers/:customerId/correspondenceAddress" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/correspondenceAddress",
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}}/customers/:customerId/correspondenceAddress');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/correspondenceAddress');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/correspondenceAddress');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/correspondenceAddress' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/correspondenceAddress' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/correspondenceAddress")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/correspondenceAddress"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/correspondenceAddress"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/correspondenceAddress")
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/customers/:customerId/correspondenceAddress') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/correspondenceAddress";
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}}/customers/:customerId/correspondenceAddress
http GET {{baseUrl}}/customers/:customerId/correspondenceAddress
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/correspondenceAddress
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/correspondenceAddress")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/address/getCorrespondenceAddress.json#responseBody
GET
Returns custom field of a given client.
{{baseUrl}}/customers/:customerId/customFields/:customFieldKey
QUERY PARAMS
customerId
customFieldKey
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
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}}/customers/:customerId/customFields/:customFieldKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
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/customers/:customerId/customFields/:customFieldKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"))
.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}}/customers/:customerId/customFields/:customFieldKey")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.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}}/customers/:customerId/customFields/:customFieldKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey';
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}}/customers/:customerId/customFields/:customFieldKey',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/customFields/:customFieldKey',
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}}/customers/:customerId/customFields/:customFieldKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
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}}/customers/:customerId/customFields/:customFieldKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey';
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}}/customers/:customerId/customFields/:customFieldKey"]
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}}/customers/:customerId/customFields/:customFieldKey" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/customFields/:customFieldKey",
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}}/customers/:customerId/customFields/:customFieldKey');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/customFields/:customFieldKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
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/customers/:customerId/customFields/:customFieldKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey";
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}}/customers/:customerId/customFields/:customFieldKey
http GET {{baseUrl}}/customers/:customerId/customFields/:customFieldKey
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/customFields/:customFieldKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getCustomField.json#responseBody
GET
Returns custom fields of a given client.
{{baseUrl}}/customers/:customerId/customFields
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/customFields")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/customFields"
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}}/customers/:customerId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/customFields"
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/customers/:customerId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/customFields"))
.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}}/customers/:customerId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/customFields")
.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}}/customers/:customerId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/customFields';
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}}/customers/:customerId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/customFields',
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}}/customers/:customerId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/customFields');
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}}/customers/:customerId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/customFields';
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}}/customers/:customerId/customFields"]
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}}/customers/:customerId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/customFields",
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}}/customers/:customerId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/customFields")
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/customers/:customerId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/customFields";
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}}/customers/:customerId/customFields
http GET {{baseUrl}}/customers/:customerId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getCustomFields.json#responseBody
GET
Returns custom fields of a given person.
{{baseUrl}}/customers/persons/:personId/customFields
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/persons/:personId/customFields")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId/customFields"
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}}/customers/persons/:personId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId/customFields"
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/customers/persons/:personId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/persons/:personId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId/customFields"))
.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}}/customers/persons/:personId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/persons/:personId/customFields")
.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}}/customers/persons/:personId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId/customFields';
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}}/customers/persons/:personId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId/customFields',
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}}/customers/persons/:personId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/persons/:personId/customFields');
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}}/customers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId/customFields';
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}}/customers/persons/:personId/customFields"]
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}}/customers/persons/:personId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId/customFields",
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}}/customers/persons/:personId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/persons/:personId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId/customFields")
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/customers/persons/:personId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId/customFields";
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}}/customers/persons/:personId/customFields
http GET {{baseUrl}}/customers/persons/:personId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/persons/:personId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/getCustomFields.json#responseBody
GET
Returns industries of a given client.
{{baseUrl}}/customers/:customerId/industries
QUERY PARAMS
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/industries");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/:customerId/industries")
require "http/client"
url = "{{baseUrl}}/customers/:customerId/industries"
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}}/customers/:customerId/industries"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/industries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/industries"
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/customers/:customerId/industries HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/:customerId/industries")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/industries"))
.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}}/customers/:customerId/industries")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/:customerId/industries")
.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}}/customers/:customerId/industries');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/customers/:customerId/industries'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/industries';
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}}/customers/:customerId/industries',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/industries")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/:customerId/industries',
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}}/customers/:customerId/industries'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/:customerId/industries');
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}}/customers/:customerId/industries'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/industries';
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}}/customers/:customerId/industries"]
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}}/customers/:customerId/industries" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/industries",
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}}/customers/:customerId/industries');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/industries');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/:customerId/industries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/:customerId/industries' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/industries' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/:customerId/industries")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/industries"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/industries"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/industries")
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/customers/:customerId/industries') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/industries";
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}}/customers/:customerId/industries
http GET {{baseUrl}}/customers/:customerId/industries
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/:customerId/industries
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/industries")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getIndustries.json#responseBody
GET
Returns list of simple clients representations
{{baseUrl}}/customers
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers")
require "http/client"
url = "{{baseUrl}}/customers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/customers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/customers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/customers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/customers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/customers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/customers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/customers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/customers');
echo $response->getBody();
setUrl('{{baseUrl}}/customers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/customers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/customers
http GET {{baseUrl}}/customers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/getAllNamesWithIds.json#responseBody
GET
Returns person details.
{{baseUrl}}/customers/persons/:personId
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/persons/:personId")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId"
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}}/customers/persons/:personId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId"
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/customers/persons/:personId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/persons/:personId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId"))
.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}}/customers/persons/:personId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/persons/:personId")
.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}}/customers/persons/:personId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/customers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId';
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}}/customers/persons/:personId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId',
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}}/customers/persons/:personId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/persons/:personId');
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}}/customers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId';
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}}/customers/persons/:personId"]
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}}/customers/persons/:personId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId",
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}}/customers/persons/:personId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/persons/:personId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId")
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/customers/persons/:personId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId";
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}}/customers/persons/:personId
http GET {{baseUrl}}/customers/persons/:personId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/persons/:personId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/getById.json#responseBody
GET
Returns persons' internal identifiers.
{{baseUrl}}/customers/persons/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/customers/persons/ids")
require "http/client"
url = "{{baseUrl}}/customers/persons/ids"
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}}/customers/persons/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/ids"
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/customers/persons/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/customers/persons/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/ids"))
.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}}/customers/persons/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/customers/persons/ids")
.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}}/customers/persons/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/customers/persons/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/ids';
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}}/customers/persons/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/ids',
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}}/customers/persons/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/customers/persons/ids');
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}}/customers/persons/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/ids';
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}}/customers/persons/ids"]
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}}/customers/persons/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/ids",
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}}/customers/persons/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/customers/persons/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/ids")
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/customers/persons/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/ids";
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}}/customers/persons/ids
http GET {{baseUrl}}/customers/persons/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/customers/persons/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/getIds.json#responseBody
PUT
Updates address of a given client.
{{baseUrl}}/customers/:customerId/address
QUERY PARAMS
customerId
BODY json
{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/address");
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 \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/address" {:content-type :json
:form-params {:addressLine1 ""
:addressLine2 ""
:city ""
:countryId 0
:postalCode ""
:provinceId 0
:sameAsBillingAddress false}})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/address"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/customers/:customerId/address"),
Content = new StringContent("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/address");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/address"
payload := strings.NewReader("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/customers/:customerId/address HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 150
{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/address")
.setHeader("content-type", "application/json")
.setBody("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/address"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/address")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/address")
.header("content-type", "application/json")
.body("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
.asString();
const data = JSON.stringify({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/address');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/address',
headers: {'content-type': 'application/json'},
data: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/address';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/customers/:customerId/address',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/address")
.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/customers/:customerId/address',
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({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/address',
headers: {'content-type': 'application/json'},
body: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/:customerId/address');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/address',
headers: {'content-type': 'application/json'},
data: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/address';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addressLine1": @"",
@"addressLine2": @"",
@"city": @"",
@"countryId": @0,
@"postalCode": @"",
@"provinceId": @0,
@"sameAsBillingAddress": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/address"]
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}}/customers/:customerId/address" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/address",
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([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/customers/:customerId/address', [
'body' => '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/address');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/address');
$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}}/customers/:customerId/address' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/address' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/address", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/address"
payload = {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/address"
payload <- "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/address")
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 \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/customers/:customerId/address') do |req|
req.body = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/address";
let payload = json!({
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/address \
--header 'content-type: application/json' \
--data '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
echo '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}' | \
http PUT {{baseUrl}}/customers/:customerId/address \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n}' \
--output-document \
- {{baseUrl}}/customers/:customerId/address
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/address")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/address/updateAddress.json#responseBody
PUT
Updates an existing client.
{{baseUrl}}/customers/:customerId
QUERY PARAMS
customerId
BODY json
{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId");
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 \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId" {:content-type :json
:form-params {:accountOnCustomerServer ""
:accounting {:taxNumbers [{:number ""
:type ""}]}
:billingAddress {:addressLine1 ""
:addressLine2 ""
:city ""
:countryId 0
:postalCode ""
:provinceId 0
:sameAsBillingAddress false}
:branchId 0
:categoriesIds []
:clientFirstProjectDate ""
:clientFirstQuoteDate ""
:clientLastProjectDate ""
:clientLastQuoteDate ""
:clientNumberOfProjects 0
:clientNumberOfQuotes 0
:contact {:emails {:additional []
:cc []
:primary ""}
:fax ""
:phones []
:sms ""
:websites []}
:contractNumber ""
:correspondenceAddress {}
:customFields [{:key ""
:name ""
:type ""
:value {}}]
:fullName ""
:id 0
:idNumber ""
:industriesIds []
:leadSourceId 0
:limitAccessToPeopleResponsible false
:name ""
:notes ""
:persons [{:active false
:contact {:emails {:additional []
:primary ""}
:fax ""
:phones []
:sms ""}
:customFields [{}]
:customerId 0
:firstProjectDate ""
:firstQuoteDate ""
:gender ""
:id 0
:lastName ""
:lastProjectDate ""
:lastQuoteDate ""
:motherTonguesIds []
:name ""
:numberOfProjects 0
:numberOfQuotes 0
:positionId 0}]
:responsiblePersons {:accountManagerId 0
:projectCoordinatorId 0
:projectManagerId 0
:salesPersonId 0}
:salesNotes ""
:status ""}})
require "http/client"
url = "{{baseUrl}}/customers/:customerId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers/:customerId"),
Content = new StringContent("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers/:customerId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId"
payload := strings.NewReader("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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/customers/:customerId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1811
{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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 \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId")
.header("content-type", "application/json")
.body("{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountOnCustomerServer: '',
accounting: {
taxNumbers: [
{
number: '',
type: ''
}
]
},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {
emails: {
additional: [],
primary: ''
},
fax: '',
phones: [],
sms: ''
},
customFields: [
{}
],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountOnCustomerServer":"","accounting":{"taxNumbers":[{"number":"","type":""}]},"billingAddress":{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false},"branchId":0,"categoriesIds":[],"clientFirstProjectDate":"","clientFirstQuoteDate":"","clientLastProjectDate":"","clientLastQuoteDate":"","clientNumberOfProjects":0,"clientNumberOfQuotes":0,"contact":{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]},"contractNumber":"","correspondenceAddress":{},"customFields":[{"key":"","name":"","type":"","value":{}}],"fullName":"","id":0,"idNumber":"","industriesIds":[],"leadSourceId":0,"limitAccessToPeopleResponsible":false,"name":"","notes":"","persons":[{"active":false,"contact":{"emails":{"additional":[],"primary":""},"fax":"","phones":[],"sms":""},"customFields":[{}],"customerId":0,"firstProjectDate":"","firstQuoteDate":"","gender":"","id":0,"lastName":"","lastProjectDate":"","lastQuoteDate":"","motherTonguesIds":[],"name":"","numberOfProjects":0,"numberOfQuotes":0,"positionId":0}],"responsiblePersons":{"accountManagerId":0,"projectCoordinatorId":0,"projectManagerId":0,"salesPersonId":0},"salesNotes":"","status":""}'
};
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}}/customers/:customerId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountOnCustomerServer": "",\n "accounting": {\n "taxNumbers": [\n {\n "number": "",\n "type": ""\n }\n ]\n },\n "billingAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n },\n "branchId": 0,\n "categoriesIds": [],\n "clientFirstProjectDate": "",\n "clientFirstQuoteDate": "",\n "clientLastProjectDate": "",\n "clientLastQuoteDate": "",\n "clientNumberOfProjects": 0,\n "clientNumberOfQuotes": 0,\n "contact": {\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\n },\n "contractNumber": "",\n "correspondenceAddress": {},\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "fullName": "",\n "id": 0,\n "idNumber": "",\n "industriesIds": [],\n "leadSourceId": 0,\n "limitAccessToPeopleResponsible": false,\n "name": "",\n "notes": "",\n "persons": [\n {\n "active": false,\n "contact": {\n "emails": {\n "additional": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": ""\n },\n "customFields": [\n {}\n ],\n "customerId": 0,\n "firstProjectDate": "",\n "firstQuoteDate": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "lastProjectDate": "",\n "lastQuoteDate": "",\n "motherTonguesIds": [],\n "name": "",\n "numberOfProjects": 0,\n "numberOfQuotes": 0,\n "positionId": 0\n }\n ],\n "responsiblePersons": {\n "accountManagerId": 0,\n "projectCoordinatorId": 0,\n "projectManagerId": 0,\n "salesPersonId": 0\n },\n "salesNotes": "",\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId")
.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/customers/:customerId',
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({
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId',
headers: {'content-type': 'application/json'},
body: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
},
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}}/customers/:customerId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountOnCustomerServer: '',
accounting: {
taxNumbers: [
{
number: '',
type: ''
}
]
},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {
emails: {
additional: [],
primary: ''
},
fax: '',
phones: [],
sms: ''
},
customFields: [
{}
],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
});
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}}/customers/:customerId',
headers: {'content-type': 'application/json'},
data: {
accountOnCustomerServer: '',
accounting: {taxNumbers: [{number: '', type: ''}]},
billingAddress: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
branchId: 0,
categoriesIds: [],
clientFirstProjectDate: '',
clientFirstQuoteDate: '',
clientLastProjectDate: '',
clientLastQuoteDate: '',
clientNumberOfProjects: 0,
clientNumberOfQuotes: 0,
contact: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
contractNumber: '',
correspondenceAddress: {},
customFields: [{key: '', name: '', type: '', value: {}}],
fullName: '',
id: 0,
idNumber: '',
industriesIds: [],
leadSourceId: 0,
limitAccessToPeopleResponsible: false,
name: '',
notes: '',
persons: [
{
active: false,
contact: {emails: {additional: [], primary: ''}, fax: '', phones: [], sms: ''},
customFields: [{}],
customerId: 0,
firstProjectDate: '',
firstQuoteDate: '',
gender: '',
id: 0,
lastName: '',
lastProjectDate: '',
lastQuoteDate: '',
motherTonguesIds: [],
name: '',
numberOfProjects: 0,
numberOfQuotes: 0,
positionId: 0
}
],
responsiblePersons: {
accountManagerId: 0,
projectCoordinatorId: 0,
projectManagerId: 0,
salesPersonId: 0
},
salesNotes: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountOnCustomerServer":"","accounting":{"taxNumbers":[{"number":"","type":""}]},"billingAddress":{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false},"branchId":0,"categoriesIds":[],"clientFirstProjectDate":"","clientFirstQuoteDate":"","clientLastProjectDate":"","clientLastQuoteDate":"","clientNumberOfProjects":0,"clientNumberOfQuotes":0,"contact":{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]},"contractNumber":"","correspondenceAddress":{},"customFields":[{"key":"","name":"","type":"","value":{}}],"fullName":"","id":0,"idNumber":"","industriesIds":[],"leadSourceId":0,"limitAccessToPeopleResponsible":false,"name":"","notes":"","persons":[{"active":false,"contact":{"emails":{"additional":[],"primary":""},"fax":"","phones":[],"sms":""},"customFields":[{}],"customerId":0,"firstProjectDate":"","firstQuoteDate":"","gender":"","id":0,"lastName":"","lastProjectDate":"","lastQuoteDate":"","motherTonguesIds":[],"name":"","numberOfProjects":0,"numberOfQuotes":0,"positionId":0}],"responsiblePersons":{"accountManagerId":0,"projectCoordinatorId":0,"projectManagerId":0,"salesPersonId":0},"salesNotes":"","status":""}'
};
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 = @{ @"accountOnCustomerServer": @"",
@"accounting": @{ @"taxNumbers": @[ @{ @"number": @"", @"type": @"" } ] },
@"billingAddress": @{ @"addressLine1": @"", @"addressLine2": @"", @"city": @"", @"countryId": @0, @"postalCode": @"", @"provinceId": @0, @"sameAsBillingAddress": @NO },
@"branchId": @0,
@"categoriesIds": @[ ],
@"clientFirstProjectDate": @"",
@"clientFirstQuoteDate": @"",
@"clientLastProjectDate": @"",
@"clientLastQuoteDate": @"",
@"clientNumberOfProjects": @0,
@"clientNumberOfQuotes": @0,
@"contact": @{ @"emails": @{ @"additional": @[ ], @"cc": @[ ], @"primary": @"" }, @"fax": @"", @"phones": @[ ], @"sms": @"", @"websites": @[ ] },
@"contractNumber": @"",
@"correspondenceAddress": @{ },
@"customFields": @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ],
@"fullName": @"",
@"id": @0,
@"idNumber": @"",
@"industriesIds": @[ ],
@"leadSourceId": @0,
@"limitAccessToPeopleResponsible": @NO,
@"name": @"",
@"notes": @"",
@"persons": @[ @{ @"active": @NO, @"contact": @{ @"emails": @{ @"additional": @[ ], @"primary": @"" }, @"fax": @"", @"phones": @[ ], @"sms": @"" }, @"customFields": @[ @{ } ], @"customerId": @0, @"firstProjectDate": @"", @"firstQuoteDate": @"", @"gender": @"", @"id": @0, @"lastName": @"", @"lastProjectDate": @"", @"lastQuoteDate": @"", @"motherTonguesIds": @[ ], @"name": @"", @"numberOfProjects": @0, @"numberOfQuotes": @0, @"positionId": @0 } ],
@"responsiblePersons": @{ @"accountManagerId": @0, @"projectCoordinatorId": @0, @"projectManagerId": @0, @"salesPersonId": @0 },
@"salesNotes": @"",
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId"]
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}}/customers/:customerId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId",
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([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]),
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}}/customers/:customerId', [
'body' => '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountOnCustomerServer' => '',
'accounting' => [
'taxNumbers' => [
[
'number' => '',
'type' => ''
]
]
],
'billingAddress' => [
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
],
'branchId' => 0,
'categoriesIds' => [
],
'clientFirstProjectDate' => '',
'clientFirstQuoteDate' => '',
'clientLastProjectDate' => '',
'clientLastQuoteDate' => '',
'clientNumberOfProjects' => 0,
'clientNumberOfQuotes' => 0,
'contact' => [
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
],
'contractNumber' => '',
'correspondenceAddress' => [
],
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'fullName' => '',
'id' => 0,
'idNumber' => '',
'industriesIds' => [
],
'leadSourceId' => 0,
'limitAccessToPeopleResponsible' => null,
'name' => '',
'notes' => '',
'persons' => [
[
'active' => null,
'contact' => [
'emails' => [
'additional' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => ''
],
'customFields' => [
[
]
],
'customerId' => 0,
'firstProjectDate' => '',
'firstQuoteDate' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'lastProjectDate' => '',
'lastQuoteDate' => '',
'motherTonguesIds' => [
],
'name' => '',
'numberOfProjects' => 0,
'numberOfQuotes' => 0,
'positionId' => 0
]
],
'responsiblePersons' => [
'accountManagerId' => 0,
'projectCoordinatorId' => 0,
'projectManagerId' => 0,
'salesPersonId' => 0
],
'salesNotes' => '',
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId');
$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}}/customers/:customerId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId"
payload = {
"accountOnCustomerServer": "",
"accounting": { "taxNumbers": [
{
"number": "",
"type": ""
}
] },
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": False
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": False,
"name": "",
"notes": "",
"persons": [
{
"active": False,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [{}],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId"
payload <- "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers/:customerId")
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 \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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/customers/:customerId') do |req|
req.body = "{\n \"accountOnCustomerServer\": \"\",\n \"accounting\": {\n \"taxNumbers\": [\n {\n \"number\": \"\",\n \"type\": \"\"\n }\n ]\n },\n \"billingAddress\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n },\n \"branchId\": 0,\n \"categoriesIds\": [],\n \"clientFirstProjectDate\": \"\",\n \"clientFirstQuoteDate\": \"\",\n \"clientLastProjectDate\": \"\",\n \"clientLastQuoteDate\": \"\",\n \"clientNumberOfProjects\": 0,\n \"clientNumberOfQuotes\": 0,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n },\n \"contractNumber\": \"\",\n \"correspondenceAddress\": {},\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"fullName\": \"\",\n \"id\": 0,\n \"idNumber\": \"\",\n \"industriesIds\": [],\n \"leadSourceId\": 0,\n \"limitAccessToPeopleResponsible\": false,\n \"name\": \"\",\n \"notes\": \"\",\n \"persons\": [\n {\n \"active\": false,\n \"contact\": {\n \"emails\": {\n \"additional\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\"\n },\n \"customFields\": [\n {}\n ],\n \"customerId\": 0,\n \"firstProjectDate\": \"\",\n \"firstQuoteDate\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"lastProjectDate\": \"\",\n \"lastQuoteDate\": \"\",\n \"motherTonguesIds\": [],\n \"name\": \"\",\n \"numberOfProjects\": 0,\n \"numberOfQuotes\": 0,\n \"positionId\": 0\n }\n ],\n \"responsiblePersons\": {\n \"accountManagerId\": 0,\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0,\n \"salesPersonId\": 0\n },\n \"salesNotes\": \"\",\n \"status\": \"\"\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}}/customers/:customerId";
let payload = json!({
"accountOnCustomerServer": "",
"accounting": json!({"taxNumbers": (
json!({
"number": "",
"type": ""
})
)}),
"billingAddress": json!({
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}),
"branchId": 0,
"categoriesIds": (),
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": json!({
"emails": json!({
"additional": (),
"cc": (),
"primary": ""
}),
"fax": "",
"phones": (),
"sms": "",
"websites": ()
}),
"contractNumber": "",
"correspondenceAddress": json!({}),
"customFields": (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
),
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": (),
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": (
json!({
"active": false,
"contact": json!({
"emails": json!({
"additional": (),
"primary": ""
}),
"fax": "",
"phones": (),
"sms": ""
}),
"customFields": (json!({})),
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": (),
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
})
),
"responsiblePersons": json!({
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
}),
"salesNotes": "",
"status": ""
});
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}}/customers/:customerId \
--header 'content-type: application/json' \
--data '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}'
echo '{
"accountOnCustomerServer": "",
"accounting": {
"taxNumbers": [
{
"number": "",
"type": ""
}
]
},
"billingAddress": {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
},
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
},
"contractNumber": "",
"correspondenceAddress": {},
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
{
"active": false,
"contact": {
"emails": {
"additional": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": ""
},
"customFields": [
{}
],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
}
],
"responsiblePersons": {
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
},
"salesNotes": "",
"status": ""
}' | \
http PUT {{baseUrl}}/customers/:customerId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountOnCustomerServer": "",\n "accounting": {\n "taxNumbers": [\n {\n "number": "",\n "type": ""\n }\n ]\n },\n "billingAddress": {\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n },\n "branchId": 0,\n "categoriesIds": [],\n "clientFirstProjectDate": "",\n "clientFirstQuoteDate": "",\n "clientLastProjectDate": "",\n "clientLastQuoteDate": "",\n "clientNumberOfProjects": 0,\n "clientNumberOfQuotes": 0,\n "contact": {\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\n },\n "contractNumber": "",\n "correspondenceAddress": {},\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "fullName": "",\n "id": 0,\n "idNumber": "",\n "industriesIds": [],\n "leadSourceId": 0,\n "limitAccessToPeopleResponsible": false,\n "name": "",\n "notes": "",\n "persons": [\n {\n "active": false,\n "contact": {\n "emails": {\n "additional": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": ""\n },\n "customFields": [\n {}\n ],\n "customerId": 0,\n "firstProjectDate": "",\n "firstQuoteDate": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "lastProjectDate": "",\n "lastQuoteDate": "",\n "motherTonguesIds": [],\n "name": "",\n "numberOfProjects": 0,\n "numberOfQuotes": 0,\n "positionId": 0\n }\n ],\n "responsiblePersons": {\n "accountManagerId": 0,\n "projectCoordinatorId": 0,\n "projectManagerId": 0,\n "salesPersonId": 0\n },\n "salesNotes": "",\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/customers/:customerId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountOnCustomerServer": "",
"accounting": ["taxNumbers": [
[
"number": "",
"type": ""
]
]],
"billingAddress": [
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
],
"branchId": 0,
"categoriesIds": [],
"clientFirstProjectDate": "",
"clientFirstQuoteDate": "",
"clientLastProjectDate": "",
"clientLastQuoteDate": "",
"clientNumberOfProjects": 0,
"clientNumberOfQuotes": 0,
"contact": [
"emails": [
"additional": [],
"cc": [],
"primary": ""
],
"fax": "",
"phones": [],
"sms": "",
"websites": []
],
"contractNumber": "",
"correspondenceAddress": [],
"customFields": [
[
"key": "",
"name": "",
"type": "",
"value": []
]
],
"fullName": "",
"id": 0,
"idNumber": "",
"industriesIds": [],
"leadSourceId": 0,
"limitAccessToPeopleResponsible": false,
"name": "",
"notes": "",
"persons": [
[
"active": false,
"contact": [
"emails": [
"additional": [],
"primary": ""
],
"fax": "",
"phones": [],
"sms": ""
],
"customFields": [[]],
"customerId": 0,
"firstProjectDate": "",
"firstQuoteDate": "",
"gender": "",
"id": 0,
"lastName": "",
"lastProjectDate": "",
"lastQuoteDate": "",
"motherTonguesIds": [],
"name": "",
"numberOfProjects": 0,
"numberOfQuotes": 0,
"positionId": 0
]
],
"responsiblePersons": [
"accountManagerId": 0,
"projectCoordinatorId": 0,
"projectManagerId": 0,
"salesPersonId": 0
],
"salesNotes": "",
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/update.json#responseBody
PUT
Updates an existing person.
{{baseUrl}}/customers/persons/:personId
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/persons/:personId")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/customers/persons/:personId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/customers/persons/:personId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/persons/:personId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/persons/:personId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/persons/:personId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/customers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId';
const options = {method: 'PUT'};
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}}/customers/persons/:personId',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId',
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: 'PUT', url: '{{baseUrl}}/customers/persons/:personId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/persons/:personId');
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}}/customers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId';
const options = {method: 'PUT'};
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}}/customers/persons/:personId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/customers/persons/:personId" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/customers/persons/:personId');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/customers/persons/:personId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/customers/persons/:personId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/persons/:personId
http PUT {{baseUrl}}/customers/persons/:personId
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/customers/persons/:personId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/update.json#responseBody
PUT
Updates categories of a given client.
{{baseUrl}}/customers/:customerId/categories
QUERY PARAMS
customerId
BODY json
[
{}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/categories");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "[\n {}\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/categories" {:content-type :json
:form-params [{}]})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/categories"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\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}}/customers/:customerId/categories"),
Content = new StringContent("[\n {}\n]")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/categories");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {}\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/categories"
payload := strings.NewReader("[\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/customers/:customerId/categories HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 8
[
{}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/categories")
.setHeader("content-type", "application/json")
.setBody("[\n {}\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/categories"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {}\n]"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[\n {}\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/categories")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/categories")
.header("content-type", "application/json")
.body("[\n {}\n]")
.asString();
const data = JSON.stringify([
{}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/categories');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/categories',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/categories';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/customers/:customerId/categories',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {}\n]'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "[\n {}\n]")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/categories")
.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/customers/:customerId/categories',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify([{}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/categories',
headers: {'content-type': 'application/json'},
body: [{}],
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/:customerId/categories');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{}
]);
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/categories',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/categories';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @[ @{ } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/categories"]
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}}/customers/:customerId/categories" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {}\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/categories",
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([
[
]
]),
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}}/customers/:customerId/categories', [
'body' => '[
{}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/categories');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
]
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/categories');
$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}}/customers/:customerId/categories' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/categories' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {}\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/categories", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/categories"
payload = [{}]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/categories"
payload <- "[\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}}/customers/:customerId/categories")
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]"
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/customers/:customerId/categories') do |req|
req.body = "[\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}}/customers/:customerId/categories";
let payload = (json!({}));
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/categories \
--header 'content-type: application/json' \
--data '[
{}
]'
echo '[
{}
]' | \
http PUT {{baseUrl}}/customers/:customerId/categories \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {}\n]' \
--output-document \
- {{baseUrl}}/customers/:customerId/categories
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [[]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/categories")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/updateCategories.json#responseBody
PUT
Updates contact of a given client.
{{baseUrl}}/customers/:customerId/contact
QUERY PARAMS
customerId
BODY json
{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/contact");
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 \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/contact" {:content-type :json
:form-params {:emails {:additional []
:cc []
:primary ""}
:fax ""
:phones []
:sms ""
:websites []}})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/contact"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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}}/customers/:customerId/contact"),
Content = new StringContent("{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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}}/customers/:customerId/contact");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/contact"
payload := strings.NewReader("{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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/customers/:customerId/contact HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 135
{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/contact")
.setHeader("content-type", "application/json")
.setBody("{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/contact"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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 \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/contact")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/contact")
.header("content-type", "application/json")
.body("{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}")
.asString();
const data = JSON.stringify({
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/contact');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/contact',
headers: {'content-type': 'application/json'},
data: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/contact';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]}'
};
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}}/customers/:customerId/contact',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\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 \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/contact")
.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/customers/:customerId/contact',
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: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/contact',
headers: {'content-type': 'application/json'},
body: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
},
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}}/customers/:customerId/contact');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
emails: {
additional: [],
cc: [],
primary: ''
},
fax: '',
phones: [],
sms: '',
websites: []
});
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}}/customers/:customerId/contact',
headers: {'content-type': 'application/json'},
data: {
emails: {additional: [], cc: [], primary: ''},
fax: '',
phones: [],
sms: '',
websites: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/contact';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"emails":{"additional":[],"cc":[],"primary":""},"fax":"","phones":[],"sms":"","websites":[]}'
};
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": @{ @"additional": @[ ], @"cc": @[ ], @"primary": @"" },
@"fax": @"",
@"phones": @[ ],
@"sms": @"",
@"websites": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/contact"]
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}}/customers/:customerId/contact" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/contact",
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([
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
]),
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}}/customers/:customerId/contact', [
'body' => '{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/contact');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'emails' => [
'additional' => [
],
'cc' => [
],
'primary' => ''
],
'fax' => '',
'phones' => [
],
'sms' => '',
'websites' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/contact');
$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}}/customers/:customerId/contact' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/contact' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/contact", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/contact"
payload = {
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/contact"
payload <- "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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}}/customers/:customerId/contact")
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 \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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/customers/:customerId/contact') do |req|
req.body = "{\n \"emails\": {\n \"additional\": [],\n \"cc\": [],\n \"primary\": \"\"\n },\n \"fax\": \"\",\n \"phones\": [],\n \"sms\": \"\",\n \"websites\": []\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}}/customers/:customerId/contact";
let payload = json!({
"emails": json!({
"additional": (),
"cc": (),
"primary": ""
}),
"fax": "",
"phones": (),
"sms": "",
"websites": ()
});
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}}/customers/:customerId/contact \
--header 'content-type: application/json' \
--data '{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}'
echo '{
"emails": {
"additional": [],
"cc": [],
"primary": ""
},
"fax": "",
"phones": [],
"sms": "",
"websites": []
}' | \
http PUT {{baseUrl}}/customers/:customerId/contact \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "emails": {\n "additional": [],\n "cc": [],\n "primary": ""\n },\n "fax": "",\n "phones": [],\n "sms": "",\n "websites": []\n}' \
--output-document \
- {{baseUrl}}/customers/:customerId/contact
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"emails": [
"additional": [],
"cc": [],
"primary": ""
],
"fax": "",
"phones": [],
"sms": "",
"websites": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/contact")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/updateContact.json#responseBody
PUT
Updates contact of a given person.
{{baseUrl}}/customers/persons/:personId/contact
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId/contact");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/persons/:personId/contact")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId/contact"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/customers/persons/:personId/contact"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId/contact");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId/contact"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/customers/persons/:personId/contact HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/persons/:personId/contact")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId/contact"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/contact")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/persons/:personId/contact")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/persons/:personId/contact');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId/contact';
const options = {method: 'PUT'};
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}}/customers/persons/:personId/contact',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/contact")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId/contact',
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: 'PUT',
url: '{{baseUrl}}/customers/persons/:personId/contact'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/persons/:personId/contact');
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}}/customers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId/contact';
const options = {method: 'PUT'};
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}}/customers/persons/:personId/contact"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/customers/persons/:personId/contact" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/customers/persons/:personId/contact');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId/contact');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId/contact');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId/contact' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId/contact' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/customers/persons/:personId/contact")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId/contact"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId/contact"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/customers/persons/:personId/contact') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId/contact";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/persons/:personId/contact
http PUT {{baseUrl}}/customers/persons/:personId/contact
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/customers/persons/:personId/contact
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId/contact")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/updateContact.json#responseBody
PUT
Updates correspondence address of a given client.
{{baseUrl}}/customers/:customerId/correspondenceAddress
QUERY PARAMS
customerId
BODY json
{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/correspondenceAddress");
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 \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/correspondenceAddress" {:content-type :json
:form-params {:addressLine1 ""
:addressLine2 ""
:city ""
:countryId 0
:postalCode ""
:provinceId 0
:sameAsBillingAddress false}})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/correspondenceAddress"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/customers/:customerId/correspondenceAddress"),
Content = new StringContent("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/correspondenceAddress");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/correspondenceAddress"
payload := strings.NewReader("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/customers/:customerId/correspondenceAddress HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 150
{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/correspondenceAddress")
.setHeader("content-type", "application/json")
.setBody("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/correspondenceAddress"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/correspondenceAddress")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/correspondenceAddress")
.header("content-type", "application/json")
.body("{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
.asString();
const data = JSON.stringify({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/correspondenceAddress');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/correspondenceAddress',
headers: {'content-type': 'application/json'},
data: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/correspondenceAddress';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/customers/:customerId/correspondenceAddress',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/correspondenceAddress")
.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/customers/:customerId/correspondenceAddress',
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({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/correspondenceAddress',
headers: {'content-type': 'application/json'},
body: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/:customerId/correspondenceAddress');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/correspondenceAddress',
headers: {'content-type': 'application/json'},
data: {
addressLine1: '',
addressLine2: '',
city: '',
countryId: 0,
postalCode: '',
provinceId: 0,
sameAsBillingAddress: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/correspondenceAddress';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"addressLine1":"","addressLine2":"","city":"","countryId":0,"postalCode":"","provinceId":0,"sameAsBillingAddress":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addressLine1": @"",
@"addressLine2": @"",
@"city": @"",
@"countryId": @0,
@"postalCode": @"",
@"provinceId": @0,
@"sameAsBillingAddress": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/correspondenceAddress"]
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}}/customers/:customerId/correspondenceAddress" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/correspondenceAddress",
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([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/customers/:customerId/correspondenceAddress', [
'body' => '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/correspondenceAddress');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addressLine1' => '',
'addressLine2' => '',
'city' => '',
'countryId' => 0,
'postalCode' => '',
'provinceId' => 0,
'sameAsBillingAddress' => null
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/correspondenceAddress');
$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}}/customers/:customerId/correspondenceAddress' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/correspondenceAddress' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/correspondenceAddress", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/correspondenceAddress"
payload = {
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/correspondenceAddress"
payload <- "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/:customerId/correspondenceAddress")
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 \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/customers/:customerId/correspondenceAddress') do |req|
req.body = "{\n \"addressLine1\": \"\",\n \"addressLine2\": \"\",\n \"city\": \"\",\n \"countryId\": 0,\n \"postalCode\": \"\",\n \"provinceId\": 0,\n \"sameAsBillingAddress\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/:customerId/correspondenceAddress";
let payload = json!({
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/correspondenceAddress \
--header 'content-type: application/json' \
--data '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}'
echo '{
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
}' | \
http PUT {{baseUrl}}/customers/:customerId/correspondenceAddress \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "addressLine1": "",\n "addressLine2": "",\n "city": "",\n "countryId": 0,\n "postalCode": "",\n "provinceId": 0,\n "sameAsBillingAddress": false\n}' \
--output-document \
- {{baseUrl}}/customers/:customerId/correspondenceAddress
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"addressLine1": "",
"addressLine2": "",
"city": "",
"countryId": 0,
"postalCode": "",
"provinceId": 0,
"sameAsBillingAddress": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/correspondenceAddress")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/address/updateCorrespondenceAddress.json#responseBody
PUT
Updates custom fields of a given client.
{{baseUrl}}/customers/:customerId/customFields
QUERY PARAMS
customerId
BODY json
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/customFields");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/customFields" {:content-type :json
:form-params [{:key ""
:name ""
:type ""
:value {}}]})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/customFields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields"),
Content = new StringContent("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/customFields"
payload := strings.NewReader("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/customers/:customerId/customFields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/customFields")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/customFields"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/customFields")
.header("content-type", "application/json")
.body("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.asString();
const data = JSON.stringify([
{
key: '',
name: '',
type: '',
value: {}
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/customFields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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}}/customers/:customerId/customFields',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields")
.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/customers/:customerId/customFields',
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([{key: '', name: '', type: '', value: {}}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/customFields',
headers: {'content-type': 'application/json'},
body: [{key: '', name: '', type: '', value: {}}],
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}}/customers/:customerId/customFields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
key: '',
name: '',
type: '',
value: {}
}
]);
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}}/customers/:customerId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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 = @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/customFields"]
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}}/customers/:customerId/customFields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/customFields",
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([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]),
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}}/customers/:customerId/customFields', [
'body' => '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/customFields');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/customFields');
$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}}/customers/:customerId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/customFields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/customFields"
payload = [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/customFields"
payload <- "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/customers/:customerId/customFields') do |req|
req.body = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields";
let payload = (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
);
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/customFields \
--header 'content-type: application/json' \
--data '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
echo '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]' | \
http PUT {{baseUrl}}/customers/:customerId/customFields \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n]' \
--output-document \
- {{baseUrl}}/customers/:customerId/customFields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"key": "",
"name": "",
"type": "",
"value": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/updateCustomFields.json#responseBody
PUT
Updates custom fields of a given person.
{{baseUrl}}/customers/persons/:personId/customFields
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/persons/:personId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/persons/:personId/customFields")
require "http/client"
url = "{{baseUrl}}/customers/persons/:personId/customFields"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/customers/persons/:personId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/persons/:personId/customFields");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/persons/:personId/customFields"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/customers/persons/:personId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/persons/:personId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/persons/:personId/customFields"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/customFields")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/persons/:personId/customFields")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/persons/:personId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/persons/:personId/customFields';
const options = {method: 'PUT'};
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}}/customers/persons/:personId/customFields',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/customers/persons/:personId/customFields")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/customers/persons/:personId/customFields',
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: 'PUT',
url: '{{baseUrl}}/customers/persons/:personId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/persons/:personId/customFields');
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}}/customers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/persons/:personId/customFields';
const options = {method: 'PUT'};
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}}/customers/persons/:personId/customFields"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/customers/persons/:personId/customFields" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/persons/:personId/customFields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/customers/persons/:personId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/customers/persons/:personId/customFields');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/customers/persons/:personId/customFields');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/customers/persons/:personId/customFields' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/persons/:personId/customFields' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/customers/persons/:personId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/persons/:personId/customFields"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/persons/:personId/customFields"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/customers/persons/:personId/customFields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/customers/persons/:personId/customFields') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/customers/persons/:personId/customFields";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/persons/:personId/customFields
http PUT {{baseUrl}}/customers/persons/:personId/customFields
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/customers/persons/:personId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/persons/:personId/customFields")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/persons/updateCustomFields.json#responseBody
PUT
Updates given custom field of a given client.
{{baseUrl}}/customers/:customerId/customFields/:customFieldKey
QUERY PARAMS
customerId
customFieldKey
BODY json
{
"key": "",
"name": "",
"type": "",
"value": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey" {:content-type :json
:form-params {:key ""
:name ""
:type ""
:value {}}})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields/:customFieldKey"),
Content = new StringContent("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields/:customFieldKey");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
payload := strings.NewReader("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/customers/:customerId/customFields/:customFieldKey HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"key": "",
"name": "",
"type": "",
"value": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.setHeader("content-type", "application/json")
.setBody("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.header("content-type", "application/json")
.body("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
.asString();
const data = JSON.stringify({
key: '',
name: '',
type: '',
value: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
data: {key: '', name: '', type: '', value: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"key":"","name":"","type":"","value":{}}'
};
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}}/customers/:customerId/customFields/:customFieldKey',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")
.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/customers/:customerId/customFields/:customFieldKey',
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({key: '', name: '', type: '', value: {}}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
body: {key: '', name: '', type: '', value: {}},
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}}/customers/:customerId/customFields/:customFieldKey');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
key: '',
name: '',
type: '',
value: {}
});
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}}/customers/:customerId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
data: {key: '', name: '', type: '', value: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"key":"","name":"","type":"","value":{}}'
};
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 = @{ @"key": @"",
@"name": @"",
@"type": @"",
@"value": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"]
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}}/customers/:customerId/customFields/:customFieldKey" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/customFields/:customFieldKey",
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([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]),
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}}/customers/:customerId/customFields/:customFieldKey', [
'body' => '{
"key": "",
"name": "",
"type": "",
"value": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/customFields/:customFieldKey');
$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}}/customers/:customerId/customFields/:customFieldKey' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/customFields/:customFieldKey' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/customFields/:customFieldKey", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
payload = {
"key": "",
"name": "",
"type": "",
"value": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey"
payload <- "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields/:customFieldKey")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/customers/:customerId/customFields/:customFieldKey') do |req|
req.body = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/customers/:customerId/customFields/:customFieldKey";
let payload = json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/customFields/:customFieldKey \
--header 'content-type: application/json' \
--data '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
echo '{
"key": "",
"name": "",
"type": "",
"value": {}
}' | \
http PUT {{baseUrl}}/customers/:customerId/customFields/:customFieldKey \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n}' \
--output-document \
- {{baseUrl}}/customers/:customerId/customFields/:customFieldKey
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"key": "",
"name": "",
"type": "",
"value": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/customFields/:customFieldKey")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/updateCustomField.json#responseBody
PUT
Updates industries of a given client.
{{baseUrl}}/customers/:customerId/industries
QUERY PARAMS
customerId
BODY json
[
{}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/customers/:customerId/industries");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "[\n {}\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/customers/:customerId/industries" {:content-type :json
:form-params [{}]})
require "http/client"
url = "{{baseUrl}}/customers/:customerId/industries"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\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}}/customers/:customerId/industries"),
Content = new StringContent("[\n {}\n]")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/customers/:customerId/industries");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {}\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/customers/:customerId/industries"
payload := strings.NewReader("[\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/customers/:customerId/industries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 8
[
{}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/customers/:customerId/industries")
.setHeader("content-type", "application/json")
.setBody("[\n {}\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/customers/:customerId/industries"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {}\n]"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[\n {}\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/customers/:customerId/industries")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/customers/:customerId/industries")
.header("content-type", "application/json")
.body("[\n {}\n]")
.asString();
const data = JSON.stringify([
{}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/customers/:customerId/industries');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/industries',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/customers/:customerId/industries';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/customers/:customerId/industries',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {}\n]'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "[\n {}\n]")
val request = Request.Builder()
.url("{{baseUrl}}/customers/:customerId/industries")
.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/customers/:customerId/industries',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify([{}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/industries',
headers: {'content-type': 'application/json'},
body: [{}],
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/customers/:customerId/industries');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{}
]);
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/customers/:customerId/industries',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/customers/:customerId/industries';
const options = {method: 'PUT', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @[ @{ } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/customers/:customerId/industries"]
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}}/customers/:customerId/industries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {}\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/customers/:customerId/industries",
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([
[
]
]),
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}}/customers/:customerId/industries', [
'body' => '[
{}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/customers/:customerId/industries');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
]
]));
$request->setRequestUrl('{{baseUrl}}/customers/:customerId/industries');
$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}}/customers/:customerId/industries' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/customers/:customerId/industries' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {}\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/customers/:customerId/industries", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/customers/:customerId/industries"
payload = [{}]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/customers/:customerId/industries"
payload <- "[\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}}/customers/:customerId/industries")
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]"
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/customers/:customerId/industries') do |req|
req.body = "[\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}}/customers/:customerId/industries";
let payload = (json!({}));
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/customers/:customerId/industries \
--header 'content-type: application/json' \
--data '[
{}
]'
echo '[
{}
]' | \
http PUT {{baseUrl}}/customers/:customerId/industries \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {}\n]' \
--output-document \
- {{baseUrl}}/customers/:customerId/industries
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [[]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/customers/:customerId/industries")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/customers/updateIndustries.json#responseBody
POST
Adding currency exchange rates.
{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate
QUERY PARAMS
isoCode
BODY json
{
"dateFrom": {
"value": 0
},
"exchangeRate": "",
"lastModification": {},
"originDetails": "",
"publicationDate": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate");
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, "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate" {:body "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
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}}/dictionaries/currency/:isoCode/exchangeRate"),
Content = new StringContent("/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
payload := strings.NewReader("/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody")
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/dictionaries/currency/:isoCode/exchangeRate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 83
/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.header("content-type", "application/json")
.body("/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody")
.asString();
const data = '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
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}}/dictionaries/currency/:isoCode/exchangeRate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.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/dictionaries/currency/:isoCode/exchangeRate',
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('/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody');
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}}/dictionaries/currency/:isoCode/exchangeRate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"]
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}}/dictionaries/currency/:isoCode/exchangeRate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody",
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}}/dictionaries/currency/:isoCode/exchangeRate', [
'body' => '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
$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}}/dictionaries/currency/:isoCode/exchangeRate' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/dictionaries/currency/:isoCode/exchangeRate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
payload = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
payload <- "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
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 = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
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/dictionaries/currency/:isoCode/exchangeRate') do |req|
req.body = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate";
let payload = "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody'
echo '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody' | \
http POST {{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody' \
--output-document \
- {{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/dictionaries/currency/createExchangeRate.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns currency exchange rates.
{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate
QUERY PARAMS
isoCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
require "http/client"
url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
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}}/dictionaries/currency/:isoCode/exchangeRate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
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/dictionaries/currency/:isoCode/exchangeRate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"))
.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}}/dictionaries/currency/:isoCode/exchangeRate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.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}}/dictionaries/currency/:isoCode/exchangeRate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate';
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}}/dictionaries/currency/:isoCode/exchangeRate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/currency/:isoCode/exchangeRate',
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}}/dictionaries/currency/:isoCode/exchangeRate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
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}}/dictionaries/currency/:isoCode/exchangeRate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate';
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}}/dictionaries/currency/:isoCode/exchangeRate"]
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}}/dictionaries/currency/:isoCode/exchangeRate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate",
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}}/dictionaries/currency/:isoCode/exchangeRate');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/currency/:isoCode/exchangeRate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")
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/dictionaries/currency/:isoCode/exchangeRate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate";
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}}/dictionaries/currency/:isoCode/exchangeRate
http GET {{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/currency/:isoCode/exchangeRate")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/currency/getByIsoCode.json#responseBody
GET
Returns active dictionary entities for all types.
{{baseUrl}}/dictionaries/active
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/active");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/active")
require "http/client"
url = "{{baseUrl}}/dictionaries/active"
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}}/dictionaries/active"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/active");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/active"
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/dictionaries/active HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/active")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/active"))
.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}}/dictionaries/active")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/active")
.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}}/dictionaries/active');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dictionaries/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/active';
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}}/dictionaries/active',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/active")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/active',
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}}/dictionaries/active'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dictionaries/active');
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}}/dictionaries/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/active';
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}}/dictionaries/active"]
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}}/dictionaries/active" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/active",
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}}/dictionaries/active');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/active');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/active');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/active' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/active' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/active")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/active"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/active"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/active")
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/dictionaries/active') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/active";
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}}/dictionaries/active
http GET {{baseUrl}}/dictionaries/active
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/active
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/active")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/map-active.json#responseBody
GET
Returns active services list
{{baseUrl}}/services/active
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/services/active");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/services/active")
require "http/client"
url = "{{baseUrl}}/services/active"
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}}/services/active"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/services/active");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/services/active"
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/services/active HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/services/active")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/services/active"))
.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}}/services/active")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/services/active")
.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}}/services/active');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/services/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/services/active';
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}}/services/active',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/services/active")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/services/active',
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}}/services/active'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/services/active');
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}}/services/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/services/active';
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}}/services/active"]
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}}/services/active" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/services/active",
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}}/services/active');
echo $response->getBody();
setUrl('{{baseUrl}}/services/active');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/services/active');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/services/active' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/services/active' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/services/active")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/services/active"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/services/active"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/services/active")
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/services/active') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/services/active";
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}}/services/active
http GET {{baseUrl}}/services/active
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/services/active
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/services/active")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/services/active-v1.json#responseBody
GET
Returns active values from a given dictionary.
{{baseUrl}}/dictionaries/:type/active
QUERY PARAMS
type
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/:type/active");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/:type/active")
require "http/client"
url = "{{baseUrl}}/dictionaries/:type/active"
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}}/dictionaries/:type/active"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/:type/active");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/:type/active"
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/dictionaries/:type/active HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/:type/active")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/:type/active"))
.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}}/dictionaries/:type/active")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/:type/active")
.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}}/dictionaries/:type/active');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dictionaries/:type/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/:type/active';
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}}/dictionaries/:type/active',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/:type/active")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/:type/active',
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}}/dictionaries/:type/active'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dictionaries/:type/active');
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}}/dictionaries/:type/active'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/:type/active';
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}}/dictionaries/:type/active"]
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}}/dictionaries/:type/active" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/:type/active",
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}}/dictionaries/:type/active');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/:type/active');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/:type/active');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/:type/active' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/:type/active' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/:type/active")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/:type/active"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/:type/active"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/:type/active")
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/dictionaries/:type/active') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/:type/active";
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}}/dictionaries/:type/active
http GET {{baseUrl}}/dictionaries/:type/active
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/:type/active
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/:type/active")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/currency-active-v1.json#responseBody
GET
Returns all values (both active and not active) from a given dictionary.
{{baseUrl}}/dictionaries/:type/all
QUERY PARAMS
type
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/:type/all");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/:type/all")
require "http/client"
url = "{{baseUrl}}/dictionaries/:type/all"
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}}/dictionaries/:type/all"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/:type/all");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/:type/all"
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/dictionaries/:type/all HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/:type/all")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/:type/all"))
.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}}/dictionaries/:type/all")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/:type/all")
.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}}/dictionaries/:type/all');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dictionaries/:type/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/:type/all';
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}}/dictionaries/:type/all',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/:type/all")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/:type/all',
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}}/dictionaries/:type/all'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dictionaries/:type/all');
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}}/dictionaries/:type/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/:type/all';
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}}/dictionaries/:type/all"]
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}}/dictionaries/:type/all" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/:type/all",
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}}/dictionaries/:type/all');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/:type/all');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/:type/all');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/:type/all' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/:type/all' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/:type/all")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/:type/all"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/:type/all"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/:type/all")
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/dictionaries/:type/all') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/:type/all";
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}}/dictionaries/:type/all
http GET {{baseUrl}}/dictionaries/:type/all
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/:type/all
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/:type/all")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/currency-all-v1.json#responseBody
GET
Returns dictionary entities for all types. Both active and not active ones.
{{baseUrl}}/dictionaries/all
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/all");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/all")
require "http/client"
url = "{{baseUrl}}/dictionaries/all"
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}}/dictionaries/all"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/all");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/all"
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/dictionaries/all HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/all")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/all"))
.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}}/dictionaries/all")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/all")
.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}}/dictionaries/all');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dictionaries/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/all';
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}}/dictionaries/all',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/all")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/all',
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}}/dictionaries/all'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dictionaries/all');
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}}/dictionaries/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/all';
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}}/dictionaries/all"]
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}}/dictionaries/all" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/all",
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}}/dictionaries/all');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/all');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/all');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/all' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/all' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/all")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/all"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/all"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/all")
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/dictionaries/all') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/all";
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}}/dictionaries/all
http GET {{baseUrl}}/dictionaries/all
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/all
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/all")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/map-all.json#responseBody
GET
Returns services list
{{baseUrl}}/services/all
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/services/all");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/services/all")
require "http/client"
url = "{{baseUrl}}/services/all"
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}}/services/all"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/services/all");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/services/all"
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/services/all HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/services/all")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/services/all"))
.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}}/services/all")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/services/all")
.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}}/services/all');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/services/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/services/all';
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}}/services/all',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/services/all")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/services/all',
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}}/services/all'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/services/all');
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}}/services/all'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/services/all';
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}}/services/all"]
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}}/services/all" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/services/all",
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}}/services/all');
echo $response->getBody();
setUrl('{{baseUrl}}/services/all');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/services/all');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/services/all' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/services/all' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/services/all")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/services/all"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/services/all"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/services/all")
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/services/all') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/services/all";
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}}/services/all
http GET {{baseUrl}}/services/all
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/services/all
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/services/all")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/services/all-v1.json#responseBody
GET
Returns specific value from a given dictionary.
{{baseUrl}}/dictionaries/:type/:id
QUERY PARAMS
type
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dictionaries/:type/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dictionaries/:type/:id")
require "http/client"
url = "{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dictionaries/:type/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dictionaries/:type/: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/dictionaries/:type/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dictionaries/:type/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dictionaries/:type/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dictionaries/:type/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dictionaries/:type/: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}}/dictionaries/:type/: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}}/dictionaries/:type/: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}}/dictionaries/:type/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/: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}}/dictionaries/:type/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/dictionaries/:type/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dictionaries/:type/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dictionaries/:type/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dictionaries/:type/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dictionaries/:type/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dictionaries/:type/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dictionaries/:type/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dictionaries/:type/: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/dictionaries/:type/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dictionaries/:type/: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}}/dictionaries/:type/:id
http GET {{baseUrl}}/dictionaries/:type/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dictionaries/:type/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dictionaries/:type/: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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/dictionaries/currency-v1.json#responseBody
POST
Uploads a temporary file (ie. for XML import). Returns token which can be used in other API calls.
{{baseUrl}}/files
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/files");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/files" {:multipart [{:name "file"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/files"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\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}}/files"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "file",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/files");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/files HTTP/1.1
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 113
-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/files")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/files"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/files")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/files")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('file', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/files');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/files',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/files';
const form = new FormData();
form.append('file', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('file', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/files',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/files")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/files',
headers: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/files',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {file: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/files');
req.headers({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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}}/files',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('file', '');
const url = '{{baseUrl}}/files';
const options = {method: 'POST'};
options.body = formData;
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": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"file", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/files"]
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}}/files" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/files', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/files');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/files');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/files' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/files' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/files", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/files"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/files"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/files') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/files";
let form = reqwest::multipart::Form::new()
.text("file", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/files \
--header 'content-type: multipart/form-data' \
--form file=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/files \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/files
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "file",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/files")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Assigns vendor to a job in a project.
{{baseUrl}}/jobs/:jobId/vendor
QUERY PARAMS
jobId
BODY json
{
"recalculateRates": false,
"vendorPriceProfileId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/vendor");
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, "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/jobs/:jobId/vendor" {:body "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/vendor"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
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}}/jobs/:jobId/vendor"),
Content = new StringContent("/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/vendor");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/vendor"
payload := strings.NewReader("/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody")
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/jobs/:jobId/vendor HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/jobs/:jobId/vendor")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/vendor"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/vendor")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/jobs/:jobId/vendor")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/jobs/:jobId/vendor');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/vendor';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
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}}/jobs/:jobId/vendor',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/vendor")
.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/jobs/:jobId/vendor',
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('/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/jobs/:jobId/vendor');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody');
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}}/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/vendor';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs/:jobId/vendor"]
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}}/jobs/:jobId/vendor" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/vendor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody",
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}}/jobs/:jobId/vendor', [
'body' => '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/vendor');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/jobs/:jobId/vendor');
$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}}/jobs/:jobId/vendor' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/vendor' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/jobs/:jobId/vendor", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/vendor"
payload = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/vendor"
payload <- "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/vendor")
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 = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
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/jobs/:jobId/vendor') do |req|
req.body = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody"
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}}/jobs/:jobId/vendor";
let payload = "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/jobs/:jobId/vendor \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody'
echo '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody' | \
http PUT {{baseUrl}}/jobs/:jobId/vendor \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody' \
--output-document \
- {{baseUrl}}/jobs/:jobId/vendor
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/jobs/assignVendor.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/vendor")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Changes job status if possible (400 Bad Request is returned otherwise).
{{baseUrl}}/jobs/:jobId/status
QUERY PARAMS
jobId
BODY json
{
"externalId": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/status");
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, "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/jobs/:jobId/status" {:body "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
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}}/jobs/:jobId/status"),
Content = new StringContent("/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/status");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/status"
payload := strings.NewReader("/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody")
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/jobs/:jobId/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/jobs/:jobId/status")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/status"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/status")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/jobs/:jobId/status")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/jobs/:jobId/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
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}}/jobs/:jobId/status',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/status")
.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/jobs/:jobId/status',
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('/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/jobs/:jobId/status');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody');
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}}/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs/:jobId/status"]
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}}/jobs/:jobId/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody",
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}}/jobs/:jobId/status', [
'body' => '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/status');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/jobs/:jobId/status');
$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}}/jobs/:jobId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/jobs/:jobId/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/status"
payload = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/status"
payload <- "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/status")
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 = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
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/jobs/:jobId/status') do |req|
req.body = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody"
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}}/jobs/:jobId/status";
let payload = "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/jobs/:jobId/status \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody'
echo '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody' | \
http PUT {{baseUrl}}/jobs/:jobId/status \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody' \
--output-document \
- {{baseUrl}}/jobs/:jobId/status
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/jobs/changeStatus.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns file metadata.
{{baseUrl}}/jobs/:jobId/files/:fileId
QUERY PARAMS
jobId
fileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/files/:fileId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/jobs/:jobId/files/:fileId")
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/files/:fileId"
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}}/jobs/:jobId/files/:fileId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/files/:fileId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/files/:fileId"
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/jobs/:jobId/files/:fileId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/jobs/:jobId/files/:fileId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/files/:fileId"))
.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}}/jobs/:jobId/files/:fileId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/jobs/:jobId/files/:fileId")
.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}}/jobs/:jobId/files/:fileId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/jobs/:jobId/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/files/:fileId';
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}}/jobs/:jobId/files/:fileId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/files/:fileId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs/:jobId/files/:fileId',
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}}/jobs/:jobId/files/:fileId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/jobs/:jobId/files/:fileId');
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}}/jobs/:jobId/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/files/:fileId';
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}}/jobs/:jobId/files/:fileId"]
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}}/jobs/:jobId/files/:fileId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/files/:fileId",
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}}/jobs/:jobId/files/:fileId');
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/files/:fileId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/jobs/:jobId/files/:fileId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs/:jobId/files/:fileId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/files/:fileId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/jobs/:jobId/files/:fileId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/files/:fileId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/files/:fileId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/files/:fileId")
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/jobs/:jobId/files/:fileId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs/:jobId/files/:fileId";
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}}/jobs/:jobId/files/:fileId
http GET {{baseUrl}}/jobs/:jobId/files/:fileId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/jobs/:jobId/files/:fileId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/files/:fileId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/jobs/getJobFileMetadata.json#responseBody
GET
Returns job details by jobId.
{{baseUrl}}/jobs/:jobId
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/jobs/:jobId")
require "http/client"
url = "{{baseUrl}}/jobs/:jobId"
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}}/jobs/:jobId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId"
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/jobs/:jobId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/jobs/:jobId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId"))
.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}}/jobs/:jobId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/jobs/:jobId")
.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}}/jobs/:jobId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId';
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}}/jobs/:jobId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs/:jobId',
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}}/jobs/:jobId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/jobs/:jobId');
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}}/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId';
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}}/jobs/:jobId"]
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}}/jobs/:jobId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId",
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}}/jobs/:jobId');
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/jobs/:jobId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs/:jobId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/jobs/:jobId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId")
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/jobs/:jobId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs/:jobId";
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}}/jobs/:jobId
http GET {{baseUrl}}/jobs/:jobId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/jobs/:jobId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/jobs/getJobDetails.json#responseBody
GET
Returns list of input and output files of a job.
{{baseUrl}}/jobs/:jobId/files
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/files");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/jobs/:jobId/files")
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/files"
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}}/jobs/:jobId/files"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/files");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/files"
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/jobs/:jobId/files HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/jobs/:jobId/files")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/files"))
.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}}/jobs/:jobId/files")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/jobs/:jobId/files")
.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}}/jobs/:jobId/files');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/jobs/:jobId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/files';
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}}/jobs/:jobId/files',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/files")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs/:jobId/files',
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}}/jobs/:jobId/files'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/jobs/:jobId/files');
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}}/jobs/:jobId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/files';
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}}/jobs/:jobId/files"]
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}}/jobs/:jobId/files" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/files",
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}}/jobs/:jobId/files');
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/files');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/jobs/:jobId/files');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs/:jobId/files' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/files' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/jobs/:jobId/files")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/files"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/files"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/files")
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/jobs/:jobId/files') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs/:jobId/files";
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}}/jobs/:jobId/files
http GET {{baseUrl}}/jobs/:jobId/files
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/jobs/:jobId/files
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/files")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/jobs/getJobFiles.json#responseBody
PUT
Updates dates of a given job.
{{baseUrl}}/jobs/:jobId/dates
QUERY PARAMS
jobId
BODY json
{
"actualEndDate": 0,
"actualStartDate": 0,
"deadline": 0,
"startDate": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/dates");
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, "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/jobs/:jobId/dates" {:body "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/dates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
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}}/jobs/:jobId/dates"),
Content = new StringContent("/home-api/assets/examples/v1/jobs/updateDates.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/dates");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/dates"
payload := strings.NewReader("/home-api/assets/examples/v1/jobs/updateDates.json#requestBody")
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/jobs/:jobId/dates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
/home-api/assets/examples/v1/jobs/updateDates.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/jobs/:jobId/dates")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/jobs/updateDates.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/dates"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/dates")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/jobs/:jobId/dates")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/jobs/updateDates.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/jobs/:jobId/dates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
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}}/jobs/:jobId/dates',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/dates")
.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/jobs/:jobId/dates',
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('/home-api/assets/examples/v1/jobs/updateDates.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/jobs/:jobId/dates');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/jobs/updateDates.json#requestBody');
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}}/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/jobs/updateDates.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs/:jobId/dates"]
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}}/jobs/:jobId/dates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody",
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}}/jobs/:jobId/dates', [
'body' => '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/dates');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/jobs/updateDates.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/jobs/updateDates.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/jobs/:jobId/dates');
$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}}/jobs/:jobId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/jobs/:jobId/dates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/dates"
payload = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/dates"
payload <- "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/dates")
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 = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
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/jobs/:jobId/dates') do |req|
req.body = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody"
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}}/jobs/:jobId/dates";
let payload = "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/jobs/:jobId/dates \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody'
echo '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody' | \
http PUT {{baseUrl}}/jobs/:jobId/dates \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/jobs/updateDates.json#requestBody' \
--output-document \
- {{baseUrl}}/jobs/:jobId/dates
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/jobs/updateDates.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/dates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates instructions for a job.
{{baseUrl}}/jobs/:jobId/instructions
QUERY PARAMS
jobId
BODY json
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/instructions");
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, "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/jobs/:jobId/instructions" {:body "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/instructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
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}}/jobs/:jobId/instructions"),
Content = new StringContent("/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/instructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/instructions"
payload := strings.NewReader("/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody")
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/jobs/:jobId/instructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/jobs/:jobId/instructions")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/instructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/instructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/jobs/:jobId/instructions")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/jobs/:jobId/instructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
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}}/jobs/:jobId/instructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/instructions")
.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/jobs/:jobId/instructions',
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('/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/jobs/:jobId/instructions');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody');
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}}/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs/:jobId/instructions"]
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}}/jobs/:jobId/instructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody",
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}}/jobs/:jobId/instructions', [
'body' => '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/instructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/jobs/:jobId/instructions');
$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}}/jobs/:jobId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/jobs/:jobId/instructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/instructions"
payload = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/instructions"
payload <- "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/instructions")
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 = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
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/jobs/:jobId/instructions') do |req|
req.body = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody"
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}}/jobs/:jobId/instructions";
let payload = "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/jobs/:jobId/instructions \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody'
echo '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody' | \
http PUT {{baseUrl}}/jobs/:jobId/instructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody' \
--output-document \
- {{baseUrl}}/jobs/:jobId/instructions
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/jobs/updateInstructionsForJob.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/instructions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
assignFileToJobOutput
{{baseUrl}}/jobs/:jobId/files/output
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId/files/output");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json;charset=UTF-8");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/jobs/:jobId/files/output" {:body "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/jobs/:jobId/files/output"
headers = HTTP::Headers{
"content-type" => "application/json;charset=UTF-8"
}
reqBody = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
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}}/jobs/:jobId/files/output"),
Content = new StringContent("/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId/files/output");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json;charset=UTF-8");
request.AddParameter("application/json;charset=UTF-8", "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId/files/output"
payload := strings.NewReader("/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/jobs/:jobId/files/output HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: example.com
Content-Length: 72
/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/jobs/:jobId/files/output")
.setHeader("content-type", "application/json;charset=UTF-8")
.setBody("/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId/files/output"))
.header("content-type", "application/json;charset=UTF-8")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/files/output")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/jobs/:jobId/files/output")
.header("content-type", "application/json;charset=UTF-8")
.body("/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/jobs/:jobId/files/output');
xhr.setRequestHeader('content-type', 'application/json;charset=UTF-8');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/jobs/:jobId/files/output',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId/files/output';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
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}}/jobs/:jobId/files/output',
method: 'POST',
headers: {
'content-type': 'application/json;charset=UTF-8'
},
data: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId/files/output")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs/:jobId/files/output',
headers: {
'content-type': 'application/json;charset=UTF-8'
}
};
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('/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/jobs/:jobId/files/output',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/jobs/:jobId/files/output');
req.headers({
'content-type': 'application/json;charset=UTF-8'
});
req.send('/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody');
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}}/jobs/:jobId/files/output',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId/files/output';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
};
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;charset=UTF-8" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs/:jobId/files/output"]
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}}/jobs/:jobId/files/output" in
let headers = Header.add (Header.init ()) "content-type" "application/json;charset=UTF-8" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId/files/output",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody",
CURLOPT_HTTPHEADER => [
"content-type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/jobs/:jobId/files/output', [
'body' => '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody',
'headers' => [
'content-type' => 'application/json;charset=UTF-8',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId/files/output');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$request->setBody('/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/jobs/:jobId/files/output');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs/:jobId/files/output' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId/files/output' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
headers = { 'content-type': "application/json;charset=UTF-8" }
conn.request("POST", "/baseUrl/jobs/:jobId/files/output", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId/files/output"
payload = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
headers = {"content-type": "application/json;charset=UTF-8"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId/files/output"
payload <- "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId/files/output")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json;charset=UTF-8'
request.body = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json;charset=UTF-8'}
)
response = conn.post('/baseUrl/jobs/:jobId/files/output') do |req|
req.body = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs/:jobId/files/output";
let payload = "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json;charset=UTF-8".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/jobs/:jobId/files/output \
--header 'content-type: application/json;charset=UTF-8' \
--data '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody'
echo '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody' | \
http POST {{baseUrl}}/jobs/:jobId/files/output \
content-type:'application/json;charset=UTF-8'
wget --quiet \
--method POST \
--header 'content-type: application/json;charset=UTF-8' \
--body-data '/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody' \
--output-document \
- {{baseUrl}}/jobs/:jobId/files/output
import Foundation
let headers = ["content-type": "application/json;charset=UTF-8"]
let postData = NSData(data: "/home-api/assets/examples/v1/jobs/assignFileToJobOutput.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId/files/output")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Adds file link to the project as a link delivered in the job.
{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink
QUERY PARAMS
jobId
BODY json
{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink");
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 \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink" {:content-type :json
:form-params {:fileLinks [{:category ""
:externalInfo {}
:filename ""
:languageCombinationIds [{:sourceLanguageId 0
:targetLanguageId 0}]
:languageIds []
:toBeGenerated false
:url ""}]}})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"),
Content = new StringContent("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"
payload := strings.NewReader("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/jobs/:jobId/files/delivered/addLink HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 305
{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")
.setHeader("content-type", "application/json")
.setBody("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")
.header("content-type", "application/json")
.body("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink',
headers: {'content-type': 'application/json'},
data: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fileLinks":[{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[],"toBeGenerated":false,"url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "fileLinks": [\n {\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": [],\n "toBeGenerated": false,\n "url": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")
.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/v2/jobs/:jobId/files/delivered/addLink',
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({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink',
headers: {'content-type': 'application/json'},
body: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: [],
toBeGenerated: false,
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: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink',
headers: {'content-type': 'application/json'},
data: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fileLinks":[{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[],"toBeGenerated":false,"url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"fileLinks": @[ @{ @"category": @"", @"externalInfo": @{ }, @"filename": @"", @"languageCombinationIds": @[ @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 } ], @"languageIds": @[ ], @"toBeGenerated": @NO, @"url": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"]
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}}/v2/jobs/:jobId/files/delivered/addLink" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink",
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([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink', [
'body' => '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink');
$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}}/v2/jobs/:jobId/files/delivered/addLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/jobs/:jobId/files/delivered/addLink", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"
payload = { "fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": False,
"url": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink"
payload <- "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")
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 \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/jobs/:jobId/files/delivered/addLink') do |req|
req.body = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink";
let payload = json!({"fileLinks": (
json!({
"category": "",
"externalInfo": json!({}),
"filename": "",
"languageCombinationIds": (
json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
})
),
"languageIds": (),
"toBeGenerated": false,
"url": ""
})
)});
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}}/v2/jobs/:jobId/files/delivered/addLink \
--header 'content-type: application/json' \
--data '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
echo '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}' | \
http POST {{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "fileLinks": [\n {\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": [],\n "toBeGenerated": false,\n "url": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["fileLinks": [
[
"category": "",
"externalInfo": [],
"filename": "",
"languageCombinationIds": [
[
"sourceLanguageId": 0,
"targetLanguageId": 0
]
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/delivered/addLink")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/addFileLinksToJob.json#responseBody
PUT
Adds files to the project as delivered in the job.
{{baseUrl}}/v2/jobs/:jobId/files/delivered/add
QUERY PARAMS
jobId
BODY json
{
"files": [
{
"category": "",
"fileId": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add");
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, "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add" {:body "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
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}}/v2/jobs/:jobId/files/delivered/add"),
Content = new StringContent("/home-api/assets/examples/v2/jobs/addFiles.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"
payload := strings.NewReader("/home-api/assets/examples/v2/jobs/addFiles.json#requestBody")
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/v2/jobs/:jobId/files/delivered/add HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
/home-api/assets/examples/v2/jobs/addFiles.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/jobs/addFiles.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/jobs/addFiles.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
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}}/v2/jobs/:jobId/files/delivered/add',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")
.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/v2/jobs/:jobId/files/delivered/add',
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('/home-api/assets/examples/v2/jobs/addFiles.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/jobs/addFiles.json#requestBody');
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}}/v2/jobs/:jobId/files/delivered/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/jobs/addFiles.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"]
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}}/v2/jobs/:jobId/files/delivered/add" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/delivered/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody",
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}}/v2/jobs/:jobId/files/delivered/add', [
'body' => '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/add');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/jobs/addFiles.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/jobs/addFiles.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/add');
$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}}/v2/jobs/:jobId/files/delivered/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/files/delivered/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"
payload = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add"
payload <- "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")
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 = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
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/v2/jobs/:jobId/files/delivered/add') do |req|
req.body = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody"
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}}/v2/jobs/:jobId/files/delivered/add";
let payload = "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/files/delivered/add \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody'
echo '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody' | \
http PUT {{baseUrl}}/v2/jobs/:jobId/files/delivered/add \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/jobs/addFiles.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/delivered/add
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/jobs/addFiles.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/delivered/add")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Assigns vendor to a job in a project. (PUT)
{{baseUrl}}/v2/jobs/:jobId/vendor
QUERY PARAMS
jobId
BODY json
{
"vendorPriceProfileId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/vendor");
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, "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/vendor" {:body "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/vendor"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
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}}/v2/jobs/:jobId/vendor"),
Content = new StringContent("/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/vendor");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/vendor"
payload := strings.NewReader("/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody")
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/v2/jobs/:jobId/vendor HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/vendor")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/vendor"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/vendor")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/vendor")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/vendor');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/vendor';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
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}}/v2/jobs/:jobId/vendor',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/vendor")
.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/v2/jobs/:jobId/vendor',
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('/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/vendor');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody');
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}}/v2/jobs/:jobId/vendor',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/vendor';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/vendor"]
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}}/v2/jobs/:jobId/vendor" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/vendor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody",
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}}/v2/jobs/:jobId/vendor', [
'body' => '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/vendor');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/vendor');
$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}}/v2/jobs/:jobId/vendor' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/vendor' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/vendor", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/vendor"
payload = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/vendor"
payload <- "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/vendor")
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 = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
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/v2/jobs/:jobId/vendor') do |req|
req.body = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody"
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}}/v2/jobs/:jobId/vendor";
let payload = "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/vendor \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody'
echo '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody' | \
http PUT {{baseUrl}}/v2/jobs/:jobId/vendor \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/vendor
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/jobs/assignVendor.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/vendor")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Changes job status if possible (400 Bad Request is returned otherwise). (PUT)
{{baseUrl}}/v2/jobs/:jobId/status
QUERY PARAMS
jobId
BODY json
{
"externalId": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/status");
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, "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/status" {:body "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
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}}/v2/jobs/:jobId/status"),
Content = new StringContent("/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/status");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/status"
payload := strings.NewReader("/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody")
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/v2/jobs/:jobId/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/status")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/status"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/status")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/status")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
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}}/v2/jobs/:jobId/status',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/status")
.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/v2/jobs/:jobId/status',
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('/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/status');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody');
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}}/v2/jobs/:jobId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/status"]
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}}/v2/jobs/:jobId/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody",
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}}/v2/jobs/:jobId/status', [
'body' => '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/status');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/status');
$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}}/v2/jobs/:jobId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/status"
payload = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/status"
payload <- "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/status")
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 = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
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/v2/jobs/:jobId/status') do |req|
req.body = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody"
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}}/v2/jobs/:jobId/status";
let payload = "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/status \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody'
echo '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody' | \
http PUT {{baseUrl}}/v2/jobs/:jobId/status \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/status
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/jobs/changeStatus.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns details for a job.
{{baseUrl}}/v2/jobs/:jobId
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/jobs/:jobId")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId"
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}}/v2/jobs/:jobId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId"
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/v2/jobs/:jobId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/jobs/:jobId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId"))
.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}}/v2/jobs/:jobId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/jobs/:jobId")
.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}}/v2/jobs/:jobId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId';
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}}/v2/jobs/:jobId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId',
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}}/v2/jobs/:jobId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/jobs/:jobId');
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}}/v2/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId';
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}}/v2/jobs/:jobId"]
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}}/v2/jobs/:jobId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId",
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}}/v2/jobs/:jobId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/jobs/:jobId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId")
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/v2/jobs/:jobId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId";
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}}/v2/jobs/:jobId
http GET {{baseUrl}}/v2/jobs/:jobId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/getById.json#responseBody
GET
Returns list of files delivered in the job.
{{baseUrl}}/v2/jobs/:jobId/files/delivered
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/delivered");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/jobs/:jobId/files/delivered")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered"
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}}/v2/jobs/:jobId/files/delivered"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/delivered");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/delivered"
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/v2/jobs/:jobId/files/delivered HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/jobs/:jobId/files/delivered")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/delivered"))
.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}}/v2/jobs/:jobId/files/delivered")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/jobs/:jobId/files/delivered")
.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}}/v2/jobs/:jobId/files/delivered');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered';
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}}/v2/jobs/:jobId/files/delivered',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/delivered',
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}}/v2/jobs/:jobId/files/delivered'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/jobs/:jobId/files/delivered');
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}}/v2/jobs/:jobId/files/delivered'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered';
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}}/v2/jobs/:jobId/files/delivered"]
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}}/v2/jobs/:jobId/files/delivered" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/delivered",
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}}/v2/jobs/:jobId/files/delivered');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/jobs/:jobId/files/delivered")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/delivered"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/delivered")
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/v2/jobs/:jobId/files/delivered') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered";
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}}/v2/jobs/:jobId/files/delivered
http GET {{baseUrl}}/v2/jobs/:jobId/files/delivered
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/delivered
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/delivered")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/getDeliveredFiles.json#responseBody
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles"
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}}/v2/jobs/:jobId/files/sharedReferenceFiles"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles"
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/v2/jobs/:jobId/files/sharedReferenceFiles HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles"))
.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}}/v2/jobs/:jobId/files/sharedReferenceFiles")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")
.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}}/v2/jobs/:jobId/files/sharedReferenceFiles');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles';
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}}/v2/jobs/:jobId/files/sharedReferenceFiles',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles',
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}}/v2/jobs/:jobId/files/sharedReferenceFiles'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles');
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}}/v2/jobs/:jobId/files/sharedReferenceFiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles';
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}}/v2/jobs/:jobId/files/sharedReferenceFiles"]
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}}/v2/jobs/:jobId/files/sharedReferenceFiles" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles",
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}}/v2/jobs/:jobId/files/sharedReferenceFiles');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")
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/v2/jobs/:jobId/files/sharedReferenceFiles') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles";
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}}/v2/jobs/:jobId/files/sharedReferenceFiles
http GET {{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/getSharedReferenceFiles.json#responseBody
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles"
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}}/v2/jobs/:jobId/files/sharedWorkFiles"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles"
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/v2/jobs/:jobId/files/sharedWorkFiles HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles"))
.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}}/v2/jobs/:jobId/files/sharedWorkFiles")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")
.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}}/v2/jobs/:jobId/files/sharedWorkFiles');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles';
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}}/v2/jobs/:jobId/files/sharedWorkFiles',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/sharedWorkFiles',
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}}/v2/jobs/:jobId/files/sharedWorkFiles'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles');
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}}/v2/jobs/:jobId/files/sharedWorkFiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles';
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}}/v2/jobs/:jobId/files/sharedWorkFiles"]
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}}/v2/jobs/:jobId/files/sharedWorkFiles" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles",
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}}/v2/jobs/:jobId/files/sharedWorkFiles');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/jobs/:jobId/files/sharedWorkFiles")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")
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/v2/jobs/:jobId/files/sharedWorkFiles') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles";
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}}/v2/jobs/:jobId/files/sharedWorkFiles
http GET {{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/getSharedWorkFiles.json#responseBody
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles/share HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/sharedReferenceFiles/share',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles/share',
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: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share');
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}}/v2/jobs/:jobId/files/sharedReferenceFiles/share'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/v2/jobs/:jobId/files/sharedReferenceFiles/share" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles/share")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/v2/jobs/:jobId/files/sharedReferenceFiles/share') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share
http PUT {{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/sharedReferenceFiles/share")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/shareAsReferenceFiles.json#responseBody
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/jobs/:jobId/files/sharedWorkFiles/share HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/sharedWorkFiles/share',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/sharedWorkFiles/share',
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: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share');
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}}/v2/jobs/:jobId/files/sharedWorkFiles/share'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/sharedWorkFiles/share"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/v2/jobs/:jobId/files/sharedWorkFiles/share" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/files/sharedWorkFiles/share")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/v2/jobs/:jobId/files/sharedWorkFiles/share') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share
http PUT {{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/sharedWorkFiles/share")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/shareAsWorkFiles.json#responseBody
PUT
Stops sharing selected files with a job in a project.
{{baseUrl}}/v2/jobs/:jobId/files/stopSharing
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/jobs/:jobId/files/stopSharing HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/stopSharing',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/stopSharing',
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: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing');
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}}/v2/jobs/:jobId/files/stopSharing'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing';
const options = {method: 'PUT'};
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}}/v2/jobs/:jobId/files/stopSharing"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/v2/jobs/:jobId/files/stopSharing" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/stopSharing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/stopSharing');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/stopSharing');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/stopSharing' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/files/stopSharing")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/v2/jobs/:jobId/files/stopSharing') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/files/stopSharing
http PUT {{baseUrl}}/v2/jobs/:jobId/files/stopSharing
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/stopSharing
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/stopSharing")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/stopSharing.json#responseBody
PUT
Updates dates of a given job. (PUT)
{{baseUrl}}/v2/jobs/:jobId/dates
QUERY PARAMS
jobId
BODY json
{
"actualEndDate": 0,
"actualStartDate": 0,
"deadline": 0,
"startDate": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/dates");
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, "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/dates" {:body "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/dates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
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}}/v2/jobs/:jobId/dates"),
Content = new StringContent("/home-api/assets/examples/v2/jobs/changeDates.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/dates");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/dates"
payload := strings.NewReader("/home-api/assets/examples/v2/jobs/changeDates.json#requestBody")
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/v2/jobs/:jobId/dates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
/home-api/assets/examples/v2/jobs/changeDates.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/dates")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/jobs/changeDates.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/dates"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/dates")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/dates")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/jobs/changeDates.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/dates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
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}}/v2/jobs/:jobId/dates',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/dates")
.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/v2/jobs/:jobId/dates',
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('/home-api/assets/examples/v2/jobs/changeDates.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/dates');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/jobs/changeDates.json#requestBody');
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}}/v2/jobs/:jobId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/jobs/changeDates.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/dates"]
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}}/v2/jobs/:jobId/dates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody",
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}}/v2/jobs/:jobId/dates', [
'body' => '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/dates');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/jobs/changeDates.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/jobs/changeDates.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/dates');
$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}}/v2/jobs/:jobId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/dates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/dates"
payload = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/dates"
payload <- "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/dates")
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 = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
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/v2/jobs/:jobId/dates') do |req|
req.body = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody"
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}}/v2/jobs/:jobId/dates";
let payload = "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/dates \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody'
echo '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody' | \
http PUT {{baseUrl}}/v2/jobs/:jobId/dates \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/jobs/changeDates.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/dates
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/jobs/changeDates.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/dates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates instructions for a job. (PUT)
{{baseUrl}}/v2/jobs/:jobId/instructions
QUERY PARAMS
jobId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/instructions");
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, "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/jobs/:jobId/instructions" {:body "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/instructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
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}}/v2/jobs/:jobId/instructions"),
Content = new StringContent("/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/instructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/instructions"
payload := strings.NewReader("/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody")
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/v2/jobs/:jobId/instructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/jobs/:jobId/instructions")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/instructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/instructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/jobs/:jobId/instructions")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/jobs/:jobId/instructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
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}}/v2/jobs/:jobId/instructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/instructions")
.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/v2/jobs/:jobId/instructions',
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('/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/jobs/:jobId/instructions');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody');
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}}/v2/jobs/:jobId/instructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/instructions"]
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}}/v2/jobs/:jobId/instructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody",
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}}/v2/jobs/:jobId/instructions', [
'body' => '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/instructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/instructions');
$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}}/v2/jobs/:jobId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/jobs/:jobId/instructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/instructions"
payload = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/instructions"
payload <- "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/instructions")
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 = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
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/v2/jobs/:jobId/instructions') do |req|
req.body = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody"
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}}/v2/jobs/:jobId/instructions";
let payload = "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/jobs/:jobId/instructions \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody'
echo '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody' | \
http PUT {{baseUrl}}/v2/jobs/:jobId/instructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/instructions
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/jobs/updateInstructionsForJob.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/instructions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Uploads file to the project as a file delivered in the job.
{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload
QUERY PARAMS
jobId
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload" {:multipart [{:name "file"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\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}}/v2/jobs/:jobId/files/delivered/upload"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "file",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/jobs/:jobId/files/delivered/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 113
-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('file', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload';
const form = new FormData();
form.append('file', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('file', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/:jobId/files/delivered/upload',
headers: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {file: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload');
req.headers({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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}}/v2/jobs/:jobId/files/delivered/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('file', '');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload';
const options = {method: 'POST'};
options.body = formData;
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": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"file", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"]
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}}/v2/jobs/:jobId/files/delivered/upload" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/v2/jobs/:jobId/files/delivered/upload", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/v2/jobs/:jobId/files/delivered/upload') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload";
let form = reqwest::multipart::Form::new()
.text("file", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/jobs/:jobId/files/delivered/upload \
--header 'content-type: multipart/form-data' \
--form file=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/v2/jobs/:jobId/files/delivered/upload \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/delivered/upload
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "file",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/delivered/upload")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/jobs/uploadFile.json#responseBody
POST
addExternalFileLink
{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink
QUERY PARAMS
jobId
BODY json
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink");
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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink" {:content-type :json
:form-params {:category ""
:externalInfo {}
:filename ""
:languageCombinationIds [{:sourceLanguageId 0
:targetLanguageId 0}]
:languageIds []}})
require "http/client"
url = "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/jobs/:jobId/files/addExternalLink"),
Content = new StringContent("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/jobs/:jobId/files/addExternalLink");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"
payload := strings.NewReader("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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/v2/jobs/:jobId/files/addExternalLink HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 185
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink")
.setHeader("content-type", "application/json")
.setBody("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink")
.header("content-type", "application/json")
.body("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
.asString();
const data = JSON.stringify({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink',
headers: {'content-type': 'application/json'},
data: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[]}'
};
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}}/v2/jobs/:jobId/files/addExternalLink',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink")
.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/v2/jobs/:jobId/files/addExternalLink',
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({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink',
headers: {'content-type': 'application/json'},
body: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
},
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}}/v2/jobs/:jobId/files/addExternalLink');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: []
});
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}}/v2/jobs/:jobId/files/addExternalLink',
headers: {'content-type': 'application/json'},
data: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[]}'
};
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 = @{ @"category": @"",
@"externalInfo": @{ },
@"filename": @"",
@"languageCombinationIds": @[ @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 } ],
@"languageIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"]
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}}/v2/jobs/:jobId/files/addExternalLink" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink",
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([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]),
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}}/v2/jobs/:jobId/files/addExternalLink', [
'body' => '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink');
$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}}/v2/jobs/:jobId/files/addExternalLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/jobs/:jobId/files/addExternalLink", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"
payload = {
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink"
payload <- "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/jobs/:jobId/files/addExternalLink")
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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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/v2/jobs/:jobId/files/addExternalLink') do |req|
req.body = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink";
let payload = json!({
"category": "",
"externalInfo": json!({}),
"filename": "",
"languageCombinationIds": (
json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
})
),
"languageIds": ()
});
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}}/v2/jobs/:jobId/files/addExternalLink \
--header 'content-type: application/json' \
--data '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
echo '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}' | \
http POST {{baseUrl}}/v2/jobs/:jobId/files/addExternalLink \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": []\n}' \
--output-document \
- {{baseUrl}}/v2/jobs/:jobId/files/addExternalLink
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"category": "",
"externalInfo": [],
"filename": "",
"languageCombinationIds": [
[
"sourceLanguageId": 0,
"targetLanguageId": 0
]
],
"languageIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/:jobId/files/addExternalLink")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getByExternalId
{{baseUrl}}/v2/jobs/for-external-id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/jobs/for-external-id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/jobs/for-external-id")
require "http/client"
url = "{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/jobs/for-external-id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/jobs/for-external-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/v2/jobs/for-external-id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/jobs/for-external-id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/jobs/for-external-id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/jobs/for-external-id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/jobs/for-external-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}}/v2/jobs/for-external-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}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/jobs/for-external-id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/jobs/for-external-id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/jobs/for-external-id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/jobs/for-external-id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/jobs/for-external-id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/jobs/for-external-id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/jobs/for-external-id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/jobs/for-external-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/v2/jobs/for-external-id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/jobs/for-external-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}}/v2/jobs/for-external-id
http GET {{baseUrl}}/v2/jobs/for-external-id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/jobs/for-external-id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/jobs/for-external-id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Refreshes license content.
{{baseUrl}}/license/refresh
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/license/refresh");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/license/refresh")
require "http/client"
url = "{{baseUrl}}/license/refresh"
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}}/license/refresh"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/license/refresh");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/license/refresh"
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/license/refresh HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/license/refresh")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/license/refresh"))
.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}}/license/refresh")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/license/refresh")
.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}}/license/refresh');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/license/refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/license/refresh';
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}}/license/refresh',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/license/refresh")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/license/refresh',
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}}/license/refresh'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/license/refresh');
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}}/license/refresh'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/license/refresh';
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}}/license/refresh"]
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}}/license/refresh" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/license/refresh",
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}}/license/refresh');
echo $response->getBody();
setUrl('{{baseUrl}}/license/refresh');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/license/refresh');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/license/refresh' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/license/refresh' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/license/refresh")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/license/refresh"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/license/refresh"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/license/refresh")
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/license/refresh') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/license/refresh";
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}}/license/refresh
http POST {{baseUrl}}/license/refresh
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/license/refresh
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/license/refresh")! 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()
GET
Returns license content.
{{baseUrl}}/license
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/license");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/license")
require "http/client"
url = "{{baseUrl}}/license"
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}}/license"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/license");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/license"
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/license HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/license")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/license"))
.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}}/license")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/license")
.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}}/license');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/license'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/license';
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}}/license',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/license")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/license',
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}}/license'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/license');
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}}/license'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/license';
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}}/license"]
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}}/license" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/license",
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}}/license');
echo $response->getBody();
setUrl('{{baseUrl}}/license');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/license');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/license' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/license' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/license")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/license"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/license"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/license")
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/license') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/license";
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}}/license
http GET {{baseUrl}}/license
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/license
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/license")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/license/getLicense.json#responseBody
POST
Executes a macro.
{{baseUrl}}/macros/:macroId/run
QUERY PARAMS
macroId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/macros/:macroId/run");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/macros/:macroId/run")
require "http/client"
url = "{{baseUrl}}/macros/:macroId/run"
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}}/macros/:macroId/run"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/macros/:macroId/run");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/macros/:macroId/run"
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/macros/:macroId/run HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/macros/:macroId/run")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/macros/:macroId/run"))
.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}}/macros/:macroId/run")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/macros/:macroId/run")
.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}}/macros/:macroId/run');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/macros/:macroId/run'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/macros/:macroId/run';
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}}/macros/:macroId/run',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/macros/:macroId/run")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/macros/:macroId/run',
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}}/macros/:macroId/run'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/macros/:macroId/run');
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}}/macros/:macroId/run'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/macros/:macroId/run';
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}}/macros/:macroId/run"]
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}}/macros/:macroId/run" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/macros/:macroId/run",
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}}/macros/:macroId/run');
echo $response->getBody();
setUrl('{{baseUrl}}/macros/:macroId/run');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/macros/:macroId/run');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/macros/:macroId/run' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/macros/:macroId/run' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/macros/:macroId/run")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/macros/:macroId/run"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/macros/:macroId/run"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/macros/:macroId/run")
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/macros/:macroId/run') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/macros/:macroId/run";
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}}/macros/:macroId/run
http POST {{baseUrl}}/macros/:macroId/run
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/macros/:macroId/run
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/macros/:macroId/run")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/macros/runMacroSynchronouslyWithParametersWithoutIds.json#responseBody
POST
Adds a payable to a project.
{{baseUrl}}/projects/:projectId/finance/payables
QUERY PARAMS
projectId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/payables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/finance/payables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/payables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/finance/payables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/payables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/payables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/finance/payables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/finance/payables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/payables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/payables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/finance/payables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/finance/payables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/finance/payables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/payables")
.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/projects/:projectId/finance/payables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/finance/payables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/finance/payables"]
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}}/projects/:projectId/finance/payables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/payables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/finance/payables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/payables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/finance/payables');
$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}}/projects/:projectId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/finance/payables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/payables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/payables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/finance/payables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/finance/payables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/finance/payables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/finance/payables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/finance/payables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/payables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/payables")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v1/projects/createPayable.json#responseBody
POST
Adds a receivable to a project.
{{baseUrl}}/projects/:projectId/finance/receivables
QUERY PARAMS
projectId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/receivables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/finance/receivables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/receivables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/finance/receivables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/receivables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/receivables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/finance/receivables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/finance/receivables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/receivables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/receivables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/finance/receivables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/finance/receivables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/finance/receivables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/receivables")
.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/projects/:projectId/finance/receivables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/finance/receivables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/finance/receivables"]
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}}/projects/:projectId/finance/receivables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/receivables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/finance/receivables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/receivables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/finance/receivables');
$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}}/projects/:projectId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/finance/receivables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/receivables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/receivables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/finance/receivables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/finance/receivables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/finance/receivables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/finance/receivables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/finance/receivables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/receivables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/receivables")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v1/projects/createReceivable.json#responseBody
POST
Creates a new Classic Project.
{{baseUrl}}/projects
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects")
require "http/client"
url = "{{baseUrl}}/projects"
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}}/projects"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects"
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/projects HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects"))
.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}}/projects")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects")
.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}}/projects');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/projects'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects';
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}}/projects',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects',
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}}/projects'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects');
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}}/projects'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects';
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}}/projects"]
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}}/projects" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects",
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}}/projects');
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects")
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/projects') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects";
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}}/projects
http POST {{baseUrl}}/projects
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/projects
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/createProject.json#responseBody
POST
Creates a new language combination for a given project without creating a task.
{{baseUrl}}/projects/:projectId/languageCombinations
QUERY PARAMS
projectId
BODY json
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/languageCombinations");
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 \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/languageCombinations" {:content-type :json
:form-params {:sourceLanguageId 0
:targetLanguageId 0}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/languageCombinations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/languageCombinations"),
Content = new StringContent("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/languageCombinations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/languageCombinations"
payload := strings.NewReader("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/languageCombinations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 52
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/languageCombinations")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/languageCombinations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/languageCombinations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/languageCombinations")
.header("content-type", "application/json")
.body("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
.asString();
const data = JSON.stringify({
sourceLanguageId: 0,
targetLanguageId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/languageCombinations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/languageCombinations',
headers: {'content-type': 'application/json'},
data: {sourceLanguageId: 0, targetLanguageId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/languageCombinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceLanguageId":0,"targetLanguageId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/languageCombinations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/languageCombinations")
.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/projects/:projectId/languageCombinations',
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({sourceLanguageId: 0, targetLanguageId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/languageCombinations',
headers: {'content-type': 'application/json'},
body: {sourceLanguageId: 0, targetLanguageId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/languageCombinations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceLanguageId: 0,
targetLanguageId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/languageCombinations',
headers: {'content-type': 'application/json'},
data: {sourceLanguageId: 0, targetLanguageId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/languageCombinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceLanguageId":0,"targetLanguageId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceLanguageId": @0,
@"targetLanguageId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/languageCombinations"]
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}}/projects/:projectId/languageCombinations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/languageCombinations",
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([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/languageCombinations', [
'body' => '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/languageCombinations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/languageCombinations');
$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}}/projects/:projectId/languageCombinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/languageCombinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/languageCombinations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/languageCombinations"
payload = {
"sourceLanguageId": 0,
"targetLanguageId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/languageCombinations"
payload <- "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/languageCombinations")
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 \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/languageCombinations') do |req|
req.body = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/languageCombinations";
let payload = json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/languageCombinations \
--header 'content-type: application/json' \
--data '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
echo '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}' | \
http POST {{baseUrl}}/projects/:projectId/languageCombinations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/languageCombinations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceLanguageId": 0,
"targetLanguageId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/languageCombinations")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/createLanguageCombination.json#responseBody
POST
Creates a new task for a given project.
{{baseUrl}}/projects/:projectId/tasks
QUERY PARAMS
projectId
BODY json
{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tasks");
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 \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/tasks" {:content-type :json
:form-params {:clientTaskPONumber ""
:dates {:actualDeliveryDate {:value 0}
:actualStartDate {}
:deadline {}
:startDate {}}
:files [{:category ""
:content ""
:name ""
:token ""
:url ""}]
:instructions {:forProvider ""
:fromCustomer ""
:internal ""
:notes ""
:paymentNoteForCustomer ""
:paymentNoteForVendor ""}
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:name ""
:people {:customerContacts {:additionalIds []
:primaryId 0
:sendBackToId 0}
:responsiblePersons {:projectCoordinatorId 0
:projectManagerId 0}}
:specializationId 0
:workflowId 0}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tasks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tasks"),
Content = new StringContent("{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/tasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tasks"
payload := strings.NewReader("{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/tasks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 830
{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/tasks")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tasks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tasks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/tasks")
.header("content-type", "application/json")
.body("{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}")
.asString();
const data = JSON.stringify({
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [
{
category: '',
content: '',
name: '',
token: '',
url: ''
}
],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
name: '',
people: {
customerContacts: {
additionalIds: [],
primaryId: 0,
sendBackToId: 0
},
responsiblePersons: {
projectCoordinatorId: 0,
projectManagerId: 0
}
},
specializationId: 0,
workflowId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/tasks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tasks',
headers: {'content-type': 'application/json'},
data: {
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [{category: '', content: '', name: '', token: '', url: ''}],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
specializationId: 0,
workflowId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientTaskPONumber":"","dates":{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}},"files":[{"category":"","content":"","name":"","token":"","url":""}],"instructions":{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""},"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"name":"","people":{"customerContacts":{"additionalIds":[],"primaryId":0,"sendBackToId":0},"responsiblePersons":{"projectCoordinatorId":0,"projectManagerId":0}},"specializationId":0,"workflowId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/tasks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientTaskPONumber": "",\n "dates": {\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n },\n "files": [\n {\n "category": "",\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n }\n ],\n "instructions": {\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n },\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "name": "",\n "people": {\n "customerContacts": {\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n },\n "responsiblePersons": {\n "projectCoordinatorId": 0,\n "projectManagerId": 0\n }\n },\n "specializationId": 0,\n "workflowId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tasks")
.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/projects/:projectId/tasks',
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({
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [{category: '', content: '', name: '', token: '', url: ''}],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
specializationId: 0,
workflowId: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tasks',
headers: {'content-type': 'application/json'},
body: {
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [{category: '', content: '', name: '', token: '', url: ''}],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
specializationId: 0,
workflowId: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/tasks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [
{
category: '',
content: '',
name: '',
token: '',
url: ''
}
],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
name: '',
people: {
customerContacts: {
additionalIds: [],
primaryId: 0,
sendBackToId: 0
},
responsiblePersons: {
projectCoordinatorId: 0,
projectManagerId: 0
}
},
specializationId: 0,
workflowId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tasks',
headers: {'content-type': 'application/json'},
data: {
clientTaskPONumber: '',
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
files: [{category: '', content: '', name: '', token: '', url: ''}],
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
specializationId: 0,
workflowId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientTaskPONumber":"","dates":{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}},"files":[{"category":"","content":"","name":"","token":"","url":""}],"instructions":{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""},"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"name":"","people":{"customerContacts":{"additionalIds":[],"primaryId":0,"sendBackToId":0},"responsiblePersons":{"projectCoordinatorId":0,"projectManagerId":0}},"specializationId":0,"workflowId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientTaskPONumber": @"",
@"dates": @{ @"actualDeliveryDate": @{ @"value": @0 }, @"actualStartDate": @{ }, @"deadline": @{ }, @"startDate": @{ } },
@"files": @[ @{ @"category": @"", @"content": @"", @"name": @"", @"token": @"", @"url": @"" } ],
@"instructions": @{ @"forProvider": @"", @"fromCustomer": @"", @"internal": @"", @"notes": @"", @"paymentNoteForCustomer": @"", @"paymentNoteForVendor": @"" },
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"name": @"",
@"people": @{ @"customerContacts": @{ @"additionalIds": @[ ], @"primaryId": @0, @"sendBackToId": @0 }, @"responsiblePersons": @{ @"projectCoordinatorId": @0, @"projectManagerId": @0 } },
@"specializationId": @0,
@"workflowId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tasks"]
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}}/projects/:projectId/tasks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tasks",
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([
'clientTaskPONumber' => '',
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'files' => [
[
'category' => '',
'content' => '',
'name' => '',
'token' => '',
'url' => ''
]
],
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'specializationId' => 0,
'workflowId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/tasks', [
'body' => '{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tasks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientTaskPONumber' => '',
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'files' => [
[
'category' => '',
'content' => '',
'name' => '',
'token' => '',
'url' => ''
]
],
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'specializationId' => 0,
'workflowId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientTaskPONumber' => '',
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'files' => [
[
'category' => '',
'content' => '',
'name' => '',
'token' => '',
'url' => ''
]
],
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'specializationId' => 0,
'workflowId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/tasks');
$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}}/projects/:projectId/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/tasks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tasks"
payload = {
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": { "value": 0 },
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tasks"
payload <- "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tasks")
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 \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/tasks') do |req|
req.body = "{\n \"clientTaskPONumber\": \"\",\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"files\": [\n {\n \"category\": \"\",\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n }\n ],\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"specializationId\": 0,\n \"workflowId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tasks";
let payload = json!({
"clientTaskPONumber": "",
"dates": json!({
"actualDeliveryDate": json!({"value": 0}),
"actualStartDate": json!({}),
"deadline": json!({}),
"startDate": json!({})
}),
"files": (
json!({
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
})
),
"instructions": json!({
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}),
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"name": "",
"people": json!({
"customerContacts": json!({
"additionalIds": (),
"primaryId": 0,
"sendBackToId": 0
}),
"responsiblePersons": json!({
"projectCoordinatorId": 0,
"projectManagerId": 0
})
}),
"specializationId": 0,
"workflowId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/tasks \
--header 'content-type: application/json' \
--data '{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}'
echo '{
"clientTaskPONumber": "",
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"files": [
{
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
}
],
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"specializationId": 0,
"workflowId": 0
}' | \
http POST {{baseUrl}}/projects/:projectId/tasks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientTaskPONumber": "",\n "dates": {\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n },\n "files": [\n {\n "category": "",\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n }\n ],\n "instructions": {\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n },\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "name": "",\n "people": {\n "customerContacts": {\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n },\n "responsiblePersons": {\n "projectCoordinatorId": 0,\n "projectManagerId": 0\n }\n },\n "specializationId": 0,\n "workflowId": 0\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/tasks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientTaskPONumber": "",
"dates": [
"actualDeliveryDate": ["value": 0],
"actualStartDate": [],
"deadline": [],
"startDate": []
],
"files": [
[
"category": "",
"content": "",
"name": "",
"token": "",
"url": ""
]
],
"instructions": [
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
],
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"name": "",
"people": [
"customerContacts": [
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
],
"responsiblePersons": [
"projectCoordinatorId": 0,
"projectManagerId": 0
]
],
"specializationId": 0,
"workflowId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tasks")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/createTask.json#responseBody
DELETE
Deletes a payable.
{{baseUrl}}/projects/:projectId/finance/payables/:payableId
QUERY PARAMS
projectId
payableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/payables/:payableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
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}}/projects/:projectId/finance/payables/:payableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/payables/:payableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
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/projects/:projectId/finance/payables/:payableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/payables/:payableId"))
.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}}/projects/:projectId/finance/payables/:payableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.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}}/projects/:projectId/finance/payables/:payableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/payables/:payableId';
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}}/projects/:projectId/finance/payables/:payableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/finance/payables/:payableId',
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}}/projects/:projectId/finance/payables/:payableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
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}}/projects/:projectId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/payables/:payableId';
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}}/projects/:projectId/finance/payables/:payableId"]
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}}/projects/:projectId/finance/payables/:payableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/payables/:payableId",
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}}/projects/:projectId/finance/payables/:payableId');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/finance/payables/:payableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/payables/:payableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/finance/payables/:payableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
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/projects/:projectId/finance/payables/:payableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/finance/payables/:payableId";
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}}/projects/:projectId/finance/payables/:payableId
http DELETE {{baseUrl}}/projects/:projectId/finance/payables/:payableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/payables/:payableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/payables/:payableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Deletes a receivable.
{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId
QUERY PARAMS
projectId
receivableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
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}}/projects/:projectId/finance/receivables/:receivableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
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/projects/:projectId/finance/receivables/:receivableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"))
.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}}/projects/:projectId/finance/receivables/:receivableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.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}}/projects/:projectId/finance/receivables/:receivableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId';
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}}/projects/:projectId/finance/receivables/:receivableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/finance/receivables/:receivableId',
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}}/projects/:projectId/finance/receivables/:receivableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
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}}/projects/:projectId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId';
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}}/projects/:projectId/finance/receivables/:receivableId"]
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}}/projects/:projectId/finance/receivables/:receivableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId",
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}}/projects/:projectId/finance/receivables/:receivableId');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/finance/receivables/:receivableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
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/projects/:projectId/finance/receivables/:receivableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId";
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}}/projects/:projectId/finance/receivables/:receivableId
http DELETE {{baseUrl}}/projects/:projectId/finance/receivables/:receivableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/receivables/:receivableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Downloads a file.
{{baseUrl}}/projects/files/:fileId/download
QUERY PARAMS
fileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/files/:fileId/download");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/files/:fileId/download")
require "http/client"
url = "{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/files/:fileId/download");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/files/:fileId/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/projects/files/:fileId/download HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/files/:fileId/download")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/files/:fileId/download'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/files/:fileId/download")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/files/:fileId/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}}/projects/files/:fileId/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}}/projects/files/:fileId/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}}/projects/files/:fileId/download'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/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}}/projects/files/:fileId/download" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/files/:fileId/download');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/files/:fileId/download');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/files/:fileId/download' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/files/:fileId/download' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/files/:fileId/download")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/files/:fileId/download"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/files/:fileId/download"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/files/:fileId/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/projects/files/:fileId/download') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/files/:fileId/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}}/projects/files/:fileId/download
http GET {{baseUrl}}/projects/files/:fileId/download
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/files/:fileId/download
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/files/:fileId/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()
DELETE
Removes a project.
{{baseUrl}}/projects/:projectId
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
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}}/projects/:projectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
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/projects/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.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}}/projects/:projectId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId")
.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}}/projects/:projectId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
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}}/projects/:projectId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId',
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}}/projects/:projectId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId');
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}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId';
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}}/projects/:projectId"]
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}}/projects/:projectId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId",
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}}/projects/:projectId');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
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/projects/:projectId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId";
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}}/projects/:projectId
http DELETE {{baseUrl}}/projects/:projectId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns contacts of a given project.
{{baseUrl}}/projects/:projectId/contacts
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/contacts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/contacts")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/contacts"
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}}/projects/:projectId/contacts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/contacts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/contacts"
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/projects/:projectId/contacts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/contacts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/contacts"))
.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}}/projects/:projectId/contacts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/contacts")
.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}}/projects/:projectId/contacts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/contacts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/contacts';
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}}/projects/:projectId/contacts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/contacts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/contacts',
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}}/projects/:projectId/contacts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/contacts');
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}}/projects/:projectId/contacts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/contacts';
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}}/projects/:projectId/contacts"]
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}}/projects/:projectId/contacts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/contacts",
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}}/projects/:projectId/contacts');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/contacts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/contacts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/contacts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/contacts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/contacts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/contacts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/contacts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/contacts")
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/projects/:projectId/contacts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/contacts";
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}}/projects/:projectId/contacts
http GET {{baseUrl}}/projects/:projectId/contacts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/contacts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/contacts")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getContacts.json#responseBody
GET
Returns custom fields of a given project.
{{baseUrl}}/projects/:projectId/customFields
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/customFields")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/customFields"
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}}/projects/:projectId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/customFields"
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/projects/:projectId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/customFields"))
.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}}/projects/:projectId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/customFields")
.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}}/projects/:projectId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/customFields';
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}}/projects/:projectId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/customFields',
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}}/projects/:projectId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/customFields');
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}}/projects/:projectId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/customFields';
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}}/projects/:projectId/customFields"]
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}}/projects/:projectId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/customFields",
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}}/projects/:projectId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/customFields")
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/projects/:projectId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/customFields";
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}}/projects/:projectId/customFields
http GET {{baseUrl}}/projects/:projectId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getCustomFields.json#responseBody
GET
Returns dates of a given project.
{{baseUrl}}/projects/:projectId/dates
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/dates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/dates")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/dates"
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}}/projects/:projectId/dates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/dates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/dates"
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/projects/:projectId/dates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/dates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/dates"))
.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}}/projects/:projectId/dates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/dates")
.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}}/projects/:projectId/dates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/dates';
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}}/projects/:projectId/dates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/dates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/dates',
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}}/projects/:projectId/dates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/dates');
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}}/projects/:projectId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/dates';
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}}/projects/:projectId/dates"]
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}}/projects/:projectId/dates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/dates",
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}}/projects/:projectId/dates');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/dates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/dates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/dates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/dates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/dates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/dates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/dates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/dates")
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/projects/:projectId/dates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/dates";
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}}/projects/:projectId/dates
http GET {{baseUrl}}/projects/:projectId/dates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/dates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/dates")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getDates.json#responseBody
GET
Returns finance of a given project.
{{baseUrl}}/projects/:projectId/finance
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/finance")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance"
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}}/projects/:projectId/finance"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance"
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/projects/:projectId/finance HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/finance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance"))
.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}}/projects/:projectId/finance")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/finance")
.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}}/projects/:projectId/finance');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance';
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}}/projects/:projectId/finance',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/finance',
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}}/projects/:projectId/finance'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/finance');
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}}/projects/:projectId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance';
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}}/projects/:projectId/finance"]
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}}/projects/:projectId/finance" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance",
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}}/projects/:projectId/finance');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/finance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/finance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/finance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/finance")
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/projects/:projectId/finance') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/finance";
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}}/projects/:projectId/finance
http GET {{baseUrl}}/projects/:projectId/finance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/finance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getFinance.json#responseBody
GET
Returns instructions of a given project.
{{baseUrl}}/projects/:projectId/instructions
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/instructions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/instructions")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/instructions"
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}}/projects/:projectId/instructions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/instructions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/instructions"
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/projects/:projectId/instructions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/instructions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/instructions"))
.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}}/projects/:projectId/instructions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/instructions")
.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}}/projects/:projectId/instructions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/instructions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/instructions';
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}}/projects/:projectId/instructions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/instructions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/instructions',
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}}/projects/:projectId/instructions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/instructions');
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}}/projects/:projectId/instructions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/instructions';
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}}/projects/:projectId/instructions"]
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}}/projects/:projectId/instructions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/instructions",
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}}/projects/:projectId/instructions');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/instructions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/instructions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/instructions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/instructions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/instructions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/instructions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/instructions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/instructions")
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/projects/:projectId/instructions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/instructions";
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}}/projects/:projectId/instructions
http GET {{baseUrl}}/projects/:projectId/instructions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/instructions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getInstructions.json#responseBody
GET
Returns project details.
{{baseUrl}}/projects/:projectId
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
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}}/projects/:projectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
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/projects/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.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}}/projects/:projectId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId")
.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}}/projects/:projectId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
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}}/projects/:projectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId',
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}}/projects/:projectId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId');
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}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId';
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}}/projects/:projectId"]
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}}/projects/:projectId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId",
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}}/projects/:projectId');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
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/projects/:projectId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId";
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}}/projects/:projectId
http GET {{baseUrl}}/projects/:projectId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getById.json#responseBody
GET
Returns projects' internal identifiers.
{{baseUrl}}/projects/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/ids")
require "http/client"
url = "{{baseUrl}}/projects/ids"
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}}/projects/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/ids"
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/projects/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/ids"))
.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}}/projects/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/ids")
.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}}/projects/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/ids';
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}}/projects/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/ids',
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}}/projects/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/ids');
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}}/projects/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/ids';
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}}/projects/ids"]
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}}/projects/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/ids",
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}}/projects/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/ids")
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/projects/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/ids";
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}}/projects/ids
http GET {{baseUrl}}/projects/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/getIds.json#responseBody
PUT
Updates a payable.
{{baseUrl}}/projects/:projectId/finance/payables/:payableId
QUERY PARAMS
projectId
payableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/payables/:payableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/finance/payables/:payableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/payables/:payableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/payables/:payableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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/projects/:projectId/finance/payables/:payableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/payables/:payableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/finance/payables/:payableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/payables/:payableId")
.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/projects/:projectId/finance/payables/:payableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/finance/payables/:payableId"]
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}}/projects/:projectId/finance/payables/:payableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/payables/:payableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/projects/:projectId/finance/payables/:payableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/finance/payables/:payableId');
$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}}/projects/:projectId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/finance/payables/:payableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/payables/:payableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/payables/:payableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/projects/:projectId/finance/payables/:payableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/payables/:payableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
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}}/projects/:projectId/finance/payables/:payableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/projects/:projectId/finance/payables/:payableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/payables/:payableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/payables/:payableId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v1/projects/updatePayable.json#responseBody
PUT
Updates a receivable.
{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId
QUERY PARAMS
projectId
receivableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/receivables/:receivableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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/projects/:projectId/finance/receivables/:receivableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")
.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/projects/:projectId/finance/receivables/:receivableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"]
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}}/projects/:projectId/finance/receivables/:receivableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId');
$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}}/projects/:projectId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/finance/receivables/:receivableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/receivables/:receivableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/projects/:projectId/finance/receivables/:receivableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/finance/receivables/:receivableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
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}}/projects/:projectId/finance/receivables/:receivableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/projects/:projectId/finance/receivables/:receivableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/finance/receivables/:receivableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/finance/receivables/:receivableId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v1/projects/updateReceivable.json#responseBody
PUT
Updates contacts of a given project.
{{baseUrl}}/projects/:projectId/contacts
QUERY PARAMS
projectId
BODY json
{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/contacts");
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 \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/contacts" {:content-type :json
:form-params {:additionalIds []
:primaryId 0
:sendBackToId 0}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/contacts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/contacts"),
Content = new StringContent("{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/contacts");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/contacts"
payload := strings.NewReader("{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/projects/:projectId/contacts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/contacts")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/contacts"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/contacts")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/contacts")
.header("content-type", "application/json")
.body("{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}")
.asString();
const data = JSON.stringify({
additionalIds: [],
primaryId: 0,
sendBackToId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/contacts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/contacts',
headers: {'content-type': 'application/json'},
data: {additionalIds: [], primaryId: 0, sendBackToId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/contacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"additionalIds":[],"primaryId":0,"sendBackToId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/contacts',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/contacts")
.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/projects/:projectId/contacts',
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({additionalIds: [], primaryId: 0, sendBackToId: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/contacts',
headers: {'content-type': 'application/json'},
body: {additionalIds: [], primaryId: 0, sendBackToId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/projects/:projectId/contacts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalIds: [],
primaryId: 0,
sendBackToId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/contacts',
headers: {'content-type': 'application/json'},
data: {additionalIds: [], primaryId: 0, sendBackToId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/contacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"additionalIds":[],"primaryId":0,"sendBackToId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalIds": @[ ],
@"primaryId": @0,
@"sendBackToId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/contacts"]
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}}/projects/:projectId/contacts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/contacts",
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([
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/projects/:projectId/contacts', [
'body' => '{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/contacts');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/contacts');
$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}}/projects/:projectId/contacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/contacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/contacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/contacts"
payload = {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/contacts"
payload <- "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/contacts")
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 \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/projects/:projectId/contacts') do |req|
req.body = "{\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/contacts";
let payload = json!({
"additionalIds": (),
"primaryId": 0,
"sendBackToId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/projects/:projectId/contacts \
--header 'content-type: application/json' \
--data '{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}'
echo '{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}' | \
http PUT {{baseUrl}}/projects/:projectId/contacts \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/contacts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/contacts")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/updateContacts.json#responseBody
PUT
Updates custom fields of a given project.
{{baseUrl}}/projects/:projectId/customFields
QUERY PARAMS
projectId
BODY json
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/customFields");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/customFields" {:content-type :json
:form-params [{:key ""
:name ""
:type ""
:value {}}]})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/customFields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/projects/:projectId/customFields"),
Content = new StringContent("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/projects/:projectId/customFields");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/customFields"
payload := strings.NewReader("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/projects/:projectId/customFields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/customFields")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/customFields"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/customFields")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/customFields")
.header("content-type", "application/json")
.body("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.asString();
const data = JSON.stringify([
{
key: '',
name: '',
type: '',
value: {}
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/customFields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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}}/projects/:projectId/customFields',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/customFields")
.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/projects/:projectId/customFields',
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([{key: '', name: '', type: '', value: {}}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/customFields',
headers: {'content-type': 'application/json'},
body: [{key: '', name: '', type: '', value: {}}],
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}}/projects/:projectId/customFields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
key: '',
name: '',
type: '',
value: {}
}
]);
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}}/projects/:projectId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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 = @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/customFields"]
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}}/projects/:projectId/customFields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/customFields",
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([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]),
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}}/projects/:projectId/customFields', [
'body' => '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/customFields');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/customFields');
$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}}/projects/:projectId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/customFields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/customFields"
payload = [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/customFields"
payload <- "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/projects/:projectId/customFields")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/projects/:projectId/customFields') do |req|
req.body = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/projects/:projectId/customFields";
let payload = (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
);
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/projects/:projectId/customFields \
--header 'content-type: application/json' \
--data '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
echo '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]' | \
http PUT {{baseUrl}}/projects/:projectId/customFields \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n]' \
--output-document \
- {{baseUrl}}/projects/:projectId/customFields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"key": "",
"name": "",
"type": "",
"value": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/updateCustomFields.json#responseBody
PUT
Updates dates of a given project.
{{baseUrl}}/projects/:projectId/dates
QUERY PARAMS
projectId
BODY json
{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/dates");
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 \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/dates" {:content-type :json
:form-params {:actualDeliveryDate {:value 0}
:actualStartDate {}
:deadline {}
:startDate {}}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/dates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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}}/projects/:projectId/dates"),
Content = new StringContent("{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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}}/projects/:projectId/dates");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/dates"
payload := strings.NewReader("{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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/projects/:projectId/dates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110
{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/dates")
.setHeader("content-type", "application/json")
.setBody("{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/dates"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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 \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/dates")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/dates")
.header("content-type", "application/json")
.body("{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}")
.asString();
const data = JSON.stringify({
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/dates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/dates',
headers: {'content-type': 'application/json'},
data: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}}'
};
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}}/projects/:projectId/dates',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/dates")
.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/projects/:projectId/dates',
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({
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/dates',
headers: {'content-type': 'application/json'},
body: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
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}}/projects/:projectId/dates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
});
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}}/projects/:projectId/dates',
headers: {'content-type': 'application/json'},
data: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}}'
};
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 = @{ @"actualDeliveryDate": @{ @"value": @0 },
@"actualStartDate": @{ },
@"deadline": @{ },
@"startDate": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/dates"]
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}}/projects/:projectId/dates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/dates",
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([
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
]),
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}}/projects/:projectId/dates', [
'body' => '{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/dates');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/dates');
$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}}/projects/:projectId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/dates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/dates"
payload = {
"actualDeliveryDate": { "value": 0 },
"actualStartDate": {},
"deadline": {},
"startDate": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/dates"
payload <- "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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}}/projects/:projectId/dates")
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 \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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/projects/:projectId/dates') do |req|
req.body = "{\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\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}}/projects/:projectId/dates";
let payload = json!({
"actualDeliveryDate": json!({"value": 0}),
"actualStartDate": json!({}),
"deadline": json!({}),
"startDate": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/projects/:projectId/dates \
--header 'content-type: application/json' \
--data '{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}'
echo '{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}' | \
http PUT {{baseUrl}}/projects/:projectId/dates \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/dates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actualDeliveryDate": ["value": 0],
"actualStartDate": [],
"deadline": [],
"startDate": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/dates")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/updateDates.json#responseBody
PUT
Updates instructions of a given project.
{{baseUrl}}/projects/:projectId/instructions
QUERY PARAMS
projectId
BODY json
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/instructions");
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId/instructions" {:content-type :json
:form-params {:forProvider ""
:fromCustomer ""
:internal ""
:notes ""
:paymentNoteForCustomer ""
:paymentNoteForVendor ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/instructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/projects/:projectId/instructions"),
Content = new StringContent("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/projects/:projectId/instructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/instructions"
payload := strings.NewReader("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/projects/:projectId/instructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 140
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId/instructions")
.setHeader("content-type", "application/json")
.setBody("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/instructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/instructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId/instructions")
.header("content-type", "application/json")
.body("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.asString();
const data = JSON.stringify({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId/instructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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}}/projects/:projectId/instructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/instructions")
.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/projects/:projectId/instructions',
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({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId/instructions',
headers: {'content-type': 'application/json'},
body: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
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}}/projects/:projectId/instructions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
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}}/projects/:projectId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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 = @{ @"forProvider": @"",
@"fromCustomer": @"",
@"internal": @"",
@"notes": @"",
@"paymentNoteForCustomer": @"",
@"paymentNoteForVendor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/instructions"]
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}}/projects/:projectId/instructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/instructions",
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([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]),
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}}/projects/:projectId/instructions', [
'body' => '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/instructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/instructions');
$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}}/projects/:projectId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId/instructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/instructions"
payload = {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/instructions"
payload <- "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/projects/:projectId/instructions")
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/projects/:projectId/instructions') do |req|
req.body = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/projects/:projectId/instructions";
let payload = json!({
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
});
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}}/projects/:projectId/instructions \
--header 'content-type: application/json' \
--data '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
echo '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}' | \
http PUT {{baseUrl}}/projects/:projectId/instructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/instructions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/projects/updateInstructions.json#responseBody
POST
Adds a payable to a project. (POST)
{{baseUrl}}/v2/projects/:projectId/finance/payables
QUERY PARAMS
projectId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/payables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/finance/payables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/projects/:projectId/finance/payables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/payables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/payables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/projects/:projectId/finance/payables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/finance/payables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/payables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/payables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/finance/payables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/:projectId/finance/payables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/payables")
.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/v2/projects/:projectId/finance/payables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects/:projectId/finance/payables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/finance/payables"]
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}}/v2/projects/:projectId/finance/payables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/payables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/projects/:projectId/finance/payables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables');
$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}}/v2/projects/:projectId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects/:projectId/finance/payables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/payables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/finance/payables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/projects/:projectId/finance/payables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/finance/payables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/projects/:projectId/finance/payables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/v2/projects/:projectId/finance/payables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/payables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/payables")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/createPayable.json#responseBody
POST
Adds a receivable to a project. (POST)
{{baseUrl}}/v2/projects/:projectId/finance/receivables
QUERY PARAMS
projectId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/receivables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/finance/receivables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/projects/:projectId/finance/receivables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/receivables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/receivables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/projects/:projectId/finance/receivables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/finance/receivables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/receivables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/receivables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/finance/receivables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/:projectId/finance/receivables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/receivables")
.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/v2/projects/:projectId/finance/receivables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects/:projectId/finance/receivables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/finance/receivables"]
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}}/v2/projects/:projectId/finance/receivables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/receivables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/projects/:projectId/finance/receivables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables');
$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}}/v2/projects/:projectId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects/:projectId/finance/receivables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/receivables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/finance/receivables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/projects/:projectId/finance/receivables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/projects/:projectId/finance/receivables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/v2/projects/:projectId/finance/receivables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/receivables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/receivables")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/createReceivable.json#responseBody
POST
Adds file links to the project as added by PM.
{{baseUrl}}/v2/projects/:projectId/files/addLink
QUERY PARAMS
projectId
BODY json
{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files/addLink");
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 \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/files/addLink" {:content-type :json
:form-params {:fileLinks [{:category ""
:externalInfo {}
:filename ""
:languageCombinationIds [{:sourceLanguageId 0
:targetLanguageId 0}]
:languageIds []
:toBeGenerated false
:url ""}]}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files/addLink"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/projects/:projectId/files/addLink"),
Content = new StringContent("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/files/addLink");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files/addLink"
payload := strings.NewReader("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/projects/:projectId/files/addLink HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 305
{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/files/addLink")
.setHeader("content-type", "application/json")
.setBody("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files/addLink"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/addLink")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/files/addLink")
.header("content-type", "application/json")
.body("{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/:projectId/files/addLink');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/addLink',
headers: {'content-type': 'application/json'},
data: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files/addLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fileLinks":[{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[],"toBeGenerated":false,"url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/files/addLink',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "fileLinks": [\n {\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": [],\n "toBeGenerated": false,\n "url": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/addLink")
.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/v2/projects/:projectId/files/addLink',
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({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/addLink',
headers: {'content-type': 'application/json'},
body: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects/:projectId/files/addLink');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: [],
toBeGenerated: false,
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: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/addLink',
headers: {'content-type': 'application/json'},
data: {
fileLinks: [
{
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: [],
toBeGenerated: false,
url: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/files/addLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fileLinks":[{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[],"toBeGenerated":false,"url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"fileLinks": @[ @{ @"category": @"", @"externalInfo": @{ }, @"filename": @"", @"languageCombinationIds": @[ @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 } ], @"languageIds": @[ ], @"toBeGenerated": @NO, @"url": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/files/addLink"]
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}}/v2/projects/:projectId/files/addLink" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files/addLink",
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([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/projects/:projectId/files/addLink', [
'body' => '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files/addLink');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'fileLinks' => [
[
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
],
'toBeGenerated' => null,
'url' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files/addLink');
$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}}/v2/projects/:projectId/files/addLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files/addLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects/:projectId/files/addLink", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files/addLink"
payload = { "fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": False,
"url": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files/addLink"
payload <- "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/files/addLink")
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 \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/projects/:projectId/files/addLink') do |req|
req.body = "{\n \"fileLinks\": [\n {\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": [],\n \"toBeGenerated\": false,\n \"url\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/files/addLink";
let payload = json!({"fileLinks": (
json!({
"category": "",
"externalInfo": json!({}),
"filename": "",
"languageCombinationIds": (
json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
})
),
"languageIds": (),
"toBeGenerated": false,
"url": ""
})
)});
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}}/v2/projects/:projectId/files/addLink \
--header 'content-type: application/json' \
--data '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}'
echo '{
"fileLinks": [
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
}
]
}' | \
http POST {{baseUrl}}/v2/projects/:projectId/files/addLink \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "fileLinks": [\n {\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": [],\n "toBeGenerated": false,\n "url": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files/addLink
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["fileLinks": [
[
"category": "",
"externalInfo": [],
"filename": "",
"languageCombinationIds": [
[
"sourceLanguageId": 0,
"targetLanguageId": 0
]
],
"languageIds": [],
"toBeGenerated": false,
"url": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files/addLink")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/addFileLinks.json#responseBody
PUT
Adds files to the project as added by PM.
{{baseUrl}}/v2/projects/:projectId/files/add
QUERY PARAMS
projectId
BODY json
{
"files": [
{
"category": "",
"fileId": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files/add");
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, "/home-api/assets/examples/v2/projects/addFiles.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/files/add" {:body "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files/add"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
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}}/v2/projects/:projectId/files/add"),
Content = new StringContent("/home-api/assets/examples/v2/projects/addFiles.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/files/add");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/addFiles.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files/add"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/addFiles.json#requestBody")
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/v2/projects/:projectId/files/add HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v2/projects/addFiles.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/files/add")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/addFiles.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files/add"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/addFiles.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/addFiles.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/add")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/files/add")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/addFiles.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/addFiles.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/files/add');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/files/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
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}}/v2/projects/:projectId/files/add',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/addFiles.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/add")
.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/v2/projects/:projectId/files/add',
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('/home-api/assets/examples/v2/projects/addFiles.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/files/add',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/files/add');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/addFiles.json#requestBody');
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}}/v2/projects/:projectId/files/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/files/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/addFiles.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/files/add"]
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}}/v2/projects/:projectId/files/add" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/addFiles.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/addFiles.json#requestBody",
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}}/v2/projects/:projectId/files/add', [
'body' => '/home-api/assets/examples/v2/projects/addFiles.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files/add');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/addFiles.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/addFiles.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files/add');
$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}}/v2/projects/:projectId/files/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/files/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files/add"
payload = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files/add"
payload <- "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/files/add")
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 = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
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/v2/projects/:projectId/files/add') do |req|
req.body = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody"
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}}/v2/projects/:projectId/files/add";
let payload = "/home-api/assets/examples/v2/projects/addFiles.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/files/add \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/addFiles.json#requestBody'
echo '/home-api/assets/examples/v2/projects/addFiles.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/files/add \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/addFiles.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files/add
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/addFiles.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files/add")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Changes project status if possible (400 Bad Request is returned otherwise).
{{baseUrl}}/v2/projects/:projectId/status
QUERY PARAMS
projectId
BODY json
{
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/status");
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, "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/status" {:body "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
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}}/v2/projects/:projectId/status"),
Content = new StringContent("/home-api/assets/examples/v2/projects/changeStatus.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/status");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/status"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/changeStatus.json#requestBody")
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/v2/projects/:projectId/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
/home-api/assets/examples/v2/projects/changeStatus.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/status")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/changeStatus.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/status"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/status")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/status")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/changeStatus.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
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}}/v2/projects/:projectId/status',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/status")
.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/v2/projects/:projectId/status',
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('/home-api/assets/examples/v2/projects/changeStatus.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/status',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/status');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/changeStatus.json#requestBody');
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}}/v2/projects/:projectId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/changeStatus.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/status"]
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}}/v2/projects/:projectId/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody",
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}}/v2/projects/:projectId/status', [
'body' => '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/status');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/changeStatus.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/changeStatus.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/status');
$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}}/v2/projects/:projectId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/status"
payload = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/status"
payload <- "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/status")
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 = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
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/v2/projects/:projectId/status') do |req|
req.body = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody"
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}}/v2/projects/:projectId/status";
let payload = "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/status \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody'
echo '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/status \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/changeStatus.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/status
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/changeStatus.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Creates a new Smart Project.
{{baseUrl}}/v2/projects
BODY json
{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects");
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 \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects" {:content-type :json
:form-params {:clientId 0
:externalId ""
:name ""
:serviceId 0}})
require "http/client"
url = "{{baseUrl}}/v2/projects"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/projects"),
Content = new StringContent("{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects"
payload := strings.NewReader("{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/projects HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 71
{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects")
.header("content-type", "application/json")
.body("{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}")
.asString();
const data = JSON.stringify({
clientId: 0,
externalId: '',
name: '',
serviceId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects',
headers: {'content-type': 'application/json'},
data: {clientId: 0, externalId: '', name: '', serviceId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":0,"externalId":"","name":"","serviceId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientId": 0,\n "externalId": "",\n "name": "",\n "serviceId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects")
.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/v2/projects',
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({clientId: 0, externalId: '', name: '', serviceId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects',
headers: {'content-type': 'application/json'},
body: {clientId: 0, externalId: '', name: '', serviceId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientId: 0,
externalId: '',
name: '',
serviceId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects',
headers: {'content-type': 'application/json'},
data: {clientId: 0, externalId: '', name: '', serviceId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":0,"externalId":"","name":"","serviceId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientId": @0,
@"externalId": @"",
@"name": @"",
@"serviceId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects"]
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}}/v2/projects" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects",
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([
'clientId' => 0,
'externalId' => '',
'name' => '',
'serviceId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/projects', [
'body' => '{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientId' => 0,
'externalId' => '',
'name' => '',
'serviceId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientId' => 0,
'externalId' => '',
'name' => '',
'serviceId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects');
$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}}/v2/projects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects"
payload = {
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects"
payload <- "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects")
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 \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/projects') do |req|
req.body = "{\n \"clientId\": 0,\n \"externalId\": \"\",\n \"name\": \"\",\n \"serviceId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects";
let payload = json!({
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/projects \
--header 'content-type: application/json' \
--data '{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}'
echo '{
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
}' | \
http POST {{baseUrl}}/v2/projects \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientId": 0,\n "externalId": "",\n "name": "",\n "serviceId": 0\n}' \
--output-document \
- {{baseUrl}}/v2/projects
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientId": 0,
"externalId": "",
"name": "",
"serviceId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/createProject.json#responseBody
DELETE
Deletes a payable. (1)
{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId
QUERY PARAMS
projectId
payableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
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}}/v2/projects/:projectId/finance/payables/:payableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
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/v2/projects/:projectId/finance/payables/:payableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"))
.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}}/v2/projects/:projectId/finance/payables/:payableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.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}}/v2/projects/:projectId/finance/payables/:payableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId';
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}}/v2/projects/:projectId/finance/payables/:payableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/finance/payables/:payableId',
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}}/v2/projects/:projectId/finance/payables/:payableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
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}}/v2/projects/:projectId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId';
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}}/v2/projects/:projectId/finance/payables/:payableId"]
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}}/v2/projects/:projectId/finance/payables/:payableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId",
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}}/v2/projects/:projectId/finance/payables/:payableId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/projects/:projectId/finance/payables/:payableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
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/v2/projects/:projectId/finance/payables/:payableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId";
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}}/v2/projects/:projectId/finance/payables/:payableId
http DELETE {{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Deletes a receivable. (1)
{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId
QUERY PARAMS
projectId
receivableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
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}}/v2/projects/:projectId/finance/receivables/:receivableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
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/v2/projects/:projectId/finance/receivables/:receivableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"))
.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}}/v2/projects/:projectId/finance/receivables/:receivableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.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}}/v2/projects/:projectId/finance/receivables/:receivableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId';
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}}/v2/projects/:projectId/finance/receivables/:receivableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/finance/receivables/:receivableId',
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}}/v2/projects/:projectId/finance/receivables/:receivableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
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}}/v2/projects/:projectId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId';
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}}/v2/projects/:projectId/finance/receivables/:receivableId"]
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}}/v2/projects/:projectId/finance/receivables/:receivableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId",
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}}/v2/projects/:projectId/finance/receivables/:receivableId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/projects/:projectId/finance/receivables/:receivableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
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/v2/projects/:projectId/finance/receivables/:receivableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId";
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}}/v2/projects/:projectId/finance/receivables/:receivableId
http DELETE {{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Downloads a file content.
{{baseUrl}}/v2/projects/files/:fileId/download/:fileName
QUERY PARAMS
fileId
fileName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")
require "http/client"
url = "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName"
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}}/v2/projects/files/:fileId/download/:fileName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/files/:fileId/download/:fileName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName"
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/v2/projects/files/:fileId/download/:fileName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/files/:fileId/download/:fileName"))
.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}}/v2/projects/files/:fileId/download/:fileName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")
.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}}/v2/projects/files/:fileId/download/:fileName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName';
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}}/v2/projects/files/:fileId/download/:fileName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/files/:fileId/download/:fileName',
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}}/v2/projects/files/:fileId/download/:fileName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName');
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}}/v2/projects/files/:fileId/download/:fileName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName';
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}}/v2/projects/files/:fileId/download/:fileName"]
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}}/v2/projects/files/:fileId/download/:fileName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/files/:fileId/download/:fileName",
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}}/v2/projects/files/:fileId/download/:fileName');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/files/:fileId/download/:fileName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/files/:fileId/download/:fileName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/files/:fileId/download/:fileName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/files/:fileId/download/:fileName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")
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/v2/projects/files/:fileId/download/:fileName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName";
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}}/v2/projects/files/:fileId/download/:fileName
http GET {{baseUrl}}/v2/projects/files/:fileId/download/:fileName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/files/:fileId/download/:fileName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/files/:fileId/download/:fileName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Prepares a ZIP archive that contains the specified files.
{{baseUrl}}/v2/projects/files/archive
BODY json
{
"files": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/files/archive");
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 \"files\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/files/archive" {:content-type :json
:form-params {:files []}})
require "http/client"
url = "{{baseUrl}}/v2/projects/files/archive"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"files\": []\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}}/v2/projects/files/archive"),
Content = new StringContent("{\n \"files\": []\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}}/v2/projects/files/archive");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"files\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/files/archive"
payload := strings.NewReader("{\n \"files\": []\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/v2/projects/files/archive HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"files": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/files/archive")
.setHeader("content-type", "application/json")
.setBody("{\n \"files\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/files/archive"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"files\": []\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 \"files\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/files/archive")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/files/archive")
.header("content-type", "application/json")
.body("{\n \"files\": []\n}")
.asString();
const data = JSON.stringify({
files: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/files/archive');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/files/archive',
headers: {'content-type': 'application/json'},
data: {files: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/files/archive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"files":[]}'
};
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}}/v2/projects/files/archive',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "files": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"files\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/files/archive")
.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/v2/projects/files/archive',
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({files: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/files/archive',
headers: {'content-type': 'application/json'},
body: {files: []},
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}}/v2/projects/files/archive');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
files: []
});
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}}/v2/projects/files/archive',
headers: {'content-type': 'application/json'},
data: {files: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/files/archive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"files":[]}'
};
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 = @{ @"files": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/files/archive"]
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}}/v2/projects/files/archive" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"files\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/files/archive",
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([
'files' => [
]
]),
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}}/v2/projects/files/archive', [
'body' => '{
"files": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/files/archive');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'files' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'files' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/files/archive');
$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}}/v2/projects/files/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"files": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/files/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"files": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"files\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects/files/archive", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/files/archive"
payload = { "files": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/files/archive"
payload <- "{\n \"files\": []\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}}/v2/projects/files/archive")
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 \"files\": []\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/v2/projects/files/archive') do |req|
req.body = "{\n \"files\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/files/archive";
let payload = json!({"files": ()});
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}}/v2/projects/files/archive \
--header 'content-type: application/json' \
--data '{
"files": []
}'
echo '{
"files": []
}' | \
http POST {{baseUrl}}/v2/projects/files/archive \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "files": []\n}' \
--output-document \
- {{baseUrl}}/v2/projects/files/archive
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["files": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/files/archive")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/archive.json#responseBody
GET
Returns Client Contacts information for a project.
{{baseUrl}}/v2/projects/:projectId/clientContacts
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/clientContacts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/clientContacts")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/clientContacts"
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}}/v2/projects/:projectId/clientContacts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/clientContacts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/clientContacts"
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/v2/projects/:projectId/clientContacts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/clientContacts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/clientContacts"))
.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}}/v2/projects/:projectId/clientContacts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/clientContacts")
.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}}/v2/projects/:projectId/clientContacts');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/clientContacts';
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}}/v2/projects/:projectId/clientContacts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientContacts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/clientContacts',
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}}/v2/projects/:projectId/clientContacts'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/clientContacts');
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}}/v2/projects/:projectId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/clientContacts';
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}}/v2/projects/:projectId/clientContacts"]
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}}/v2/projects/:projectId/clientContacts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/clientContacts",
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}}/v2/projects/:projectId/clientContacts');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/clientContacts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/clientContacts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/clientContacts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/clientContacts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/clientContacts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/clientContacts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/clientContacts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/clientContacts")
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/v2/projects/:projectId/clientContacts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/clientContacts";
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}}/v2/projects/:projectId/clientContacts
http GET {{baseUrl}}/v2/projects/:projectId/clientContacts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/clientContacts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/clientContacts")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getClientContacts.json#responseBody
GET
Returns a list of custom field keys and values for a project.
{{baseUrl}}/v2/projects/:projectId/customFields
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/customFields")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/customFields"
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}}/v2/projects/:projectId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/customFields"
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/v2/projects/:projectId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/customFields"))
.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}}/v2/projects/:projectId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/customFields")
.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}}/v2/projects/:projectId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/customFields';
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}}/v2/projects/:projectId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/customFields',
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}}/v2/projects/:projectId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/customFields');
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}}/v2/projects/:projectId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/customFields';
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}}/v2/projects/:projectId/customFields"]
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}}/v2/projects/:projectId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/customFields",
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}}/v2/projects/:projectId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/customFields")
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/v2/projects/:projectId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/customFields";
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}}/v2/projects/:projectId/customFields
http GET {{baseUrl}}/v2/projects/:projectId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/customFields")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getCustomFields.json#responseBody
GET
Returns details of a file.
{{baseUrl}}/v2/projects/files/:fileId
QUERY PARAMS
fileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/files/:fileId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/files/:fileId")
require "http/client"
url = "{{baseUrl}}/v2/projects/files/:fileId"
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}}/v2/projects/files/:fileId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/files/:fileId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/files/:fileId"
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/v2/projects/files/:fileId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/files/:fileId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/files/:fileId"))
.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}}/v2/projects/files/:fileId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/files/:fileId")
.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}}/v2/projects/files/:fileId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/projects/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/files/:fileId';
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}}/v2/projects/files/:fileId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/files/:fileId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/files/:fileId',
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}}/v2/projects/files/:fileId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/files/:fileId');
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}}/v2/projects/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/files/:fileId';
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}}/v2/projects/files/:fileId"]
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}}/v2/projects/files/:fileId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/files/:fileId",
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}}/v2/projects/files/:fileId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/files/:fileId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/files/:fileId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/files/:fileId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/files/:fileId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/files/:fileId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/files/:fileId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/files/:fileId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/files/:fileId")
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/v2/projects/files/:fileId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/files/:fileId";
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}}/v2/projects/files/:fileId
http GET {{baseUrl}}/v2/projects/files/:fileId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/files/:fileId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/files/:fileId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getFileById.json#responseBody
GET
Returns finance information for a project.
{{baseUrl}}/v2/projects/:projectId/finance
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/finance")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance"
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}}/v2/projects/:projectId/finance"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance"
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/v2/projects/:projectId/finance HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/finance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance"))
.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}}/v2/projects/:projectId/finance")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/finance")
.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}}/v2/projects/:projectId/finance');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/finance'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance';
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}}/v2/projects/:projectId/finance',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/finance',
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}}/v2/projects/:projectId/finance'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/finance');
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}}/v2/projects/:projectId/finance'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance';
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}}/v2/projects/:projectId/finance"]
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}}/v2/projects/:projectId/finance" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance",
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}}/v2/projects/:projectId/finance');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/finance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/finance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/finance")
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/v2/projects/:projectId/finance') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/finance";
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}}/v2/projects/:projectId/finance
http GET {{baseUrl}}/v2/projects/:projectId/finance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getFinance.json#responseBody
GET
Returns if cat tool project is created or queued.
{{baseUrl}}/v2/projects/:projectId/catToolProject
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/catToolProject");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/catToolProject")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/catToolProject"
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}}/v2/projects/:projectId/catToolProject"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/catToolProject");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/catToolProject"
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/v2/projects/:projectId/catToolProject HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/catToolProject")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/catToolProject"))
.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}}/v2/projects/:projectId/catToolProject")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/catToolProject")
.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}}/v2/projects/:projectId/catToolProject');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/catToolProject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/catToolProject';
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}}/v2/projects/:projectId/catToolProject',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/catToolProject")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/catToolProject',
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}}/v2/projects/:projectId/catToolProject'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/catToolProject');
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}}/v2/projects/:projectId/catToolProject'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/catToolProject';
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}}/v2/projects/:projectId/catToolProject"]
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}}/v2/projects/:projectId/catToolProject" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/catToolProject",
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}}/v2/projects/:projectId/catToolProject');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/catToolProject');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/catToolProject');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/catToolProject' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/catToolProject' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/catToolProject")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/catToolProject"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/catToolProject"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/catToolProject")
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/v2/projects/:projectId/catToolProject') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/catToolProject";
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}}/v2/projects/:projectId/catToolProject
http GET {{baseUrl}}/v2/projects/:projectId/catToolProject
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/catToolProject
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/catToolProject")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns list of files in a project, that are ready to be delivered to client.
{{baseUrl}}/v2/projects/:projectId/files/deliverable
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files/deliverable");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/files/deliverable")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files/deliverable"
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}}/v2/projects/:projectId/files/deliverable"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/files/deliverable");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files/deliverable"
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/v2/projects/:projectId/files/deliverable HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/files/deliverable")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files/deliverable"))
.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}}/v2/projects/:projectId/files/deliverable")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/files/deliverable")
.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}}/v2/projects/:projectId/files/deliverable');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/files/deliverable'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files/deliverable';
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}}/v2/projects/:projectId/files/deliverable',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/deliverable")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/files/deliverable',
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}}/v2/projects/:projectId/files/deliverable'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/files/deliverable');
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}}/v2/projects/:projectId/files/deliverable'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/files/deliverable';
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}}/v2/projects/:projectId/files/deliverable"]
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}}/v2/projects/:projectId/files/deliverable" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files/deliverable",
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}}/v2/projects/:projectId/files/deliverable');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files/deliverable');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files/deliverable');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/files/deliverable' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files/deliverable' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/files/deliverable")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files/deliverable"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files/deliverable"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/files/deliverable")
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/v2/projects/:projectId/files/deliverable') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/files/deliverable";
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}}/v2/projects/:projectId/files/deliverable
http GET {{baseUrl}}/v2/projects/:projectId/files/deliverable
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files/deliverable
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files/deliverable")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getDeliverableFiles.json#responseBody
GET
Returns list of files in a project.
{{baseUrl}}/v2/projects/:projectId/files
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/files")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files"
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}}/v2/projects/:projectId/files"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/files");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files"
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/v2/projects/:projectId/files HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/files")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files"))
.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}}/v2/projects/:projectId/files")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/files")
.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}}/v2/projects/:projectId/files');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/projects/:projectId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files';
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}}/v2/projects/:projectId/files',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/files',
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}}/v2/projects/:projectId/files'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/files');
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}}/v2/projects/:projectId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/files';
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}}/v2/projects/:projectId/files"]
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}}/v2/projects/:projectId/files" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files",
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}}/v2/projects/:projectId/files');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/files' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/files")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/files")
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/v2/projects/:projectId/files') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/files";
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}}/v2/projects/:projectId/files
http GET {{baseUrl}}/v2/projects/:projectId/files
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getFiles.json#responseBody
GET
Returns list of jobs in a project.
{{baseUrl}}/v2/projects/:projectId/jobs
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/jobs")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/jobs"
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}}/v2/projects/:projectId/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/jobs"
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/v2/projects/:projectId/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/jobs"))
.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}}/v2/projects/:projectId/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/jobs")
.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}}/v2/projects/:projectId/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/projects/:projectId/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/jobs';
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}}/v2/projects/:projectId/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/jobs',
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}}/v2/projects/:projectId/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/jobs');
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}}/v2/projects/:projectId/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/jobs';
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}}/v2/projects/:projectId/jobs"]
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}}/v2/projects/:projectId/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/jobs",
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}}/v2/projects/:projectId/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/jobs")
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/v2/projects/:projectId/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/jobs";
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}}/v2/projects/:projectId/jobs
http GET {{baseUrl}}/v2/projects/:projectId/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/jobs")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getJobs.json#responseBody
GET
Returns process id. (GET)
{{baseUrl}}/v2/projects/:projectId/process
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/process");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId/process")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/process"
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}}/v2/projects/:projectId/process"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/process");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/process"
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/v2/projects/:projectId/process HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId/process")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/process"))
.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}}/v2/projects/:projectId/process")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId/process")
.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}}/v2/projects/:projectId/process');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/:projectId/process'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/process';
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}}/v2/projects/:projectId/process',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/process")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/process',
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}}/v2/projects/:projectId/process'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId/process');
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}}/v2/projects/:projectId/process'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/process';
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}}/v2/projects/:projectId/process"]
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}}/v2/projects/:projectId/process" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/process",
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}}/v2/projects/:projectId/process');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/process');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/process');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/process' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/process' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId/process")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/process"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/process"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/process")
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/v2/projects/:projectId/process') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/process";
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}}/v2/projects/:projectId/process
http GET {{baseUrl}}/v2/projects/:projectId/process
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/process
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/process")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Returns process id.
{{baseUrl}}/v2/projects/:projectId/addJob
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/addJob");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/addJob")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/addJob"
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}}/v2/projects/:projectId/addJob"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/addJob");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/addJob"
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/v2/projects/:projectId/addJob HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/addJob")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/addJob"))
.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}}/v2/projects/:projectId/addJob")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/addJob")
.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}}/v2/projects/:projectId/addJob');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/addJob'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/addJob';
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}}/v2/projects/:projectId/addJob',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/addJob")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/addJob',
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}}/v2/projects/:projectId/addJob'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects/:projectId/addJob');
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}}/v2/projects/:projectId/addJob'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/addJob';
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}}/v2/projects/:projectId/addJob"]
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}}/v2/projects/:projectId/addJob" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/addJob",
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}}/v2/projects/:projectId/addJob');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/addJob');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId/addJob');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/addJob' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/addJob' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/v2/projects/:projectId/addJob")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/addJob"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/addJob"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/addJob")
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/v2/projects/:projectId/addJob') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/addJob";
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}}/v2/projects/:projectId/addJob
http POST {{baseUrl}}/v2/projects/:projectId/addJob
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/addJob
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/addJob")! 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()
GET
Returns project details. (1)
{{baseUrl}}/v2/projects/:projectId
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/:projectId")
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId"
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}}/v2/projects/:projectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId"
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/v2/projects/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId"))
.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}}/v2/projects/:projectId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/:projectId")
.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}}/v2/projects/:projectId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId';
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}}/v2/projects/:projectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId',
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}}/v2/projects/:projectId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/:projectId');
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}}/v2/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId';
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}}/v2/projects/:projectId"]
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}}/v2/projects/:projectId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId",
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}}/v2/projects/:projectId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/:projectId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId")
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/v2/projects/:projectId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId";
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}}/v2/projects/:projectId
http GET {{baseUrl}}/v2/projects/:projectId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getById.json#responseBody
GET
Returns project details. (GET)
{{baseUrl}}/v2/projects/for-external-id/:externalProjectId
QUERY PARAMS
externalProjectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")
require "http/client"
url = "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId"
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}}/v2/projects/for-external-id/:externalProjectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/for-external-id/:externalProjectId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId"
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/v2/projects/for-external-id/:externalProjectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/for-external-id/:externalProjectId"))
.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}}/v2/projects/for-external-id/:externalProjectId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")
.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}}/v2/projects/for-external-id/:externalProjectId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId';
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}}/v2/projects/for-external-id/:externalProjectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/for-external-id/:externalProjectId',
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}}/v2/projects/for-external-id/:externalProjectId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId');
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}}/v2/projects/for-external-id/:externalProjectId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId';
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}}/v2/projects/for-external-id/:externalProjectId"]
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}}/v2/projects/for-external-id/:externalProjectId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/for-external-id/:externalProjectId",
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}}/v2/projects/for-external-id/:externalProjectId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/for-external-id/:externalProjectId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/projects/for-external-id/:externalProjectId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/for-external-id/:externalProjectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/projects/for-external-id/:externalProjectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")
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/v2/projects/for-external-id/:externalProjectId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId";
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}}/v2/projects/for-external-id/:externalProjectId
http GET {{baseUrl}}/v2/projects/for-external-id/:externalProjectId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/projects/for-external-id/:externalProjectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/for-external-id/:externalProjectId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/getById.json#responseBody
PUT
Updates Client Contacts for a project.
{{baseUrl}}/v2/projects/:projectId/clientContacts
QUERY PARAMS
projectId
BODY json
{
"additionalIds": [],
"primaryId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/clientContacts");
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 \"additionalIds\": [],\n \"primaryId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/clientContacts" {:content-type :json
:form-params {:additionalIds []
:primaryId 0}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/clientContacts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/projects/:projectId/clientContacts"),
Content = new StringContent("{\n \"additionalIds\": [],\n \"primaryId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/clientContacts");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/clientContacts"
payload := strings.NewReader("{\n \"additionalIds\": [],\n \"primaryId\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/projects/:projectId/clientContacts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 43
{
"additionalIds": [],
"primaryId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/clientContacts")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalIds\": [],\n \"primaryId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/clientContacts"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"additionalIds\": [],\n \"primaryId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientContacts")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/clientContacts")
.header("content-type", "application/json")
.body("{\n \"additionalIds\": [],\n \"primaryId\": 0\n}")
.asString();
const data = JSON.stringify({
additionalIds: [],
primaryId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/clientContacts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientContacts',
headers: {'content-type': 'application/json'},
data: {additionalIds: [], primaryId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/clientContacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"additionalIds":[],"primaryId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/clientContacts',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalIds": [],\n "primaryId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientContacts")
.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/v2/projects/:projectId/clientContacts',
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({additionalIds: [], primaryId: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientContacts',
headers: {'content-type': 'application/json'},
body: {additionalIds: [], primaryId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/clientContacts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalIds: [],
primaryId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientContacts',
headers: {'content-type': 'application/json'},
data: {additionalIds: [], primaryId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/clientContacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"additionalIds":[],"primaryId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalIds": @[ ],
@"primaryId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/clientContacts"]
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}}/v2/projects/:projectId/clientContacts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/clientContacts",
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([
'additionalIds' => [
],
'primaryId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/projects/:projectId/clientContacts', [
'body' => '{
"additionalIds": [],
"primaryId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/clientContacts');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalIds' => [
],
'primaryId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalIds' => [
],
'primaryId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/clientContacts');
$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}}/v2/projects/:projectId/clientContacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"additionalIds": [],
"primaryId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/clientContacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"additionalIds": [],
"primaryId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/clientContacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/clientContacts"
payload = {
"additionalIds": [],
"primaryId": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/clientContacts"
payload <- "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/clientContacts")
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 \"additionalIds\": [],\n \"primaryId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/projects/:projectId/clientContacts') do |req|
req.body = "{\n \"additionalIds\": [],\n \"primaryId\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/clientContacts";
let payload = json!({
"additionalIds": (),
"primaryId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/clientContacts \
--header 'content-type: application/json' \
--data '{
"additionalIds": [],
"primaryId": 0
}'
echo '{
"additionalIds": [],
"primaryId": 0
}' | \
http PUT {{baseUrl}}/v2/projects/:projectId/clientContacts \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "additionalIds": [],\n "primaryId": 0\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/clientContacts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalIds": [],
"primaryId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/clientContacts")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/updateClientContacts.json#responseBody
PUT
Updates Client Deadline for a project.
{{baseUrl}}/v2/projects/:projectId/clientDeadline
QUERY PARAMS
projectId
BODY json
{
"value": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/clientDeadline");
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, "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/clientDeadline" {:body "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/clientDeadline"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
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}}/v2/projects/:projectId/clientDeadline"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/clientDeadline");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/clientDeadline"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody")
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/v2/projects/:projectId/clientDeadline HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/clientDeadline")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/clientDeadline"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientDeadline")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/clientDeadline")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/clientDeadline');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientDeadline',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/clientDeadline';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
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}}/v2/projects/:projectId/clientDeadline',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientDeadline")
.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/v2/projects/:projectId/clientDeadline',
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('/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientDeadline',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/clientDeadline');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody');
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}}/v2/projects/:projectId/clientDeadline',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/clientDeadline';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/clientDeadline"]
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}}/v2/projects/:projectId/clientDeadline" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/clientDeadline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody",
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}}/v2/projects/:projectId/clientDeadline', [
'body' => '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/clientDeadline');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/clientDeadline');
$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}}/v2/projects/:projectId/clientDeadline' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/clientDeadline' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/clientDeadline", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/clientDeadline"
payload = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/clientDeadline"
payload <- "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/clientDeadline")
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 = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
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/v2/projects/:projectId/clientDeadline') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody"
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}}/v2/projects/:projectId/clientDeadline";
let payload = "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/clientDeadline \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/clientDeadline \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/clientDeadline
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateClientDeadline.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/clientDeadline")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Client Notes for a project.
{{baseUrl}}/v2/projects/:projectId/clientNotes
QUERY PARAMS
projectId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/clientNotes");
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, "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/clientNotes" {:body "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/clientNotes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
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}}/v2/projects/:projectId/clientNotes"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/clientNotes");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/clientNotes"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody")
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/v2/projects/:projectId/clientNotes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 72
/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/clientNotes")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/clientNotes"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientNotes")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/clientNotes")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/clientNotes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/clientNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
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}}/v2/projects/:projectId/clientNotes',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientNotes")
.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/v2/projects/:projectId/clientNotes',
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('/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientNotes',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/clientNotes');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody');
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}}/v2/projects/:projectId/clientNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/clientNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/clientNotes"]
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}}/v2/projects/:projectId/clientNotes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/clientNotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody",
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}}/v2/projects/:projectId/clientNotes', [
'body' => '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/clientNotes');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/clientNotes');
$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}}/v2/projects/:projectId/clientNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/clientNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/clientNotes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/clientNotes"
payload = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/clientNotes"
payload <- "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/clientNotes")
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 = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
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/v2/projects/:projectId/clientNotes') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody"
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}}/v2/projects/:projectId/clientNotes";
let payload = "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/clientNotes \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/clientNotes \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/clientNotes
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateClientNotes.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/clientNotes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Client Reference Number for a project.
{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber
QUERY PARAMS
projectId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber");
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, "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber" {:body "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
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}}/v2/projects/:projectId/clientReferenceNumber"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody")
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/v2/projects/:projectId/clientReferenceNumber HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
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}}/v2/projects/:projectId/clientReferenceNumber',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")
.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/v2/projects/:projectId/clientReferenceNumber',
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('/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody');
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}}/v2/projects/:projectId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"]
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}}/v2/projects/:projectId/clientReferenceNumber" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody",
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}}/v2/projects/:projectId/clientReferenceNumber', [
'body' => '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber');
$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}}/v2/projects/:projectId/clientReferenceNumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/clientReferenceNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"
payload = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber"
payload <- "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")
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 = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
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/v2/projects/:projectId/clientReferenceNumber') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody"
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}}/v2/projects/:projectId/clientReferenceNumber";
let payload = "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/clientReferenceNumber \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/clientReferenceNumber \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/clientReferenceNumber
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateClientReferenceNumber.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/clientReferenceNumber")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Internal Notes for a project.
{{baseUrl}}/v2/projects/:projectId/internalNotes
QUERY PARAMS
projectId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/internalNotes");
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, "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/internalNotes" {:body "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/internalNotes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
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}}/v2/projects/:projectId/internalNotes"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/internalNotes");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/internalNotes"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody")
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/v2/projects/:projectId/internalNotes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/internalNotes")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/internalNotes"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/internalNotes")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/internalNotes")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/internalNotes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/internalNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/internalNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
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}}/v2/projects/:projectId/internalNotes',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/internalNotes")
.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/v2/projects/:projectId/internalNotes',
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('/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/internalNotes',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/internalNotes');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody');
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}}/v2/projects/:projectId/internalNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/internalNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/internalNotes"]
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}}/v2/projects/:projectId/internalNotes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/internalNotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody",
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}}/v2/projects/:projectId/internalNotes', [
'body' => '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/internalNotes');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/internalNotes');
$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}}/v2/projects/:projectId/internalNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/internalNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/internalNotes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/internalNotes"
payload = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/internalNotes"
payload <- "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/internalNotes")
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 = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
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/v2/projects/:projectId/internalNotes') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody"
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}}/v2/projects/:projectId/internalNotes";
let payload = "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/internalNotes \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/internalNotes \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/internalNotes
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateInternalNotes.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/internalNotes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Order Date for a project.
{{baseUrl}}/v2/projects/:projectId/orderDate
QUERY PARAMS
projectId
BODY json
{
"value": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/orderDate");
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, "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/orderDate" {:body "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/orderDate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
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}}/v2/projects/:projectId/orderDate"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/orderDate");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/orderDate"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody")
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/v2/projects/:projectId/orderDate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70
/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/orderDate")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/orderDate"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/orderDate")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/orderDate")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/orderDate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/orderDate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/orderDate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
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}}/v2/projects/:projectId/orderDate',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/orderDate")
.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/v2/projects/:projectId/orderDate',
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('/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/orderDate',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/orderDate');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody');
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}}/v2/projects/:projectId/orderDate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/orderDate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/orderDate"]
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}}/v2/projects/:projectId/orderDate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/orderDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody",
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}}/v2/projects/:projectId/orderDate', [
'body' => '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/orderDate');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/orderDate');
$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}}/v2/projects/:projectId/orderDate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/orderDate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/orderDate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/orderDate"
payload = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/orderDate"
payload <- "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/orderDate")
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 = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
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/v2/projects/:projectId/orderDate') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody"
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}}/v2/projects/:projectId/orderDate";
let payload = "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/orderDate \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/orderDate \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/orderDate
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateOrderedOn.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/orderDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates a custom field with a specified key in a project
{{baseUrl}}/v2/projects/:projectId/customFields/:key
QUERY PARAMS
projectId
key
BODY json
{
"value": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/customFields/:key");
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, "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/customFields/:key" {:body "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/customFields/:key"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
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}}/v2/projects/:projectId/customFields/:key"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/customFields/:key");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/customFields/:key"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody")
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/v2/projects/:projectId/customFields/:key HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 72
/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/customFields/:key")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/customFields/:key"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/customFields/:key")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/customFields/:key")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/customFields/:key');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/customFields/:key',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/customFields/:key';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
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}}/v2/projects/:projectId/customFields/:key',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/customFields/:key")
.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/v2/projects/:projectId/customFields/:key',
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('/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/customFields/:key',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/customFields/:key');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody');
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}}/v2/projects/:projectId/customFields/:key',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/customFields/:key';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/customFields/:key"]
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}}/v2/projects/:projectId/customFields/:key" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/customFields/:key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody",
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}}/v2/projects/:projectId/customFields/:key', [
'body' => '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/customFields/:key');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/customFields/:key');
$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}}/v2/projects/:projectId/customFields/:key' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/customFields/:key' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/customFields/:key", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/customFields/:key"
payload = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/customFields/:key"
payload <- "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/customFields/:key")
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 = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
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/v2/projects/:projectId/customFields/:key') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody"
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}}/v2/projects/:projectId/customFields/:key";
let payload = "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/customFields/:key \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/customFields/:key \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/customFields/:key
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateCustomField.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/customFields/:key")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates a payable. (1)
{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId
QUERY PARAMS
projectId
payableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/payables/:payableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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/v2/projects/:projectId/finance/payables/:payableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")
.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/v2/projects/:projectId/finance/payables/:payableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"]
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}}/v2/projects/:projectId/finance/payables/:payableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId');
$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}}/v2/projects/:projectId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/finance/payables/:payableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/payables/:payableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/projects/:projectId/finance/payables/:payableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/payables/:payableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
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}}/v2/projects/:projectId/finance/payables/:payableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/payables/:payableId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/updatePayable.json#responseBody
PUT
Updates a receivable. (1)
{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId
QUERY PARAMS
projectId
receivableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/receivables/:receivableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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/v2/projects/:projectId/finance/receivables/:receivableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")
.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/v2/projects/:projectId/finance/receivables/:receivableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"]
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}}/v2/projects/:projectId/finance/receivables/:receivableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId');
$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}}/v2/projects/:projectId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/finance/receivables/:receivableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/receivables/:receivableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/projects/:projectId/finance/receivables/:receivableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/projects/:projectId/finance/receivables/:receivableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
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}}/v2/projects/:projectId/finance/receivables/:receivableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/finance/receivables/:receivableId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/updateReceivable.json#responseBody
PUT
Updates instructions for all vendors performing the jobs in a project.
{{baseUrl}}/v2/projects/:projectId/vendorInstructions
QUERY PARAMS
projectId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/vendorInstructions");
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, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/vendorInstructions" {:body "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/vendorInstructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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}}/v2/projects/:projectId/vendorInstructions"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/vendorInstructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/vendorInstructions"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
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/v2/projects/:projectId/vendorInstructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/vendorInstructions")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/vendorInstructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/vendorInstructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/vendorInstructions")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/vendorInstructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/vendorInstructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/vendorInstructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
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}}/v2/projects/:projectId/vendorInstructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/vendorInstructions")
.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/v2/projects/:projectId/vendorInstructions',
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('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/vendorInstructions',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/vendorInstructions');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
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}}/v2/projects/:projectId/vendorInstructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/vendorInstructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/vendorInstructions"]
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}}/v2/projects/:projectId/vendorInstructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/vendorInstructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody",
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}}/v2/projects/:projectId/vendorInstructions', [
'body' => '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/vendorInstructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/vendorInstructions');
$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}}/v2/projects/:projectId/vendorInstructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/vendorInstructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/vendorInstructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/vendorInstructions"
payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/vendorInstructions"
payload <- "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/vendorInstructions")
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 = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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/v2/projects/:projectId/vendorInstructions') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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}}/v2/projects/:projectId/vendorInstructions";
let payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/vendorInstructions \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/vendorInstructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/vendorInstructions
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/vendorInstructions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates source language for a project.
{{baseUrl}}/v2/projects/:projectId/sourceLanguage
QUERY PARAMS
projectId
BODY json
{
"sourceLanguageId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/sourceLanguage");
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, "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/sourceLanguage" {:body "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/sourceLanguage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
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}}/v2/projects/:projectId/sourceLanguage"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/sourceLanguage");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/sourceLanguage"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody")
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/v2/projects/:projectId/sourceLanguage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/sourceLanguage")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/sourceLanguage"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/sourceLanguage")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/sourceLanguage")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/sourceLanguage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/sourceLanguage',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/sourceLanguage';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
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}}/v2/projects/:projectId/sourceLanguage',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/sourceLanguage")
.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/v2/projects/:projectId/sourceLanguage',
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('/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/sourceLanguage',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/sourceLanguage');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody');
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}}/v2/projects/:projectId/sourceLanguage',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/sourceLanguage';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/sourceLanguage"]
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}}/v2/projects/:projectId/sourceLanguage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/sourceLanguage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody",
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}}/v2/projects/:projectId/sourceLanguage', [
'body' => '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/sourceLanguage');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/sourceLanguage');
$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}}/v2/projects/:projectId/sourceLanguage' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/sourceLanguage' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/sourceLanguage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/sourceLanguage"
payload = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/sourceLanguage"
payload <- "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/sourceLanguage")
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 = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
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/v2/projects/:projectId/sourceLanguage') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody"
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}}/v2/projects/:projectId/sourceLanguage";
let payload = "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/sourceLanguage \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/sourceLanguage \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/sourceLanguage
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateSourceLanguage.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/sourceLanguage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates specialization for a project.
{{baseUrl}}/v2/projects/:projectId/specialization
QUERY PARAMS
projectId
BODY json
{
"specializationId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/specialization");
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, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/specialization" {:body "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/specialization"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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}}/v2/projects/:projectId/specialization"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/specialization");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/specialization"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
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/v2/projects/:projectId/specialization HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/specialization")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/specialization"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/specialization")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/specialization")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/specialization');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/specialization',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/specialization';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
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}}/v2/projects/:projectId/specialization',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/specialization")
.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/v2/projects/:projectId/specialization',
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('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/specialization',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/specialization');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
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}}/v2/projects/:projectId/specialization',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/specialization';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/specialization"]
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}}/v2/projects/:projectId/specialization" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/specialization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody",
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}}/v2/projects/:projectId/specialization', [
'body' => '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/specialization');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/specialization');
$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}}/v2/projects/:projectId/specialization' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/specialization' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/specialization", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/specialization"
payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/specialization"
payload <- "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/specialization")
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 = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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/v2/projects/:projectId/specialization') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody"
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}}/v2/projects/:projectId/specialization";
let payload = "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/specialization \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/specialization \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/specialization
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateSpecialization.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/specialization")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates target languages for a project.
{{baseUrl}}/v2/projects/:projectId/targetLanguages
QUERY PARAMS
projectId
BODY json
{
"targetLanguageIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/targetLanguages");
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, "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/targetLanguages" {:body "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/targetLanguages"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
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}}/v2/projects/:projectId/targetLanguages"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/targetLanguages");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/targetLanguages"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody")
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/v2/projects/:projectId/targetLanguages HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/targetLanguages")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/targetLanguages"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/targetLanguages")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/targetLanguages")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/targetLanguages');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/targetLanguages',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/targetLanguages';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
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}}/v2/projects/:projectId/targetLanguages',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/targetLanguages")
.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/v2/projects/:projectId/targetLanguages',
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('/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/targetLanguages',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/targetLanguages');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody');
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}}/v2/projects/:projectId/targetLanguages',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/targetLanguages';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/targetLanguages"]
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}}/v2/projects/:projectId/targetLanguages" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/targetLanguages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody",
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}}/v2/projects/:projectId/targetLanguages', [
'body' => '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/targetLanguages');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/targetLanguages');
$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}}/v2/projects/:projectId/targetLanguages' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/targetLanguages' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/targetLanguages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/targetLanguages"
payload = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/targetLanguages"
payload <- "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/targetLanguages")
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 = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
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/v2/projects/:projectId/targetLanguages') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody"
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}}/v2/projects/:projectId/targetLanguages";
let payload = "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/targetLanguages \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/targetLanguages \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/targetLanguages
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateTargetLanguages.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/targetLanguages")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates volume for a project.
{{baseUrl}}/v2/projects/:projectId/volume
QUERY PARAMS
projectId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/volume");
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, "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/projects/:projectId/volume" {:body "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/volume"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
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}}/v2/projects/:projectId/volume"),
Content = new StringContent("/home-api/assets/examples/v2/projects/updateVolume.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/volume");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/volume"
payload := strings.NewReader("/home-api/assets/examples/v2/projects/updateVolume.json#requestBody")
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/v2/projects/:projectId/volume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
/home-api/assets/examples/v2/projects/updateVolume.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/projects/:projectId/volume")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/projects/updateVolume.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/volume"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/volume")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/projects/:projectId/volume")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/projects/updateVolume.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/projects/:projectId/volume');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/volume',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/volume';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
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}}/v2/projects/:projectId/volume',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/volume")
.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/v2/projects/:projectId/volume',
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('/home-api/assets/examples/v2/projects/updateVolume.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/projects/:projectId/volume',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/projects/:projectId/volume');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/projects/updateVolume.json#requestBody');
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}}/v2/projects/:projectId/volume',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/volume';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/projects/updateVolume.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/volume"]
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}}/v2/projects/:projectId/volume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/volume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody",
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}}/v2/projects/:projectId/volume', [
'body' => '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/volume');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/projects/updateVolume.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/projects/updateVolume.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/volume');
$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}}/v2/projects/:projectId/volume' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/volume' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/projects/:projectId/volume", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/volume"
payload = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/volume"
payload <- "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/volume")
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 = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
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/v2/projects/:projectId/volume') do |req|
req.body = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody"
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}}/v2/projects/:projectId/volume";
let payload = "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/projects/:projectId/volume \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody'
echo '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody' | \
http PUT {{baseUrl}}/v2/projects/:projectId/volume \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/projects/updateVolume.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/volume
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/projects/updateVolume.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/volume")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Uploads file to the project as a file uploaded by PM.
{{baseUrl}}/v2/projects/:projectId/files/upload
QUERY PARAMS
projectId
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files/upload");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/files/upload" {:multipart [{:name "file"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files/upload"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\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}}/v2/projects/:projectId/files/upload"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "file",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/projects/:projectId/files/upload");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/projects/:projectId/files/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 113
-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/files/upload")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files/upload"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/files/upload")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('file', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/:projectId/files/upload');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files/upload';
const form = new FormData();
form.append('file', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('file', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/projects/:projectId/files/upload',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/projects/:projectId/files/upload',
headers: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {file: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/projects/:projectId/files/upload');
req.headers({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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}}/v2/projects/:projectId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('file', '');
const url = '{{baseUrl}}/v2/projects/:projectId/files/upload';
const options = {method: 'POST'};
options.body = formData;
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": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"file", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/files/upload"]
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}}/v2/projects/:projectId/files/upload" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/projects/:projectId/files/upload', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files/upload');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files/upload');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/projects/:projectId/files/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/v2/projects/:projectId/files/upload", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files/upload"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files/upload"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/projects/:projectId/files/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/v2/projects/:projectId/files/upload') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/files/upload";
let form = reqwest::multipart::Form::new()
.text("file", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/projects/:projectId/files/upload \
--header 'content-type: multipart/form-data' \
--form file=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/v2/projects/:projectId/files/upload \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files/upload
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "file",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files/upload")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/projects/uploadFile.json#responseBody
POST
addExternalFileLinks
{{baseUrl}}/v2/projects/:projectId/files/addExternalLink
QUERY PARAMS
projectId
BODY json
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink");
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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink" {:content-type :json
:form-params {:category ""
:externalInfo {}
:filename ""
:languageCombinationIds [{:sourceLanguageId 0
:targetLanguageId 0}]
:languageIds []}})
require "http/client"
url = "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/projects/:projectId/files/addExternalLink"),
Content = new StringContent("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/projects/:projectId/files/addExternalLink");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"
payload := strings.NewReader("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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/v2/projects/:projectId/files/addExternalLink HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 185
{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink")
.setHeader("content-type", "application/json")
.setBody("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/addExternalLink")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/projects/:projectId/files/addExternalLink")
.header("content-type", "application/json")
.body("{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
.asString();
const data = JSON.stringify({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink',
headers: {'content-type': 'application/json'},
data: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[]}'
};
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}}/v2/projects/:projectId/files/addExternalLink',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/projects/:projectId/files/addExternalLink")
.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/v2/projects/:projectId/files/addExternalLink',
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({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink',
headers: {'content-type': 'application/json'},
body: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
},
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}}/v2/projects/:projectId/files/addExternalLink');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [
{
sourceLanguageId: 0,
targetLanguageId: 0
}
],
languageIds: []
});
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}}/v2/projects/:projectId/files/addExternalLink',
headers: {'content-type': 'application/json'},
data: {
category: '',
externalInfo: {},
filename: '',
languageCombinationIds: [{sourceLanguageId: 0, targetLanguageId: 0}],
languageIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","externalInfo":{},"filename":"","languageCombinationIds":[{"sourceLanguageId":0,"targetLanguageId":0}],"languageIds":[]}'
};
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 = @{ @"category": @"",
@"externalInfo": @{ },
@"filename": @"",
@"languageCombinationIds": @[ @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 } ],
@"languageIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"]
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}}/v2/projects/:projectId/files/addExternalLink" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/projects/:projectId/files/addExternalLink",
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([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]),
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}}/v2/projects/:projectId/files/addExternalLink', [
'body' => '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/projects/:projectId/files/addExternalLink');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'category' => '',
'externalInfo' => [
],
'filename' => '',
'languageCombinationIds' => [
[
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]
],
'languageIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/projects/:projectId/files/addExternalLink');
$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}}/v2/projects/:projectId/files/addExternalLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/projects/:projectId/files/addExternalLink' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/projects/:projectId/files/addExternalLink", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"
payload = {
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink"
payload <- "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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}}/v2/projects/:projectId/files/addExternalLink")
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 \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\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/v2/projects/:projectId/files/addExternalLink') do |req|
req.body = "{\n \"category\": \"\",\n \"externalInfo\": {},\n \"filename\": \"\",\n \"languageCombinationIds\": [\n {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n }\n ],\n \"languageIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink";
let payload = json!({
"category": "",
"externalInfo": json!({}),
"filename": "",
"languageCombinationIds": (
json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
})
),
"languageIds": ()
});
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}}/v2/projects/:projectId/files/addExternalLink \
--header 'content-type: application/json' \
--data '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}'
echo '{
"category": "",
"externalInfo": {},
"filename": "",
"languageCombinationIds": [
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
],
"languageIds": []
}' | \
http POST {{baseUrl}}/v2/projects/:projectId/files/addExternalLink \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "category": "",\n "externalInfo": {},\n "filename": "",\n "languageCombinationIds": [\n {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n }\n ],\n "languageIds": []\n}' \
--output-document \
- {{baseUrl}}/v2/projects/:projectId/files/addExternalLink
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"category": "",
"externalInfo": [],
"filename": "",
"languageCombinationIds": [
[
"sourceLanguageId": 0,
"targetLanguageId": 0
]
],
"languageIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/projects/:projectId/files/addExternalLink")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Adds a payable.
{{baseUrl}}/quotes/:quoteId/finance/payables
QUERY PARAMS
quoteId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/payables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/finance/payables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/payables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/quotes/:quoteId/finance/payables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/payables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/payables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/quotes/:quoteId/finance/payables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/finance/payables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/payables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/payables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/finance/payables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/quotes/:quoteId/finance/payables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/finance/payables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/payables")
.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/quotes/:quoteId/finance/payables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/finance/payables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/finance/payables"]
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}}/quotes/:quoteId/finance/payables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/payables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/quotes/:quoteId/finance/payables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/payables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/payables');
$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}}/quotes/:quoteId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/quotes/:quoteId/finance/payables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/payables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/payables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/finance/payables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/quotes/:quoteId/finance/payables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/finance/payables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/quotes/:quoteId/finance/payables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/quotes/:quoteId/finance/payables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/payables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/payables")! 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
/home-api/assets/examples/v1/quotes/createCATPayable.json#responseBody
POST
Adds a receivable.
{{baseUrl}}/quotes/:quoteId/finance/receivables
QUERY PARAMS
quoteId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/receivables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/finance/receivables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/quotes/:quoteId/finance/receivables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/receivables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/receivables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/quotes/:quoteId/finance/receivables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/finance/receivables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/receivables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/receivables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/finance/receivables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/quotes/:quoteId/finance/receivables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/receivables")
.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/quotes/:quoteId/finance/receivables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/finance/receivables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/finance/receivables"]
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}}/quotes/:quoteId/finance/receivables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/receivables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/quotes/:quoteId/finance/receivables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables');
$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}}/quotes/:quoteId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/quotes/:quoteId/finance/receivables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/receivables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/finance/receivables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/quotes/:quoteId/finance/receivables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/finance/receivables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/quotes/:quoteId/finance/receivables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/quotes/:quoteId/finance/receivables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/receivables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/receivables")! 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
/home-api/assets/examples/v1/quotes/createReceivable.json#responseBody
POST
Creates a new language combination for a given quote without creating a task.
{{baseUrl}}/quotes/:quoteId/languageCombinations
QUERY PARAMS
quoteId
BODY json
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/languageCombinations");
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 \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/languageCombinations" {:content-type :json
:form-params {:sourceLanguageId 0
:targetLanguageId 0}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/languageCombinations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/quotes/:quoteId/languageCombinations"),
Content = new StringContent("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/languageCombinations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/languageCombinations"
payload := strings.NewReader("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/quotes/:quoteId/languageCombinations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 52
{
"sourceLanguageId": 0,
"targetLanguageId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/languageCombinations")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/languageCombinations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/languageCombinations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/languageCombinations")
.header("content-type", "application/json")
.body("{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
.asString();
const data = JSON.stringify({
sourceLanguageId: 0,
targetLanguageId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/quotes/:quoteId/languageCombinations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/languageCombinations',
headers: {'content-type': 'application/json'},
data: {sourceLanguageId: 0, targetLanguageId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/languageCombinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceLanguageId":0,"targetLanguageId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/languageCombinations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/languageCombinations")
.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/quotes/:quoteId/languageCombinations',
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({sourceLanguageId: 0, targetLanguageId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/languageCombinations',
headers: {'content-type': 'application/json'},
body: {sourceLanguageId: 0, targetLanguageId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/languageCombinations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceLanguageId: 0,
targetLanguageId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/languageCombinations',
headers: {'content-type': 'application/json'},
data: {sourceLanguageId: 0, targetLanguageId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/languageCombinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sourceLanguageId":0,"targetLanguageId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sourceLanguageId": @0,
@"targetLanguageId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/languageCombinations"]
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}}/quotes/:quoteId/languageCombinations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/languageCombinations",
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([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/quotes/:quoteId/languageCombinations', [
'body' => '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/languageCombinations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceLanguageId' => 0,
'targetLanguageId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/languageCombinations');
$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}}/quotes/:quoteId/languageCombinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/languageCombinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/quotes/:quoteId/languageCombinations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/languageCombinations"
payload = {
"sourceLanguageId": 0,
"targetLanguageId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/languageCombinations"
payload <- "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/languageCombinations")
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 \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/quotes/:quoteId/languageCombinations') do |req|
req.body = "{\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/languageCombinations";
let payload = json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/quotes/:quoteId/languageCombinations \
--header 'content-type: application/json' \
--data '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}'
echo '{
"sourceLanguageId": 0,
"targetLanguageId": 0
}' | \
http POST {{baseUrl}}/quotes/:quoteId/languageCombinations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/languageCombinations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceLanguageId": 0,
"targetLanguageId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/languageCombinations")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/createLanguageCombination.json#responseBody
POST
Creates a new task for a given quote.
{{baseUrl}}/quotes/:quoteId/tasks
QUERY PARAMS
quoteId
BODY json
{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/tasks");
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 \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/tasks" {:content-type :json
:form-params {:clientTaskPONumber ""
:customFields [{:key ""
:name ""
:type ""
:value {}}]
:dates {:actualDeliveryDate {:value 0}
:actualStartDate {}
:deadline {}
:startDate {}}
:finance {:invoiceable false}
:id 0
:idNumber ""
:instructions {:forProvider ""
:fromCustomer ""
:internal ""
:notes ""
:paymentNoteForCustomer ""
:paymentNoteForVendor ""}
:jobs {:jobCount 0
:jobIds []}
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:name ""
:people {:customerContacts {:additionalIds []
:primaryId 0
:sendBackToId 0}
:responsiblePersons {:projectCoordinatorId 0
:projectManagerId 0}}
:projectId 0
:quoteId 0}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/tasks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/quotes/:quoteId/tasks"),
Content = new StringContent("{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/tasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/tasks"
payload := strings.NewReader("{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/quotes/:quoteId/tasks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 929
{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/tasks")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/tasks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/tasks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/tasks")
.header("content-type", "application/json")
.body("{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}")
.asString();
const data = JSON.stringify({
clientTaskPONumber: '',
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
dates: {
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {
invoiceable: false
},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {
jobCount: 0,
jobIds: []
},
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
name: '',
people: {
customerContacts: {
additionalIds: [],
primaryId: 0,
sendBackToId: 0
},
responsiblePersons: {
projectCoordinatorId: 0,
projectManagerId: 0
}
},
projectId: 0,
quoteId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/quotes/:quoteId/tasks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/tasks',
headers: {'content-type': 'application/json'},
data: {
clientTaskPONumber: '',
customFields: [{key: '', name: '', type: '', value: {}}],
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {invoiceable: false},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {jobCount: 0, jobIds: []},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
projectId: 0,
quoteId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientTaskPONumber":"","customFields":[{"key":"","name":"","type":"","value":{}}],"dates":{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}},"finance":{"invoiceable":false},"id":0,"idNumber":"","instructions":{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""},"jobs":{"jobCount":0,"jobIds":[]},"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"name":"","people":{"customerContacts":{"additionalIds":[],"primaryId":0,"sendBackToId":0},"responsiblePersons":{"projectCoordinatorId":0,"projectManagerId":0}},"projectId":0,"quoteId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/tasks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientTaskPONumber": "",\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "dates": {\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n },\n "finance": {\n "invoiceable": false\n },\n "id": 0,\n "idNumber": "",\n "instructions": {\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n },\n "jobs": {\n "jobCount": 0,\n "jobIds": []\n },\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "name": "",\n "people": {\n "customerContacts": {\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n },\n "responsiblePersons": {\n "projectCoordinatorId": 0,\n "projectManagerId": 0\n }\n },\n "projectId": 0,\n "quoteId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/tasks")
.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/quotes/:quoteId/tasks',
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({
clientTaskPONumber: '',
customFields: [{key: '', name: '', type: '', value: {}}],
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {invoiceable: false},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {jobCount: 0, jobIds: []},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
projectId: 0,
quoteId: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/tasks',
headers: {'content-type': 'application/json'},
body: {
clientTaskPONumber: '',
customFields: [{key: '', name: '', type: '', value: {}}],
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {invoiceable: false},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {jobCount: 0, jobIds: []},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
projectId: 0,
quoteId: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/tasks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientTaskPONumber: '',
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
dates: {
actualDeliveryDate: {
value: 0
},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {
invoiceable: false
},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {
jobCount: 0,
jobIds: []
},
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
name: '',
people: {
customerContacts: {
additionalIds: [],
primaryId: 0,
sendBackToId: 0
},
responsiblePersons: {
projectCoordinatorId: 0,
projectManagerId: 0
}
},
projectId: 0,
quoteId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/tasks',
headers: {'content-type': 'application/json'},
data: {
clientTaskPONumber: '',
customFields: [{key: '', name: '', type: '', value: {}}],
dates: {
actualDeliveryDate: {value: 0},
actualStartDate: {},
deadline: {},
startDate: {}
},
finance: {invoiceable: false},
id: 0,
idNumber: '',
instructions: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
jobs: {jobCount: 0, jobIds: []},
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
name: '',
people: {
customerContacts: {additionalIds: [], primaryId: 0, sendBackToId: 0},
responsiblePersons: {projectCoordinatorId: 0, projectManagerId: 0}
},
projectId: 0,
quoteId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientTaskPONumber":"","customFields":[{"key":"","name":"","type":"","value":{}}],"dates":{"actualDeliveryDate":{"value":0},"actualStartDate":{},"deadline":{},"startDate":{}},"finance":{"invoiceable":false},"id":0,"idNumber":"","instructions":{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""},"jobs":{"jobCount":0,"jobIds":[]},"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"name":"","people":{"customerContacts":{"additionalIds":[],"primaryId":0,"sendBackToId":0},"responsiblePersons":{"projectCoordinatorId":0,"projectManagerId":0}},"projectId":0,"quoteId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientTaskPONumber": @"",
@"customFields": @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ],
@"dates": @{ @"actualDeliveryDate": @{ @"value": @0 }, @"actualStartDate": @{ }, @"deadline": @{ }, @"startDate": @{ } },
@"finance": @{ @"invoiceable": @NO },
@"id": @0,
@"idNumber": @"",
@"instructions": @{ @"forProvider": @"", @"fromCustomer": @"", @"internal": @"", @"notes": @"", @"paymentNoteForCustomer": @"", @"paymentNoteForVendor": @"" },
@"jobs": @{ @"jobCount": @0, @"jobIds": @[ ] },
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"name": @"",
@"people": @{ @"customerContacts": @{ @"additionalIds": @[ ], @"primaryId": @0, @"sendBackToId": @0 }, @"responsiblePersons": @{ @"projectCoordinatorId": @0, @"projectManagerId": @0 } },
@"projectId": @0,
@"quoteId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/tasks"]
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}}/quotes/:quoteId/tasks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/tasks",
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([
'clientTaskPONumber' => '',
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'finance' => [
'invoiceable' => null
],
'id' => 0,
'idNumber' => '',
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'jobs' => [
'jobCount' => 0,
'jobIds' => [
]
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'projectId' => 0,
'quoteId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/quotes/:quoteId/tasks', [
'body' => '{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/tasks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientTaskPONumber' => '',
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'finance' => [
'invoiceable' => null
],
'id' => 0,
'idNumber' => '',
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'jobs' => [
'jobCount' => 0,
'jobIds' => [
]
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'projectId' => 0,
'quoteId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientTaskPONumber' => '',
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'dates' => [
'actualDeliveryDate' => [
'value' => 0
],
'actualStartDate' => [
],
'deadline' => [
],
'startDate' => [
]
],
'finance' => [
'invoiceable' => null
],
'id' => 0,
'idNumber' => '',
'instructions' => [
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
],
'jobs' => [
'jobCount' => 0,
'jobIds' => [
]
],
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'name' => '',
'people' => [
'customerContacts' => [
'additionalIds' => [
],
'primaryId' => 0,
'sendBackToId' => 0
],
'responsiblePersons' => [
'projectCoordinatorId' => 0,
'projectManagerId' => 0
]
],
'projectId' => 0,
'quoteId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/tasks');
$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}}/quotes/:quoteId/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/quotes/:quoteId/tasks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/tasks"
payload = {
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": { "value": 0 },
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": { "invoiceable": False },
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/tasks"
payload <- "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/tasks")
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 \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/quotes/:quoteId/tasks') do |req|
req.body = "{\n \"clientTaskPONumber\": \"\",\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"dates\": {\n \"actualDeliveryDate\": {\n \"value\": 0\n },\n \"actualStartDate\": {},\n \"deadline\": {},\n \"startDate\": {}\n },\n \"finance\": {\n \"invoiceable\": false\n },\n \"id\": 0,\n \"idNumber\": \"\",\n \"instructions\": {\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n },\n \"jobs\": {\n \"jobCount\": 0,\n \"jobIds\": []\n },\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"name\": \"\",\n \"people\": {\n \"customerContacts\": {\n \"additionalIds\": [],\n \"primaryId\": 0,\n \"sendBackToId\": 0\n },\n \"responsiblePersons\": {\n \"projectCoordinatorId\": 0,\n \"projectManagerId\": 0\n }\n },\n \"projectId\": 0,\n \"quoteId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/tasks";
let payload = json!({
"clientTaskPONumber": "",
"customFields": (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
),
"dates": json!({
"actualDeliveryDate": json!({"value": 0}),
"actualStartDate": json!({}),
"deadline": json!({}),
"startDate": json!({})
}),
"finance": json!({"invoiceable": false}),
"id": 0,
"idNumber": "",
"instructions": json!({
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}),
"jobs": json!({
"jobCount": 0,
"jobIds": ()
}),
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"name": "",
"people": json!({
"customerContacts": json!({
"additionalIds": (),
"primaryId": 0,
"sendBackToId": 0
}),
"responsiblePersons": json!({
"projectCoordinatorId": 0,
"projectManagerId": 0
})
}),
"projectId": 0,
"quoteId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/quotes/:quoteId/tasks \
--header 'content-type: application/json' \
--data '{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}'
echo '{
"clientTaskPONumber": "",
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"dates": {
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
},
"finance": {
"invoiceable": false
},
"id": 0,
"idNumber": "",
"instructions": {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
},
"jobs": {
"jobCount": 0,
"jobIds": []
},
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"name": "",
"people": {
"customerContacts": {
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
},
"responsiblePersons": {
"projectCoordinatorId": 0,
"projectManagerId": 0
}
},
"projectId": 0,
"quoteId": 0
}' | \
http POST {{baseUrl}}/quotes/:quoteId/tasks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientTaskPONumber": "",\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "dates": {\n "actualDeliveryDate": {\n "value": 0\n },\n "actualStartDate": {},\n "deadline": {},\n "startDate": {}\n },\n "finance": {\n "invoiceable": false\n },\n "id": 0,\n "idNumber": "",\n "instructions": {\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n },\n "jobs": {\n "jobCount": 0,\n "jobIds": []\n },\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "name": "",\n "people": {\n "customerContacts": {\n "additionalIds": [],\n "primaryId": 0,\n "sendBackToId": 0\n },\n "responsiblePersons": {\n "projectCoordinatorId": 0,\n "projectManagerId": 0\n }\n },\n "projectId": 0,\n "quoteId": 0\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/tasks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientTaskPONumber": "",
"customFields": [
[
"key": "",
"name": "",
"type": "",
"value": []
]
],
"dates": [
"actualDeliveryDate": ["value": 0],
"actualStartDate": [],
"deadline": [],
"startDate": []
],
"finance": ["invoiceable": false],
"id": 0,
"idNumber": "",
"instructions": [
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
],
"jobs": [
"jobCount": 0,
"jobIds": []
],
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"name": "",
"people": [
"customerContacts": [
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
],
"responsiblePersons": [
"projectCoordinatorId": 0,
"projectManagerId": 0
]
],
"projectId": 0,
"quoteId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/tasks")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/createTask.json#responseBody
DELETE
Deletes a payable. (DELETE)
{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId
QUERY PARAMS
quoteId
payableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
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}}/quotes/:quoteId/finance/payables/:payableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
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/quotes/:quoteId/finance/payables/:payableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"))
.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}}/quotes/:quoteId/finance/payables/:payableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.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}}/quotes/:quoteId/finance/payables/:payableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId';
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}}/quotes/:quoteId/finance/payables/:payableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/finance/payables/:payableId',
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}}/quotes/:quoteId/finance/payables/:payableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
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}}/quotes/:quoteId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId';
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}}/quotes/:quoteId/finance/payables/:payableId"]
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}}/quotes/:quoteId/finance/payables/:payableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId",
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}}/quotes/:quoteId/finance/payables/:payableId');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/quotes/:quoteId/finance/payables/:payableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
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/quotes/:quoteId/finance/payables/:payableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId";
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}}/quotes/:quoteId/finance/payables/:payableId
http DELETE {{baseUrl}}/quotes/:quoteId/finance/payables/:payableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/payables/:payableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Deletes a receivable. (DELETE)
{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId
QUERY PARAMS
quoteId
receivableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
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}}/quotes/:quoteId/finance/receivables/:receivableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
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/quotes/:quoteId/finance/receivables/:receivableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"))
.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}}/quotes/:quoteId/finance/receivables/:receivableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.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}}/quotes/:quoteId/finance/receivables/:receivableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId';
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}}/quotes/:quoteId/finance/receivables/:receivableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/finance/receivables/:receivableId',
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}}/quotes/:quoteId/finance/receivables/:receivableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
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}}/quotes/:quoteId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId';
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}}/quotes/:quoteId/finance/receivables/:receivableId"]
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}}/quotes/:quoteId/finance/receivables/:receivableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId",
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}}/quotes/:quoteId/finance/receivables/:receivableId');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/quotes/:quoteId/finance/receivables/:receivableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
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/quotes/:quoteId/finance/receivables/:receivableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId";
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}}/quotes/:quoteId/finance/receivables/:receivableId
http DELETE {{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a quote.
{{baseUrl}}/quotes/:quoteId
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/quotes/:quoteId")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId"
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}}/quotes/:quoteId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId"
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/quotes/:quoteId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/quotes/:quoteId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId"))
.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}}/quotes/:quoteId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/quotes/:quoteId")
.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}}/quotes/:quoteId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId';
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}}/quotes/:quoteId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId',
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}}/quotes/:quoteId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/quotes/:quoteId');
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}}/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId';
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}}/quotes/:quoteId"]
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}}/quotes/:quoteId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId",
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}}/quotes/:quoteId');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/quotes/:quoteId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId")
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/quotes/:quoteId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId";
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}}/quotes/:quoteId
http DELETE {{baseUrl}}/quotes/:quoteId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/quotes/:quoteId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns custom fields of a given quote.
{{baseUrl}}/quotes/:quoteId/customFields
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/:quoteId/customFields")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/customFields"
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}}/quotes/:quoteId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/customFields"
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/quotes/:quoteId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/:quoteId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/customFields"))
.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}}/quotes/:quoteId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/:quoteId/customFields")
.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}}/quotes/:quoteId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/:quoteId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/customFields';
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}}/quotes/:quoteId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/customFields',
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}}/quotes/:quoteId/customFields'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/:quoteId/customFields');
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}}/quotes/:quoteId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/customFields';
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}}/quotes/:quoteId/customFields"]
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}}/quotes/:quoteId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/customFields",
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}}/quotes/:quoteId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/:quoteId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/customFields")
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/quotes/:quoteId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/customFields";
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}}/quotes/:quoteId/customFields
http GET {{baseUrl}}/quotes/:quoteId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/:quoteId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getCustomFields.json#responseBody
GET
Returns dates of a given quote.
{{baseUrl}}/quotes/:quoteId/dates
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/dates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/:quoteId/dates")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/dates"
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}}/quotes/:quoteId/dates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/dates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/dates"
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/quotes/:quoteId/dates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/:quoteId/dates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/dates"))
.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}}/quotes/:quoteId/dates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/:quoteId/dates")
.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}}/quotes/:quoteId/dates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/:quoteId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/dates';
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}}/quotes/:quoteId/dates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/dates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/dates',
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}}/quotes/:quoteId/dates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/:quoteId/dates');
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}}/quotes/:quoteId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/dates';
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}}/quotes/:quoteId/dates"]
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}}/quotes/:quoteId/dates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/dates",
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}}/quotes/:quoteId/dates');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/dates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/dates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/dates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/dates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/:quoteId/dates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/dates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/dates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/dates")
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/quotes/:quoteId/dates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/dates";
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}}/quotes/:quoteId/dates
http GET {{baseUrl}}/quotes/:quoteId/dates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/:quoteId/dates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/dates")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getDates.json#responseBody
GET
Returns finance of a given quote.
{{baseUrl}}/quotes/:quoteId/finance
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/:quoteId/finance")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance"
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}}/quotes/:quoteId/finance"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance"
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/quotes/:quoteId/finance HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/:quoteId/finance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance"))
.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}}/quotes/:quoteId/finance")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/:quoteId/finance")
.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}}/quotes/:quoteId/finance');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/:quoteId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance';
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}}/quotes/:quoteId/finance',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/finance',
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}}/quotes/:quoteId/finance'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/:quoteId/finance');
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}}/quotes/:quoteId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance';
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}}/quotes/:quoteId/finance"]
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}}/quotes/:quoteId/finance" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance",
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}}/quotes/:quoteId/finance');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/finance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/:quoteId/finance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/finance")
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/quotes/:quoteId/finance') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/finance";
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}}/quotes/:quoteId/finance
http GET {{baseUrl}}/quotes/:quoteId/finance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getFinance.json#responseBody
GET
Returns instructions of a given quote.
{{baseUrl}}/quotes/:quoteId/instructions
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/instructions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/:quoteId/instructions")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/instructions"
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}}/quotes/:quoteId/instructions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/instructions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/instructions"
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/quotes/:quoteId/instructions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/:quoteId/instructions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/instructions"))
.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}}/quotes/:quoteId/instructions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/:quoteId/instructions")
.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}}/quotes/:quoteId/instructions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/:quoteId/instructions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/instructions';
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}}/quotes/:quoteId/instructions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/instructions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/instructions',
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}}/quotes/:quoteId/instructions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/:quoteId/instructions');
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}}/quotes/:quoteId/instructions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/instructions';
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}}/quotes/:quoteId/instructions"]
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}}/quotes/:quoteId/instructions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/instructions",
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}}/quotes/:quoteId/instructions');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/instructions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/instructions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/instructions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/instructions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/:quoteId/instructions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/instructions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/instructions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/instructions")
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/quotes/:quoteId/instructions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/instructions";
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}}/quotes/:quoteId/instructions
http GET {{baseUrl}}/quotes/:quoteId/instructions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/:quoteId/instructions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getInstructions.json#responseBody
GET
Returns quote details.
{{baseUrl}}/quotes/:quoteId
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/:quoteId")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId"
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}}/quotes/:quoteId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId"
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/quotes/:quoteId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/:quoteId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId"))
.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}}/quotes/:quoteId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/:quoteId")
.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}}/quotes/:quoteId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId';
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}}/quotes/:quoteId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId',
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}}/quotes/:quoteId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/:quoteId');
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}}/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId';
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}}/quotes/:quoteId"]
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}}/quotes/:quoteId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId",
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}}/quotes/:quoteId');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/:quoteId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId")
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/quotes/:quoteId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId";
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}}/quotes/:quoteId
http GET {{baseUrl}}/quotes/:quoteId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/:quoteId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getById.json#responseBody
GET
Returns quotes' internal identifiers.
{{baseUrl}}/quotes/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/quotes/ids")
require "http/client"
url = "{{baseUrl}}/quotes/ids"
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}}/quotes/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/ids"
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/quotes/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/quotes/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/ids"))
.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}}/quotes/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/quotes/ids")
.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}}/quotes/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/quotes/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/ids';
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}}/quotes/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/ids',
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}}/quotes/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/quotes/ids');
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}}/quotes/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/ids';
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}}/quotes/ids"]
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}}/quotes/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/ids",
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}}/quotes/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/quotes/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/ids")
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/quotes/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/ids";
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}}/quotes/ids
http GET {{baseUrl}}/quotes/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/quotes/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/getIds.json#responseBody
POST
Sends a quote for customer confirmation.
{{baseUrl}}/quotes/:quoteId/confirmation/send
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/confirmation/send");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/confirmation/send")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/confirmation/send"
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}}/quotes/:quoteId/confirmation/send"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/confirmation/send");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/confirmation/send"
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/quotes/:quoteId/confirmation/send HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/confirmation/send")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/confirmation/send"))
.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}}/quotes/:quoteId/confirmation/send")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/confirmation/send")
.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}}/quotes/:quoteId/confirmation/send');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/confirmation/send'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/confirmation/send';
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}}/quotes/:quoteId/confirmation/send',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/confirmation/send")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/confirmation/send',
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}}/quotes/:quoteId/confirmation/send'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/confirmation/send');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/quotes/:quoteId/confirmation/send'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/confirmation/send';
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}}/quotes/:quoteId/confirmation/send"]
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}}/quotes/:quoteId/confirmation/send" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/confirmation/send",
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}}/quotes/:quoteId/confirmation/send');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/confirmation/send');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/confirmation/send');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/confirmation/send' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/confirmation/send' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/quotes/:quoteId/confirmation/send")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/confirmation/send"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/confirmation/send"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/confirmation/send")
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/quotes/:quoteId/confirmation/send') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/confirmation/send";
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}}/quotes/:quoteId/confirmation/send
http POST {{baseUrl}}/quotes/:quoteId/confirmation/send
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/quotes/:quoteId/confirmation/send
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/confirmation/send")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Starts a quote.
{{baseUrl}}/quotes/:quoteId/start
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/start");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/quotes/:quoteId/start")
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/start"
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}}/quotes/:quoteId/start"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/start");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/start"
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/quotes/:quoteId/start HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/quotes/:quoteId/start")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/start"))
.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}}/quotes/:quoteId/start")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/quotes/:quoteId/start")
.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}}/quotes/:quoteId/start');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/quotes/:quoteId/start'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/start';
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}}/quotes/:quoteId/start',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/start")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/quotes/:quoteId/start',
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}}/quotes/:quoteId/start'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/quotes/:quoteId/start');
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}}/quotes/:quoteId/start'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/start';
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}}/quotes/:quoteId/start"]
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}}/quotes/:quoteId/start" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/start",
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}}/quotes/:quoteId/start');
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/start');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/quotes/:quoteId/start');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/quotes/:quoteId/start' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/start' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/quotes/:quoteId/start")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/start"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/start"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/quotes/:quoteId/start")
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/quotes/:quoteId/start') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/quotes/:quoteId/start";
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}}/quotes/:quoteId/start
http POST {{baseUrl}}/quotes/:quoteId/start
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/quotes/:quoteId/start
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/start")! 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()
PUT
Updates a payable. (PUT)
{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId
QUERY PARAMS
quoteId
payableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/payables/:payableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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/quotes/:quoteId/finance/payables/:payableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")
.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/quotes/:quoteId/finance/payables/:payableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"]
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}}/quotes/:quoteId/finance/payables/:payableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId');
$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}}/quotes/:quoteId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/quotes/:quoteId/finance/payables/:payableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/payables/:payableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/quotes/:quoteId/finance/payables/:payableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/payables/:payableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
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}}/quotes/:quoteId/finance/payables/:payableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/quotes/:quoteId/finance/payables/:payableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/payables/:payableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/payables/:payableId")! 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
/home-api/assets/examples/v1/quotes/updatePayable.json#responseBody
PUT
Updates a receivable. (PUT)
{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId
QUERY PARAMS
quoteId
receivableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/receivables/:receivableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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/quotes/:quoteId/finance/receivables/:receivableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")
.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/quotes/:quoteId/finance/receivables/:receivableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"]
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}}/quotes/:quoteId/finance/receivables/:receivableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId');
$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}}/quotes/:quoteId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/quotes/:quoteId/finance/receivables/:receivableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/receivables/:receivableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/quotes/:quoteId/finance/receivables/:receivableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/quotes/:quoteId/finance/receivables/:receivableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
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}}/quotes/:quoteId/finance/receivables/:receivableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/finance/receivables/:receivableId")! 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
/home-api/assets/examples/v1/quotes/updateReceivable.json#responseBody
PUT
Updates custom fields of a given quote.
{{baseUrl}}/quotes/:quoteId/customFields
QUERY PARAMS
quoteId
BODY json
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/customFields");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/quotes/:quoteId/customFields" {:content-type :json
:form-params [{:key ""
:name ""
:type ""
:value {}}]})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/customFields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/quotes/:quoteId/customFields"),
Content = new StringContent("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/quotes/:quoteId/customFields");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/customFields"
payload := strings.NewReader("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/quotes/:quoteId/customFields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/quotes/:quoteId/customFields")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/customFields"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/customFields")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/quotes/:quoteId/customFields")
.header("content-type", "application/json")
.body("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.asString();
const data = JSON.stringify([
{
key: '',
name: '',
type: '',
value: {}
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/quotes/:quoteId/customFields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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}}/quotes/:quoteId/customFields',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/customFields")
.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/quotes/:quoteId/customFields',
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([{key: '', name: '', type: '', value: {}}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/customFields',
headers: {'content-type': 'application/json'},
body: [{key: '', name: '', type: '', value: {}}],
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}}/quotes/:quoteId/customFields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
key: '',
name: '',
type: '',
value: {}
}
]);
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}}/quotes/:quoteId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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 = @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/customFields"]
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}}/quotes/:quoteId/customFields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/customFields",
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([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]),
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}}/quotes/:quoteId/customFields', [
'body' => '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/customFields');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/customFields');
$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}}/quotes/:quoteId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/quotes/:quoteId/customFields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/customFields"
payload = [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/customFields"
payload <- "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/quotes/:quoteId/customFields")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/quotes/:quoteId/customFields') do |req|
req.body = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/quotes/:quoteId/customFields";
let payload = (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
);
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/quotes/:quoteId/customFields \
--header 'content-type: application/json' \
--data '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
echo '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]' | \
http PUT {{baseUrl}}/quotes/:quoteId/customFields \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n]' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/customFields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"key": "",
"name": "",
"type": "",
"value": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/updateCustomFields.json#responseBody
PUT
Updates instructions of a given quote.
{{baseUrl}}/quotes/:quoteId/instructions
QUERY PARAMS
quoteId
BODY json
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/quotes/:quoteId/instructions");
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/quotes/:quoteId/instructions" {:content-type :json
:form-params {:forProvider ""
:fromCustomer ""
:internal ""
:notes ""
:paymentNoteForCustomer ""
:paymentNoteForVendor ""}})
require "http/client"
url = "{{baseUrl}}/quotes/:quoteId/instructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/quotes/:quoteId/instructions"),
Content = new StringContent("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/quotes/:quoteId/instructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/quotes/:quoteId/instructions"
payload := strings.NewReader("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/quotes/:quoteId/instructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 140
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/quotes/:quoteId/instructions")
.setHeader("content-type", "application/json")
.setBody("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/quotes/:quoteId/instructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/instructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/quotes/:quoteId/instructions")
.header("content-type", "application/json")
.body("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.asString();
const data = JSON.stringify({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/quotes/:quoteId/instructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/quotes/:quoteId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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}}/quotes/:quoteId/instructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/quotes/:quoteId/instructions")
.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/quotes/:quoteId/instructions',
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({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/quotes/:quoteId/instructions',
headers: {'content-type': 'application/json'},
body: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
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}}/quotes/:quoteId/instructions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
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}}/quotes/:quoteId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/quotes/:quoteId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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 = @{ @"forProvider": @"",
@"fromCustomer": @"",
@"internal": @"",
@"notes": @"",
@"paymentNoteForCustomer": @"",
@"paymentNoteForVendor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/quotes/:quoteId/instructions"]
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}}/quotes/:quoteId/instructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/quotes/:quoteId/instructions",
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([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]),
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}}/quotes/:quoteId/instructions', [
'body' => '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/quotes/:quoteId/instructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/quotes/:quoteId/instructions');
$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}}/quotes/:quoteId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/quotes/:quoteId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/quotes/:quoteId/instructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/quotes/:quoteId/instructions"
payload = {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/quotes/:quoteId/instructions"
payload <- "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/quotes/:quoteId/instructions")
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/quotes/:quoteId/instructions') do |req|
req.body = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/quotes/:quoteId/instructions";
let payload = json!({
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
});
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}}/quotes/:quoteId/instructions \
--header 'content-type: application/json' \
--data '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
echo '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}' | \
http PUT {{baseUrl}}/quotes/:quoteId/instructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}' \
--output-document \
- {{baseUrl}}/quotes/:quoteId/instructions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/quotes/:quoteId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/quotes/updateInstructions.json#responseBody
POST
Adds a payable to a quote.
{{baseUrl}}/v2/quotes/:quoteId/finance/payables
QUERY PARAMS
quoteId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/payables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/quotes/:quoteId/finance/payables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/quotes/:quoteId/finance/payables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/payables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/payables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/quotes/:quoteId/finance/payables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/quotes/:quoteId/finance/payables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/payables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/payables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/quotes/:quoteId/finance/payables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/payables")
.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/v2/quotes/:quoteId/finance/payables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/finance/payables"]
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}}/v2/quotes/:quoteId/finance/payables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/payables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables');
$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}}/v2/quotes/:quoteId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/payables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/quotes/:quoteId/finance/payables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/payables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/finance/payables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/quotes/:quoteId/finance/payables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/quotes/:quoteId/finance/payables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/v2/quotes/:quoteId/finance/payables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/payables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/payables")! 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
/home-api/assets/examples/v2/quotes/createPayable.json#responseBody
POST
Adds a receivable to a quote.
{{baseUrl}}/v2/quotes/:quoteId/finance/receivables
QUERY PARAMS
quoteId
BODY json
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables");
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables" {:content-type :json
:form-params {:calculationUnitId 0
:catLogFile {:content ""
:name ""
:token ""
:url ""}
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/quotes/:quoteId/finance/receivables HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 478
{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")
.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/v2/quotes/:quoteId/finance/receivables',
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({
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
catLogFile: {
content: '',
name: '',
token: '',
url: ''
},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
catLogFile: {content: '', name: '', token: '', url: ''},
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"catLogFile":{"content":"","name":"","token":"","url":""},"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"catLogFile": @{ @"content": @"", @"name": @"", @"token": @"", @"url": @"" },
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"]
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}}/v2/quotes/:quoteId/finance/receivables" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/receivables",
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([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables', [
'body' => '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'catLogFile' => [
'content' => '',
'name' => '',
'token' => '',
'url' => ''
],
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables');
$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}}/v2/quotes/:quoteId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/quotes/:quoteId/finance/receivables", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"
payload = {
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables"
payload <- "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")
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 \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/quotes/:quoteId/finance/receivables') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"catLogFile\": {\n \"content\": \"\",\n \"name\": \"\",\n \"token\": \"\",\n \"url\": \"\"\n },\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables";
let payload = json!({
"calculationUnitId": 0,
"catLogFile": json!({
"content": "",
"name": "",
"token": "",
"url": ""
}),
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/quotes/:quoteId/finance/receivables \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"catLogFile": {
"content": "",
"name": "",
"token": "",
"url": ""
},
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http POST {{baseUrl}}/v2/quotes/:quoteId/finance/receivables \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "catLogFile": {\n "content": "",\n "name": "",\n "token": "",\n "url": ""\n },\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/receivables
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"catLogFile": [
"content": "",
"name": "",
"token": "",
"url": ""
],
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables")! 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
/home-api/assets/examples/v2/quotes/createReceivable.json#responseBody
PUT
Adds files to the quote as added by PM.
{{baseUrl}}/v2/quotes/:quoteId/files/add
QUERY PARAMS
quoteId
BODY json
{
"value": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/files/add");
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, "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/files/add" {:body "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/files/add"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
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}}/v2/quotes/:quoteId/files/add"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/addFiles.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/files/add");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/files/add"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/addFiles.json#requestBody")
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/v2/quotes/:quoteId/files/add HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 61
/home-api/assets/examples/v2/quotes/addFiles.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/files/add")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/addFiles.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/files/add"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/files/add")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/files/add")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/addFiles.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/files/add');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/files/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/files/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
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}}/v2/quotes/:quoteId/files/add',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/files/add")
.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/v2/quotes/:quoteId/files/add',
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('/home-api/assets/examples/v2/quotes/addFiles.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/files/add',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/files/add');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/addFiles.json#requestBody');
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}}/v2/quotes/:quoteId/files/add',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/files/add';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/addFiles.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/files/add"]
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}}/v2/quotes/:quoteId/files/add" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/files/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody",
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}}/v2/quotes/:quoteId/files/add', [
'body' => '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/files/add');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/addFiles.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/addFiles.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/files/add');
$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}}/v2/quotes/:quoteId/files/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/files/add' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/files/add", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/files/add"
payload = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/files/add"
payload <- "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/files/add")
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 = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
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/v2/quotes/:quoteId/files/add') do |req|
req.body = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody"
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}}/v2/quotes/:quoteId/files/add";
let payload = "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/files/add \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/files/add \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/addFiles.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/files/add
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/addFiles.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/files/add")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Changes quote status if possible (400 Bad Request is returned otherwise).
{{baseUrl}}/v2/quotes/:quoteId/status
QUERY PARAMS
quoteId
BODY json
{
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/status");
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, "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/status" {:body "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
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}}/v2/quotes/:quoteId/status"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/status");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/status"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody")
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/v2/quotes/:quoteId/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 65
/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/status")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/status"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/status")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/status")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
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}}/v2/quotes/:quoteId/status',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/status")
.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/v2/quotes/:quoteId/status',
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('/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/status',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/status');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody');
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}}/v2/quotes/:quoteId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/status';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/status"]
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}}/v2/quotes/:quoteId/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody",
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}}/v2/quotes/:quoteId/status', [
'body' => '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/status');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/status');
$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}}/v2/quotes/:quoteId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/status' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/status"
payload = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/status"
payload <- "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/status")
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 = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
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/v2/quotes/:quoteId/status') do |req|
req.body = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody"
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}}/v2/quotes/:quoteId/status";
let payload = "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/status \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/status \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/status
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/changeStatus.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Creates a new Smart Quote.
{{baseUrl}}/v2/quotes
BODY json
{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes");
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 \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/quotes" {:content-type :json
:form-params {:clientId 0
:name ""
:opportunityOfferId 0
:serviceId 0}})
require "http/client"
url = "{{baseUrl}}/v2/quotes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/quotes"),
Content = new StringContent("{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes"
payload := strings.NewReader("{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/quotes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 78
{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/quotes")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/quotes")
.header("content-type", "application/json")
.body("{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}")
.asString();
const data = JSON.stringify({
clientId: 0,
name: '',
opportunityOfferId: 0,
serviceId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/quotes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes',
headers: {'content-type': 'application/json'},
data: {clientId: 0, name: '', opportunityOfferId: 0, serviceId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":0,"name":"","opportunityOfferId":0,"serviceId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientId": 0,\n "name": "",\n "opportunityOfferId": 0,\n "serviceId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes")
.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/v2/quotes',
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({clientId: 0, name: '', opportunityOfferId: 0, serviceId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes',
headers: {'content-type': 'application/json'},
body: {clientId: 0, name: '', opportunityOfferId: 0, serviceId: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/quotes');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientId: 0,
name: '',
opportunityOfferId: 0,
serviceId: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes',
headers: {'content-type': 'application/json'},
data: {clientId: 0, name: '', opportunityOfferId: 0, serviceId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":0,"name":"","opportunityOfferId":0,"serviceId":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientId": @0,
@"name": @"",
@"opportunityOfferId": @0,
@"serviceId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes"]
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}}/v2/quotes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes",
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([
'clientId' => 0,
'name' => '',
'opportunityOfferId' => 0,
'serviceId' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/quotes', [
'body' => '{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientId' => 0,
'name' => '',
'opportunityOfferId' => 0,
'serviceId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientId' => 0,
'name' => '',
'opportunityOfferId' => 0,
'serviceId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v2/quotes');
$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}}/v2/quotes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/quotes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes"
payload = {
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes"
payload <- "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes")
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 \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/quotes') do |req|
req.body = "{\n \"clientId\": 0,\n \"name\": \"\",\n \"opportunityOfferId\": 0,\n \"serviceId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes";
let payload = json!({
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/quotes \
--header 'content-type: application/json' \
--data '{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}'
echo '{
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
}' | \
http POST {{baseUrl}}/v2/quotes \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientId": 0,\n "name": "",\n "opportunityOfferId": 0,\n "serviceId": 0\n}' \
--output-document \
- {{baseUrl}}/v2/quotes
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientId": 0,
"name": "",
"opportunityOfferId": 0,
"serviceId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/createQuote.json#responseBody
DELETE
Deletes a payable. (2)
{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId
QUERY PARAMS
quoteId
payableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
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}}/v2/quotes/:quoteId/finance/payables/:payableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
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/v2/quotes/:quoteId/finance/payables/:payableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"))
.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}}/v2/quotes/:quoteId/finance/payables/:payableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.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}}/v2/quotes/:quoteId/finance/payables/:payableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId';
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}}/v2/quotes/:quoteId/finance/payables/:payableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/finance/payables/:payableId',
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}}/v2/quotes/:quoteId/finance/payables/:payableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
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}}/v2/quotes/:quoteId/finance/payables/:payableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId';
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}}/v2/quotes/:quoteId/finance/payables/:payableId"]
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}}/v2/quotes/:quoteId/finance/payables/:payableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId",
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}}/v2/quotes/:quoteId/finance/payables/:payableId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/quotes/:quoteId/finance/payables/:payableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
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/v2/quotes/:quoteId/finance/payables/:payableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId";
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}}/v2/quotes/:quoteId/finance/payables/:payableId
http DELETE {{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Deletes a receivable. (2)
{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId
QUERY PARAMS
quoteId
receivableId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
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/v2/quotes/:quoteId/finance/receivables/:receivableId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"))
.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}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.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}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId';
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/finance/receivables/:receivableId',
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId';
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId"]
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId",
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/quotes/:quoteId/finance/receivables/:receivableId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
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/v2/quotes/:quoteId/finance/receivables/:receivableId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId";
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId
http DELETE {{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Downloads a file content. (GET)
{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName
QUERY PARAMS
fileId
fileName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")
require "http/client"
url = "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName"
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}}/v2/quotes/files/:fileId/download/:fileName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName"
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/v2/quotes/files/:fileId/download/:fileName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName"))
.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}}/v2/quotes/files/:fileId/download/:fileName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")
.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}}/v2/quotes/files/:fileId/download/:fileName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName';
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}}/v2/quotes/files/:fileId/download/:fileName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/files/:fileId/download/:fileName',
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}}/v2/quotes/files/:fileId/download/:fileName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName');
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}}/v2/quotes/files/:fileId/download/:fileName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName';
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}}/v2/quotes/files/:fileId/download/:fileName"]
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}}/v2/quotes/files/:fileId/download/:fileName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName",
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}}/v2/quotes/files/:fileId/download/:fileName');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/files/:fileId/download/:fileName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")
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/v2/quotes/files/:fileId/download/:fileName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName";
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}}/v2/quotes/files/:fileId/download/:fileName
http GET {{baseUrl}}/v2/quotes/files/:fileId/download/:fileName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/files/:fileId/download/:fileName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/files/:fileId/download/:fileName")! 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
multipart/form-data
RESPONSE BODY text
/home-api/assets/examples/v2/quotes/getFileContentById.json#responseBody
POST
Prepares a ZIP archive that contains the specified files. (POST)
{{baseUrl}}/v2/quotes/files/archive
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/files/archive");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/quotes/files/archive")
require "http/client"
url = "{{baseUrl}}/v2/quotes/files/archive"
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}}/v2/quotes/files/archive"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/files/archive");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/files/archive"
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/v2/quotes/files/archive HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/quotes/files/archive")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/files/archive"))
.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}}/v2/quotes/files/archive")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/quotes/files/archive")
.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}}/v2/quotes/files/archive');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/v2/quotes/files/archive'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/files/archive';
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}}/v2/quotes/files/archive',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/files/archive")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/files/archive',
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}}/v2/quotes/files/archive'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/quotes/files/archive');
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}}/v2/quotes/files/archive'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/files/archive';
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}}/v2/quotes/files/archive"]
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}}/v2/quotes/files/archive" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/files/archive",
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}}/v2/quotes/files/archive');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/files/archive');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/files/archive');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/files/archive' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/files/archive' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/v2/quotes/files/archive")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/files/archive"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/files/archive"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/files/archive")
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/v2/quotes/files/archive') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/files/archive";
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}}/v2/quotes/files/archive
http POST {{baseUrl}}/v2/quotes/files/archive
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/v2/quotes/files/archive
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/files/archive")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/archive.json#responseBody
GET
Returns Client Contacts information for a quote.
{{baseUrl}}/v2/quotes/:quoteId/clientContacts
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/clientContacts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
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}}/v2/quotes/:quoteId/clientContacts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/clientContacts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
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/v2/quotes/:quoteId/clientContacts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/clientContacts"))
.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}}/v2/quotes/:quoteId/clientContacts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.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}}/v2/quotes/:quoteId/clientContacts');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientContacts';
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}}/v2/quotes/:quoteId/clientContacts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/clientContacts',
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}}/v2/quotes/:quoteId/clientContacts'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
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}}/v2/quotes/:quoteId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientContacts';
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}}/v2/quotes/:quoteId/clientContacts"]
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}}/v2/quotes/:quoteId/clientContacts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/clientContacts",
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}}/v2/quotes/:quoteId/clientContacts');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientContacts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientContacts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId/clientContacts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
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/v2/quotes/:quoteId/clientContacts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts";
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}}/v2/quotes/:quoteId/clientContacts
http GET {{baseUrl}}/v2/quotes/:quoteId/clientContacts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/clientContacts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getClientContacts.json#responseBody
GET
Returns a list of custom field keys and values for a project. (GET)
{{baseUrl}}/v2/quotes/:quoteId/customFields
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId/customFields")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/customFields"
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}}/v2/quotes/:quoteId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/customFields"
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/v2/quotes/:quoteId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/customFields"))
.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}}/v2/quotes/:quoteId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId/customFields")
.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}}/v2/quotes/:quoteId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/quotes/:quoteId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/customFields';
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}}/v2/quotes/:quoteId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/customFields',
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}}/v2/quotes/:quoteId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId/customFields');
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}}/v2/quotes/:quoteId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/customFields';
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}}/v2/quotes/:quoteId/customFields"]
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}}/v2/quotes/:quoteId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/customFields",
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}}/v2/quotes/:quoteId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/customFields")
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/v2/quotes/:quoteId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/customFields";
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}}/v2/quotes/:quoteId/customFields
http GET {{baseUrl}}/v2/quotes/:quoteId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/customFields")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getCustomFields.json#responseBody
GET
Returns details of a file. (GET)
{{baseUrl}}/v2/quotes/files/:fileId
QUERY PARAMS
fileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/files/:fileId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/files/:fileId")
require "http/client"
url = "{{baseUrl}}/v2/quotes/files/:fileId"
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}}/v2/quotes/files/:fileId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/files/:fileId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/files/:fileId"
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/v2/quotes/files/:fileId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/files/:fileId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/files/:fileId"))
.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}}/v2/quotes/files/:fileId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/files/:fileId")
.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}}/v2/quotes/files/:fileId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/quotes/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/files/:fileId';
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}}/v2/quotes/files/:fileId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/files/:fileId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/files/:fileId',
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}}/v2/quotes/files/:fileId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/files/:fileId');
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}}/v2/quotes/files/:fileId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/files/:fileId';
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}}/v2/quotes/files/:fileId"]
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}}/v2/quotes/files/:fileId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/files/:fileId",
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}}/v2/quotes/files/:fileId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/files/:fileId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/files/:fileId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/files/:fileId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/files/:fileId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/files/:fileId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/files/:fileId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/files/:fileId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/files/:fileId")
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/v2/quotes/files/:fileId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/files/:fileId";
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}}/v2/quotes/files/:fileId
http GET {{baseUrl}}/v2/quotes/files/:fileId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/files/:fileId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/files/:fileId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getFileById.json#responseBody
GET
Returns finance information for a quote.
{{baseUrl}}/v2/quotes/:quoteId/finance
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId/finance")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance"
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}}/v2/quotes/:quoteId/finance"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance"
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/v2/quotes/:quoteId/finance HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId/finance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance"))
.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}}/v2/quotes/:quoteId/finance")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId/finance")
.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}}/v2/quotes/:quoteId/finance');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/quotes/:quoteId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance';
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}}/v2/quotes/:quoteId/finance',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/finance',
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}}/v2/quotes/:quoteId/finance'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId/finance');
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}}/v2/quotes/:quoteId/finance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance';
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}}/v2/quotes/:quoteId/finance"]
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}}/v2/quotes/:quoteId/finance" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance",
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}}/v2/quotes/:quoteId/finance');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId/finance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/finance")
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/v2/quotes/:quoteId/finance') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/finance";
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}}/v2/quotes/:quoteId/finance
http GET {{baseUrl}}/v2/quotes/:quoteId/finance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getFinance.json#responseBody
GET
Returns list of files in a quote.
{{baseUrl}}/v2/quotes/:quoteId/files
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/files");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId/files")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/files"
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}}/v2/quotes/:quoteId/files"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/files");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/files"
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/v2/quotes/:quoteId/files HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId/files")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/files"))
.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}}/v2/quotes/:quoteId/files")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId/files")
.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}}/v2/quotes/:quoteId/files');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/quotes/:quoteId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/files';
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}}/v2/quotes/:quoteId/files',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/files")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/files',
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}}/v2/quotes/:quoteId/files'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId/files');
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}}/v2/quotes/:quoteId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/files';
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}}/v2/quotes/:quoteId/files"]
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}}/v2/quotes/:quoteId/files" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/files",
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}}/v2/quotes/:quoteId/files');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/files');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/files');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/files' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/files' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId/files")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/files"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/files"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/files")
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/v2/quotes/:quoteId/files') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/files";
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}}/v2/quotes/:quoteId/files
http GET {{baseUrl}}/v2/quotes/:quoteId/files
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/files
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/files")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getFiles.json#responseBody
GET
Returns list of jobs in a quote.
{{baseUrl}}/v2/quotes/:quoteId/jobs
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId/jobs")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/jobs"
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}}/v2/quotes/:quoteId/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/jobs"
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/v2/quotes/:quoteId/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/jobs"))
.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}}/v2/quotes/:quoteId/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId/jobs")
.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}}/v2/quotes/:quoteId/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/quotes/:quoteId/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/jobs';
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}}/v2/quotes/:quoteId/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/jobs',
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}}/v2/quotes/:quoteId/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId/jobs');
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}}/v2/quotes/:quoteId/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/jobs';
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}}/v2/quotes/:quoteId/jobs"]
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}}/v2/quotes/:quoteId/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/jobs",
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}}/v2/quotes/:quoteId/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/jobs")
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/v2/quotes/:quoteId/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/jobs";
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}}/v2/quotes/:quoteId/jobs
http GET {{baseUrl}}/v2/quotes/:quoteId/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/jobs")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getJobs.json#responseBody
GET
Returns quote details. (GET)
{{baseUrl}}/v2/quotes/:quoteId
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/quotes/:quoteId")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId"
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}}/v2/quotes/:quoteId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId"
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/v2/quotes/:quoteId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/quotes/:quoteId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId"))
.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}}/v2/quotes/:quoteId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/quotes/:quoteId")
.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}}/v2/quotes/:quoteId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId';
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}}/v2/quotes/:quoteId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId',
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}}/v2/quotes/:quoteId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/quotes/:quoteId');
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}}/v2/quotes/:quoteId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId';
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}}/v2/quotes/:quoteId"]
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}}/v2/quotes/:quoteId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId",
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}}/v2/quotes/:quoteId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/quotes/:quoteId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId")
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/v2/quotes/:quoteId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId";
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}}/v2/quotes/:quoteId
http GET {{baseUrl}}/v2/quotes/:quoteId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/getById.json#responseBody
PUT
Updates Business Days for a quote.
{{baseUrl}}/v2/quotes/:quoteId/businessDays
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/businessDays");
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, "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/businessDays" {:body "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/businessDays"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
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}}/v2/quotes/:quoteId/businessDays"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/businessDays");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/businessDays"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody")
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/v2/quotes/:quoteId/businessDays HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 71
/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/businessDays")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/businessDays"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/businessDays")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/businessDays")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/businessDays');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/businessDays',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/businessDays';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
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}}/v2/quotes/:quoteId/businessDays',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/businessDays")
.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/v2/quotes/:quoteId/businessDays',
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('/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/businessDays',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/businessDays');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody');
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}}/v2/quotes/:quoteId/businessDays',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/businessDays';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/businessDays"]
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}}/v2/quotes/:quoteId/businessDays" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/businessDays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody",
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}}/v2/quotes/:quoteId/businessDays', [
'body' => '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/businessDays');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/businessDays');
$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}}/v2/quotes/:quoteId/businessDays' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/businessDays' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/businessDays", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/businessDays"
payload = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/businessDays"
payload <- "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/businessDays")
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 = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
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/v2/quotes/:quoteId/businessDays') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody"
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}}/v2/quotes/:quoteId/businessDays";
let payload = "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/businessDays \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/businessDays \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/businessDays
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateBusinessDays.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/businessDays")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Client Contacts for a quote.
{{baseUrl}}/v2/quotes/:quoteId/clientContacts
QUERY PARAMS
quoteId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/clientContacts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/quotes/:quoteId/clientContacts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/clientContacts");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/quotes/:quoteId/clientContacts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/clientContacts"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientContacts';
const options = {method: 'PUT'};
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}}/v2/quotes/:quoteId/clientContacts',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/clientContacts',
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: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientContacts'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
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}}/v2/quotes/:quoteId/clientContacts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientContacts';
const options = {method: 'PUT'};
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}}/v2/quotes/:quoteId/clientContacts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/v2/quotes/:quoteId/clientContacts" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/clientContacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/clientContacts');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientContacts' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientContacts' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/clientContacts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/clientContacts"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/clientContacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/v2/quotes/:quoteId/clientContacts') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/clientContacts";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/clientContacts
http PUT {{baseUrl}}/v2/quotes/:quoteId/clientContacts
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/clientContacts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/clientContacts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/updateClientContacts.json#responseBody
PUT
Updates Client Notes for a quote.
{{baseUrl}}/v2/quotes/:quoteId/clientNotes
QUERY PARAMS
quoteId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/clientNotes");
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, "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/clientNotes" {:body "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/clientNotes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
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}}/v2/quotes/:quoteId/clientNotes"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/clientNotes");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/clientNotes"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody")
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/v2/quotes/:quoteId/clientNotes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70
/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/clientNotes")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/clientNotes"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientNotes")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/clientNotes")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientNotes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
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}}/v2/quotes/:quoteId/clientNotes',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientNotes")
.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/v2/quotes/:quoteId/clientNotes',
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('/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientNotes',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientNotes');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody');
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}}/v2/quotes/:quoteId/clientNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/clientNotes"]
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}}/v2/quotes/:quoteId/clientNotes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/clientNotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody",
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}}/v2/quotes/:quoteId/clientNotes', [
'body' => '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/clientNotes');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/clientNotes');
$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}}/v2/quotes/:quoteId/clientNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/clientNotes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/clientNotes"
payload = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/clientNotes"
payload <- "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/clientNotes")
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 = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
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/v2/quotes/:quoteId/clientNotes') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody"
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}}/v2/quotes/:quoteId/clientNotes";
let payload = "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/clientNotes \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/clientNotes \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/clientNotes
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateClientNotes.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/clientNotes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Client Reference Number for a quote.
{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber
QUERY PARAMS
quoteId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber");
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, "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber" {:body "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
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}}/v2/quotes/:quoteId/clientReferenceNumber"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody")
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/v2/quotes/:quoteId/clientReferenceNumber HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 80
/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
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}}/v2/quotes/:quoteId/clientReferenceNumber',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")
.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/v2/quotes/:quoteId/clientReferenceNumber',
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('/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody');
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}}/v2/quotes/:quoteId/clientReferenceNumber',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"]
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}}/v2/quotes/:quoteId/clientReferenceNumber" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody",
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}}/v2/quotes/:quoteId/clientReferenceNumber', [
'body' => '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber');
$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}}/v2/quotes/:quoteId/clientReferenceNumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/clientReferenceNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"
payload = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber"
payload <- "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")
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 = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
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/v2/quotes/:quoteId/clientReferenceNumber') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody"
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}}/v2/quotes/:quoteId/clientReferenceNumber";
let payload = "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateClientReferenceNumber.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/clientReferenceNumber")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Expected Delivery Date for a quote.
{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate
QUERY PARAMS
quoteId
BODY json
{
"value": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate");
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, "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate" {:body "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
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}}/v2/quotes/:quoteId/expectedDeliveryDate"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody")
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/v2/quotes/:quoteId/expectedDeliveryDate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
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}}/v2/quotes/:quoteId/expectedDeliveryDate',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")
.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/v2/quotes/:quoteId/expectedDeliveryDate',
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('/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody');
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}}/v2/quotes/:quoteId/expectedDeliveryDate',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"]
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}}/v2/quotes/:quoteId/expectedDeliveryDate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody",
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}}/v2/quotes/:quoteId/expectedDeliveryDate', [
'body' => '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate');
$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}}/v2/quotes/:quoteId/expectedDeliveryDate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/expectedDeliveryDate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"
payload = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate"
payload <- "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")
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 = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
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/v2/quotes/:quoteId/expectedDeliveryDate') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody"
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}}/v2/quotes/:quoteId/expectedDeliveryDate";
let payload = "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateExpectedDeliveryDate.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/expectedDeliveryDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Internal Notes for a quote.
{{baseUrl}}/v2/quotes/:quoteId/internalNotes
QUERY PARAMS
quoteId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/internalNotes");
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, "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/internalNotes" {:body "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/internalNotes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
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}}/v2/quotes/:quoteId/internalNotes"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/internalNotes");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/internalNotes"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody")
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/v2/quotes/:quoteId/internalNotes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 72
/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/internalNotes")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/internalNotes"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/internalNotes")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/internalNotes")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/internalNotes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/internalNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/internalNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
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}}/v2/quotes/:quoteId/internalNotes',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/internalNotes")
.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/v2/quotes/:quoteId/internalNotes',
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('/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/internalNotes',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/internalNotes');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody');
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}}/v2/quotes/:quoteId/internalNotes',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/internalNotes';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/internalNotes"]
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}}/v2/quotes/:quoteId/internalNotes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/internalNotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody",
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}}/v2/quotes/:quoteId/internalNotes', [
'body' => '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/internalNotes');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/internalNotes');
$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}}/v2/quotes/:quoteId/internalNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/internalNotes' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/internalNotes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/internalNotes"
payload = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/internalNotes"
payload <- "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/internalNotes")
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 = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
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/v2/quotes/:quoteId/internalNotes') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody"
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}}/v2/quotes/:quoteId/internalNotes";
let payload = "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/internalNotes \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/internalNotes \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/internalNotes
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateInternalNotes.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/internalNotes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates Quote Expiry Date for a quote.
{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry
QUERY PARAMS
quoteId
BODY json
{
"value": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry");
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, "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry" {:body "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
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}}/v2/quotes/:quoteId/quoteExpiry"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody")
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/v2/quotes/:quoteId/quoteExpiry HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70
/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
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}}/v2/quotes/:quoteId/quoteExpiry',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")
.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/v2/quotes/:quoteId/quoteExpiry',
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('/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody');
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}}/v2/quotes/:quoteId/quoteExpiry',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"]
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}}/v2/quotes/:quoteId/quoteExpiry" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody",
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}}/v2/quotes/:quoteId/quoteExpiry', [
'body' => '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry');
$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}}/v2/quotes/:quoteId/quoteExpiry' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/quoteExpiry", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"
payload = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry"
payload <- "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")
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 = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
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/v2/quotes/:quoteId/quoteExpiry') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody"
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}}/v2/quotes/:quoteId/quoteExpiry";
let payload = "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/quoteExpiry \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/quoteExpiry \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/quoteExpiry
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateQuoteExpiry.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/quoteExpiry")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates a custom field with a specified key in a quote.
{{baseUrl}}/v2/quotes/:quoteId/customFields/:key
QUERY PARAMS
quoteId
key
BODY json
{
"value": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key");
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, "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key" {:body "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
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}}/v2/quotes/:quoteId/customFields/:key"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody")
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/v2/quotes/:quoteId/customFields/:key HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70
/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
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}}/v2/quotes/:quoteId/customFields/:key',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")
.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/v2/quotes/:quoteId/customFields/:key',
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('/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody');
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}}/v2/quotes/:quoteId/customFields/:key',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"]
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}}/v2/quotes/:quoteId/customFields/:key" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/customFields/:key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody",
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}}/v2/quotes/:quoteId/customFields/:key', [
'body' => '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/customFields/:key');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/customFields/:key');
$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}}/v2/quotes/:quoteId/customFields/:key' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/customFields/:key' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/customFields/:key", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"
payload = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key"
payload <- "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")
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 = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
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/v2/quotes/:quoteId/customFields/:key') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody"
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}}/v2/quotes/:quoteId/customFields/:key";
let payload = "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/customFields/:key \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/customFields/:key \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/customFields/:key
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateCustomField.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/customFields/:key")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates a payable. (2)
{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId
QUERY PARAMS
quoteId
payableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobId {}
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/payables/:payableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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/v2/quotes/:quoteId/finance/payables/:payableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")
.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/v2/quotes/:quoteId/finance/payables/:payableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobId: {},
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobId":{},"jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobId": @{ },
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"]
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}}/v2/quotes/:quoteId/finance/payables/:payableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobId' => [
],
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId');
$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}}/v2/quotes/:quoteId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/finance/payables/:payableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/payables/:payableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/quotes/:quoteId/finance/payables/:payableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobId\": {},\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/payables/:payableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": json!({}),
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
});
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}}/v2/quotes/:quoteId/finance/payables/:payableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": {},
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobId": {},\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobId": [],
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/payables/:payableId")! 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
/home-api/assets/examples/v2/quotes/updatePayable.json#responseBody
PUT
Updates a receivable. (2)
{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId
QUERY PARAMS
quoteId
receivableId
BODY json
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId");
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId" {:content-type :json
:form-params {:calculationUnitId 0
:currencyId 0
:description ""
:id 0
:ignoreMinimumCharge false
:invoiceId ""
:jobTypeId 0
:languageCombination {:sourceLanguageId 0
:targetLanguageId 0}
:languageCombinationIdNumber ""
:minimumCharge ""
:quantity ""
:rate ""
:rateOrigin ""
:taskId 0
:total ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/receivables/:receivableId"),
Content = new StringContent("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
payload := strings.NewReader("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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/v2/quotes/:quoteId/finance/receivables/:receivableId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 389
{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.setHeader("content-type", "application/json")
.setBody("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.header("content-type", "application/json")
.body("{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
.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/v2/quotes/:quoteId/finance/receivables/:receivableId',
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({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
body: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {
sourceLanguageId: 0,
targetLanguageId: 0
},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId',
headers: {'content-type': 'application/json'},
data: {
calculationUnitId: 0,
currencyId: 0,
description: '',
id: 0,
ignoreMinimumCharge: false,
invoiceId: '',
jobTypeId: 0,
languageCombination: {sourceLanguageId: 0, targetLanguageId: 0},
languageCombinationIdNumber: '',
minimumCharge: '',
quantity: '',
rate: '',
rateOrigin: '',
taskId: 0,
total: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"calculationUnitId":0,"currencyId":0,"description":"","id":0,"ignoreMinimumCharge":false,"invoiceId":"","jobTypeId":0,"languageCombination":{"sourceLanguageId":0,"targetLanguageId":0},"languageCombinationIdNumber":"","minimumCharge":"","quantity":"","rate":"","rateOrigin":"","taskId":0,"total":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"calculationUnitId": @0,
@"currencyId": @0,
@"description": @"",
@"id": @0,
@"ignoreMinimumCharge": @NO,
@"invoiceId": @"",
@"jobTypeId": @0,
@"languageCombination": @{ @"sourceLanguageId": @0, @"targetLanguageId": @0 },
@"languageCombinationIdNumber": @"",
@"minimumCharge": @"",
@"quantity": @"",
@"rate": @"",
@"rateOrigin": @"",
@"taskId": @0,
@"total": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"]
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId",
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([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId', [
'body' => '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'calculationUnitId' => 0,
'currencyId' => 0,
'description' => '',
'id' => 0,
'ignoreMinimumCharge' => null,
'invoiceId' => '',
'jobTypeId' => 0,
'languageCombination' => [
'sourceLanguageId' => 0,
'targetLanguageId' => 0
],
'languageCombinationIdNumber' => '',
'minimumCharge' => '',
'quantity' => '',
'rate' => '',
'rateOrigin' => '',
'taskId' => 0,
'total' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId');
$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}}/v2/quotes/:quoteId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/finance/receivables/:receivableId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
payload = {
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": False,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId"
payload <- "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/receivables/:receivableId")
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 \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/quotes/:quoteId/finance/receivables/:receivableId') do |req|
req.body = "{\n \"calculationUnitId\": 0,\n \"currencyId\": 0,\n \"description\": \"\",\n \"id\": 0,\n \"ignoreMinimumCharge\": false,\n \"invoiceId\": \"\",\n \"jobTypeId\": 0,\n \"languageCombination\": {\n \"sourceLanguageId\": 0,\n \"targetLanguageId\": 0\n },\n \"languageCombinationIdNumber\": \"\",\n \"minimumCharge\": \"\",\n \"quantity\": \"\",\n \"rate\": \"\",\n \"rateOrigin\": \"\",\n \"taskId\": 0,\n \"total\": \"\",\n \"type\": \"\"\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}}/v2/quotes/:quoteId/finance/receivables/:receivableId";
let payload = json!({
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": json!({
"sourceLanguageId": 0,
"targetLanguageId": 0
}),
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
});
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}}/v2/quotes/:quoteId/finance/receivables/:receivableId \
--header 'content-type: application/json' \
--data '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}'
echo '{
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": {
"sourceLanguageId": 0,
"targetLanguageId": 0
},
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
}' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "calculationUnitId": 0,\n "currencyId": 0,\n "description": "",\n "id": 0,\n "ignoreMinimumCharge": false,\n "invoiceId": "",\n "jobTypeId": 0,\n "languageCombination": {\n "sourceLanguageId": 0,\n "targetLanguageId": 0\n },\n "languageCombinationIdNumber": "",\n "minimumCharge": "",\n "quantity": "",\n "rate": "",\n "rateOrigin": "",\n "taskId": 0,\n "total": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"calculationUnitId": 0,
"currencyId": 0,
"description": "",
"id": 0,
"ignoreMinimumCharge": false,
"invoiceId": "",
"jobTypeId": 0,
"languageCombination": [
"sourceLanguageId": 0,
"targetLanguageId": 0
],
"languageCombinationIdNumber": "",
"minimumCharge": "",
"quantity": "",
"rate": "",
"rateOrigin": "",
"taskId": 0,
"total": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/finance/receivables/:receivableId")! 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
/home-api/assets/examples/v2/quotes/updateReceivable.json#responseBody
PUT
Updates instructions for all vendors performing the jobs in a quote.
{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions
QUERY PARAMS
quoteId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions");
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, "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions" {:body "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
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}}/v2/quotes/:quoteId/vendorInstructions"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody")
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/v2/quotes/:quoteId/vendorInstructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 81
/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
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}}/v2/quotes/:quoteId/vendorInstructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")
.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/v2/quotes/:quoteId/vendorInstructions',
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('/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody');
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}}/v2/quotes/:quoteId/vendorInstructions',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"]
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}}/v2/quotes/:quoteId/vendorInstructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody",
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}}/v2/quotes/:quoteId/vendorInstructions', [
'body' => '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions');
$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}}/v2/quotes/:quoteId/vendorInstructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/vendorInstructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"
payload = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions"
payload <- "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")
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 = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
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/v2/quotes/:quoteId/vendorInstructions') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody"
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}}/v2/quotes/:quoteId/vendorInstructions";
let payload = "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/vendorInstructions \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/vendorInstructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/vendorInstructions
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateInstructionsForAllJobs.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/vendorInstructions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates source language for a quote.
{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage
QUERY PARAMS
quoteId
BODY json
{
"sourceLanguageId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage");
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, "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage" {:body "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
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}}/v2/quotes/:quoteId/sourceLanguage"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody")
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/v2/quotes/:quoteId/sourceLanguage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 73
/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
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}}/v2/quotes/:quoteId/sourceLanguage',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")
.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/v2/quotes/:quoteId/sourceLanguage',
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('/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody');
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}}/v2/quotes/:quoteId/sourceLanguage',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"]
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}}/v2/quotes/:quoteId/sourceLanguage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody",
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}}/v2/quotes/:quoteId/sourceLanguage', [
'body' => '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage');
$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}}/v2/quotes/:quoteId/sourceLanguage' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/sourceLanguage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"
payload = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage"
payload <- "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")
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 = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
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/v2/quotes/:quoteId/sourceLanguage') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody"
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}}/v2/quotes/:quoteId/sourceLanguage";
let payload = "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/sourceLanguage \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/sourceLanguage \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/sourceLanguage
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateSourceLanguage.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/sourceLanguage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates specialization for a quote.
{{baseUrl}}/v2/quotes/:quoteId/specialization
QUERY PARAMS
quoteId
BODY json
{
"specializationId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/specialization");
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, "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/specialization" {:body "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/specialization"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
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}}/v2/quotes/:quoteId/specialization"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/specialization");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/specialization"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody")
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/v2/quotes/:quoteId/specialization HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 73
/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/specialization")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/specialization"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/specialization")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/specialization")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/specialization');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/specialization',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/specialization';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
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}}/v2/quotes/:quoteId/specialization',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/specialization")
.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/v2/quotes/:quoteId/specialization',
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('/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/specialization',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/specialization');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody');
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}}/v2/quotes/:quoteId/specialization',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/specialization';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/specialization"]
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}}/v2/quotes/:quoteId/specialization" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/specialization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody",
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}}/v2/quotes/:quoteId/specialization', [
'body' => '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/specialization');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/specialization');
$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}}/v2/quotes/:quoteId/specialization' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/specialization' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/specialization", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/specialization"
payload = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/specialization"
payload <- "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/specialization")
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 = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
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/v2/quotes/:quoteId/specialization') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody"
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}}/v2/quotes/:quoteId/specialization";
let payload = "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/specialization \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/specialization \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/specialization
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateSpecialization.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/specialization")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates target languages for a quote.
{{baseUrl}}/v2/quotes/:quoteId/targetLanguages
QUERY PARAMS
quoteId
BODY json
{
"targetLanguageIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages");
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, "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages" {:body "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
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}}/v2/quotes/:quoteId/targetLanguages"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody")
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/v2/quotes/:quoteId/targetLanguages HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
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}}/v2/quotes/:quoteId/targetLanguages',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")
.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/v2/quotes/:quoteId/targetLanguages',
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('/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody');
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}}/v2/quotes/:quoteId/targetLanguages',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"]
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}}/v2/quotes/:quoteId/targetLanguages" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/targetLanguages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody",
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}}/v2/quotes/:quoteId/targetLanguages', [
'body' => '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/targetLanguages');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/targetLanguages');
$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}}/v2/quotes/:quoteId/targetLanguages' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/targetLanguages' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/targetLanguages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"
payload = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages"
payload <- "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")
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 = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
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/v2/quotes/:quoteId/targetLanguages') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody"
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}}/v2/quotes/:quoteId/targetLanguages";
let payload = "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/targetLanguages \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/targetLanguages \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/targetLanguages
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateTargetLanguages.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/targetLanguages")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates volume for a quote.
{{baseUrl}}/v2/quotes/:quoteId/volume
QUERY PARAMS
quoteId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/volume");
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, "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/quotes/:quoteId/volume" {:body "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/volume"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
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}}/v2/quotes/:quoteId/volume"),
Content = new StringContent("/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/volume");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/volume"
payload := strings.NewReader("/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody")
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/v2/quotes/:quoteId/volume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 65
/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/quotes/:quoteId/volume")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/volume"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/volume")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/quotes/:quoteId/volume")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/quotes/:quoteId/volume');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/volume',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/volume';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
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}}/v2/quotes/:quoteId/volume',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/volume")
.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/v2/quotes/:quoteId/volume',
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('/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/quotes/:quoteId/volume',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/quotes/:quoteId/volume');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody');
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}}/v2/quotes/:quoteId/volume',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/quotes/:quoteId/volume';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/volume"]
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}}/v2/quotes/:quoteId/volume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/volume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody",
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}}/v2/quotes/:quoteId/volume', [
'body' => '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/volume');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/volume');
$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}}/v2/quotes/:quoteId/volume' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/volume' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/quotes/:quoteId/volume", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/volume"
payload = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/volume"
payload <- "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/volume")
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 = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
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/v2/quotes/:quoteId/volume') do |req|
req.body = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody"
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}}/v2/quotes/:quoteId/volume";
let payload = "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/quotes/:quoteId/volume \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody'
echo '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody' | \
http PUT {{baseUrl}}/v2/quotes/:quoteId/volume \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/volume
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v2/quotes/updateVolume.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/volume")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Uploads file to the quote as a file uploaded by PM.
{{baseUrl}}/v2/quotes/:quoteId/files/upload
QUERY PARAMS
quoteId
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/quotes/:quoteId/files/upload");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/quotes/:quoteId/files/upload" {:multipart [{:name "file"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/v2/quotes/:quoteId/files/upload"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\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}}/v2/quotes/:quoteId/files/upload"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "file",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/quotes/:quoteId/files/upload");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/quotes/:quoteId/files/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/quotes/:quoteId/files/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 113
-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/quotes/:quoteId/files/upload")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/quotes/:quoteId/files/upload"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/files/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/quotes/:quoteId/files/upload")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('file', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/quotes/:quoteId/files/upload');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/quotes/:quoteId/files/upload';
const form = new FormData();
form.append('file', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('file', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/quotes/:quoteId/files/upload',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/v2/quotes/:quoteId/files/upload")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/quotes/:quoteId/files/upload',
headers: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/quotes/:quoteId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {file: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/quotes/:quoteId/files/upload');
req.headers({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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}}/v2/quotes/:quoteId/files/upload',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('file', '');
const url = '{{baseUrl}}/v2/quotes/:quoteId/files/upload';
const options = {method: 'POST'};
options.body = formData;
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": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"file", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/quotes/:quoteId/files/upload"]
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}}/v2/quotes/:quoteId/files/upload" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/quotes/:quoteId/files/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/quotes/:quoteId/files/upload', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/quotes/:quoteId/files/upload');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/v2/quotes/:quoteId/files/upload');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/quotes/:quoteId/files/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/quotes/:quoteId/files/upload' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/v2/quotes/:quoteId/files/upload", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/quotes/:quoteId/files/upload"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/quotes/:quoteId/files/upload"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/quotes/:quoteId/files/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/v2/quotes/:quoteId/files/upload') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/quotes/:quoteId/files/upload";
let form = reqwest::multipart::Form::new()
.text("file", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/quotes/:quoteId/files/upload \
--header 'content-type: multipart/form-data' \
--form file=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/v2/quotes/:quoteId/files/upload \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/v2/quotes/:quoteId/files/upload
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "file",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/quotes/:quoteId/files/upload")! 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;charset=UTF-8
RESPONSE BODY json
/home-api/assets/examples/v2/quotes/uploadFile.json#responseBody
POST
Duplicates a report.
{{baseUrl}}/reports/:reportId/duplicate
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/:reportId/duplicate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/reports/:reportId/duplicate")
require "http/client"
url = "{{baseUrl}}/reports/:reportId/duplicate"
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}}/reports/:reportId/duplicate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/:reportId/duplicate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/:reportId/duplicate"
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/reports/:reportId/duplicate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/reports/:reportId/duplicate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/:reportId/duplicate"))
.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}}/reports/:reportId/duplicate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/reports/:reportId/duplicate")
.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}}/reports/:reportId/duplicate');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/reports/:reportId/duplicate'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/:reportId/duplicate';
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}}/reports/:reportId/duplicate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/:reportId/duplicate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/:reportId/duplicate',
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}}/reports/:reportId/duplicate'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/reports/:reportId/duplicate');
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}}/reports/:reportId/duplicate'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/:reportId/duplicate';
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}}/reports/:reportId/duplicate"]
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}}/reports/:reportId/duplicate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/:reportId/duplicate",
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}}/reports/:reportId/duplicate');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/:reportId/duplicate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/:reportId/duplicate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/:reportId/duplicate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/:reportId/duplicate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/reports/:reportId/duplicate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/:reportId/duplicate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/:reportId/duplicate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/:reportId/duplicate")
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/reports/:reportId/duplicate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/:reportId/duplicate";
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}}/reports/:reportId/duplicate
http POST {{baseUrl}}/reports/:reportId/duplicate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/reports/:reportId/duplicate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/:reportId/duplicate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Exports reports definition to XML.
{{baseUrl}}/reports/export/xml
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/export/xml");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/reports/export/xml")
require "http/client"
url = "{{baseUrl}}/reports/export/xml"
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}}/reports/export/xml"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/export/xml");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/export/xml"
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/reports/export/xml HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/reports/export/xml")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/export/xml"))
.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}}/reports/export/xml")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/reports/export/xml")
.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}}/reports/export/xml');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/reports/export/xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/export/xml';
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}}/reports/export/xml',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/export/xml")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/export/xml',
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}}/reports/export/xml'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/reports/export/xml');
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}}/reports/export/xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/export/xml';
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}}/reports/export/xml"]
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}}/reports/export/xml" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/export/xml",
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}}/reports/export/xml');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/export/xml');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/export/xml');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/export/xml' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/export/xml' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/reports/export/xml")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/export/xml"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/export/xml"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/export/xml")
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/reports/export/xml') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/export/xml";
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}}/reports/export/xml
http POST {{baseUrl}}/reports/export/xml
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/reports/export/xml
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/export/xml")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/reports/exportToXML.json#responseBody
GET
Generates CSV content for a report.
{{baseUrl}}/reports/:reportId/result/csv
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/:reportId/result/csv");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/reports/:reportId/result/csv")
require "http/client"
url = "{{baseUrl}}/reports/:reportId/result/csv"
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}}/reports/:reportId/result/csv"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/:reportId/result/csv");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/:reportId/result/csv"
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/reports/:reportId/result/csv HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/reports/:reportId/result/csv")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/:reportId/result/csv"))
.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}}/reports/:reportId/result/csv")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/reports/:reportId/result/csv")
.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}}/reports/:reportId/result/csv');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/reports/:reportId/result/csv'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/:reportId/result/csv';
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}}/reports/:reportId/result/csv',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/:reportId/result/csv")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/:reportId/result/csv',
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}}/reports/:reportId/result/csv'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/reports/:reportId/result/csv');
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}}/reports/:reportId/result/csv'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/:reportId/result/csv';
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}}/reports/:reportId/result/csv"]
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}}/reports/:reportId/result/csv" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/:reportId/result/csv",
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}}/reports/:reportId/result/csv');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/:reportId/result/csv');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/:reportId/result/csv');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/:reportId/result/csv' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/:reportId/result/csv' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/reports/:reportId/result/csv")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/:reportId/result/csv"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/:reportId/result/csv"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/:reportId/result/csv")
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/reports/:reportId/result/csv') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/:reportId/result/csv";
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}}/reports/:reportId/result/csv
http GET {{baseUrl}}/reports/:reportId/result/csv
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/reports/:reportId/result/csv
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/:reportId/result/csv")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/reports//generateCSV.json#responseBody
GET
Generates printer friendly content for a report.
{{baseUrl}}/reports/:reportId/result/printerFriendly
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/:reportId/result/printerFriendly");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/reports/:reportId/result/printerFriendly")
require "http/client"
url = "{{baseUrl}}/reports/:reportId/result/printerFriendly"
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}}/reports/:reportId/result/printerFriendly"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/:reportId/result/printerFriendly");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/:reportId/result/printerFriendly"
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/reports/:reportId/result/printerFriendly HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/reports/:reportId/result/printerFriendly")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/:reportId/result/printerFriendly"))
.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}}/reports/:reportId/result/printerFriendly")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/reports/:reportId/result/printerFriendly")
.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}}/reports/:reportId/result/printerFriendly');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/reports/:reportId/result/printerFriendly'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/:reportId/result/printerFriendly';
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}}/reports/:reportId/result/printerFriendly',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/:reportId/result/printerFriendly")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/:reportId/result/printerFriendly',
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}}/reports/:reportId/result/printerFriendly'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/reports/:reportId/result/printerFriendly');
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}}/reports/:reportId/result/printerFriendly'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/:reportId/result/printerFriendly';
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}}/reports/:reportId/result/printerFriendly"]
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}}/reports/:reportId/result/printerFriendly" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/:reportId/result/printerFriendly",
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}}/reports/:reportId/result/printerFriendly');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/:reportId/result/printerFriendly');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/:reportId/result/printerFriendly');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/:reportId/result/printerFriendly' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/:reportId/result/printerFriendly' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/reports/:reportId/result/printerFriendly")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/:reportId/result/printerFriendly"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/:reportId/result/printerFriendly"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/:reportId/result/printerFriendly")
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/reports/:reportId/result/printerFriendly') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/:reportId/result/printerFriendly";
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}}/reports/:reportId/result/printerFriendly
http GET {{baseUrl}}/reports/:reportId/result/printerFriendly
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/reports/:reportId/result/printerFriendly
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/:reportId/result/printerFriendly")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/reports//generatePrinterFriendly.json#responseBody
POST
Imports reports definition from XML.
{{baseUrl}}/reports/import/xml
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/import/xml");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/reports/import/xml")
require "http/client"
url = "{{baseUrl}}/reports/import/xml"
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}}/reports/import/xml"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/import/xml");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/import/xml"
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/reports/import/xml HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/reports/import/xml")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/import/xml"))
.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}}/reports/import/xml")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/reports/import/xml")
.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}}/reports/import/xml');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/reports/import/xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/import/xml';
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}}/reports/import/xml',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/import/xml")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/import/xml',
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}}/reports/import/xml'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/reports/import/xml');
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}}/reports/import/xml'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/import/xml';
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}}/reports/import/xml"]
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}}/reports/import/xml" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/import/xml",
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}}/reports/import/xml');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/import/xml');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/import/xml');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/import/xml' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/import/xml' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/reports/import/xml")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/import/xml"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/import/xml"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/import/xml")
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/reports/import/xml') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/import/xml";
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}}/reports/import/xml
http POST {{baseUrl}}/reports/import/xml
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/reports/import/xml
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/import/xml")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/reports/importFromXML.json#responseBody
PUT
Marks report as preferred or not.
{{baseUrl}}/reports/:reportId/preferred
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/:reportId/preferred");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/reports/:reportId/preferred")
require "http/client"
url = "{{baseUrl}}/reports/:reportId/preferred"
response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/reports/:reportId/preferred"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/:reportId/preferred");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/:reportId/preferred"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/reports/:reportId/preferred HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/reports/:reportId/preferred")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/:reportId/preferred"))
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/reports/:reportId/preferred")
.put(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/reports/:reportId/preferred")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/reports/:reportId/preferred');
xhr.send(data);
import axios from 'axios';
const options = {method: 'PUT', url: '{{baseUrl}}/reports/:reportId/preferred'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/:reportId/preferred';
const options = {method: 'PUT'};
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}}/reports/:reportId/preferred',
method: 'PUT',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/:reportId/preferred")
.put(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/:reportId/preferred',
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: 'PUT', url: '{{baseUrl}}/reports/:reportId/preferred'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/reports/:reportId/preferred');
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}}/reports/:reportId/preferred'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/:reportId/preferred';
const options = {method: 'PUT'};
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}}/reports/:reportId/preferred"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
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}}/reports/:reportId/preferred" in
Client.call `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/:reportId/preferred",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/reports/:reportId/preferred');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/:reportId/preferred');
$request->setMethod(HTTP_METH_PUT);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/:reportId/preferred');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/:reportId/preferred' -Method PUT
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/:reportId/preferred' -Method PUT
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PUT", "/baseUrl/reports/:reportId/preferred")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/:reportId/preferred"
response = requests.put(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/:reportId/preferred"
response <- VERB("PUT", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/:reportId/preferred")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/reports/:reportId/preferred') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/:reportId/preferred";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/reports/:reportId/preferred
http PUT {{baseUrl}}/reports/:reportId/preferred
wget --quiet \
--method PUT \
--output-document \
- {{baseUrl}}/reports/:reportId/preferred
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/:reportId/preferred")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a report.
{{baseUrl}}/reports/:reportId
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/:reportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/reports/:reportId")
require "http/client"
url = "{{baseUrl}}/reports/:reportId"
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}}/reports/:reportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/:reportId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/:reportId"
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/reports/:reportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/reports/:reportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/:reportId"))
.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}}/reports/:reportId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/reports/:reportId")
.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}}/reports/:reportId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/reports/:reportId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/:reportId';
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}}/reports/:reportId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/:reportId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/:reportId',
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}}/reports/:reportId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/reports/:reportId');
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}}/reports/:reportId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/:reportId';
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}}/reports/:reportId"]
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}}/reports/:reportId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/:reportId",
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}}/reports/:reportId');
echo $response->getBody();
setUrl('{{baseUrl}}/reports/:reportId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/:reportId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/:reportId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/:reportId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/reports/:reportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/:reportId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/:reportId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/:reportId")
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/reports/:reportId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/:reportId";
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}}/reports/:reportId
http DELETE {{baseUrl}}/reports/:reportId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/reports/:reportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/:reportId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns all subscriptions
{{baseUrl}}/subscription
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/subscription");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/subscription")
require "http/client"
url = "{{baseUrl}}/subscription"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/subscription"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/subscription");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/subscription"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/subscription HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/subscription")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/subscription"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/subscription")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/subscription")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/subscription');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/subscription';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/subscription',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/subscription")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/subscription',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/subscription'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/subscription');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/subscription';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/subscription"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/subscription" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/subscription');
echo $response->getBody();
setUrl('{{baseUrl}}/subscription');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/subscription');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/subscription' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/subscription' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/subscription")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/subscription"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/subscription"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/subscription') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/subscription";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/subscription
http GET {{baseUrl}}/subscription
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/subscription
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/subscription")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/subscription/getAll.json#responseBody
POST
Subscribe to event
{{baseUrl}}/subscription
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/subscription");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/subscription")
require "http/client"
url = "{{baseUrl}}/subscription"
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}}/subscription"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/subscription");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/subscription"
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/subscription HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/subscription")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/subscription"))
.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}}/subscription")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/subscription")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/subscription');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/subscription';
const options = {method: '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}}/subscription',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/subscription")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/subscription',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/subscription'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/subscription');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/subscription';
const options = {method: '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}}/subscription"]
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}}/subscription" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/subscription');
echo $response->getBody();
setUrl('{{baseUrl}}/subscription');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/subscription');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/subscription' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/subscription' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/subscription")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/subscription"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/subscription"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/subscription') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/subscription";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/subscription
http POST {{baseUrl}}/subscription
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/subscription
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/subscription")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/subscription/subscribe_created.json#responseBody
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/subscription/subscribe_conflict.json#responseBody
GET
This method can be used to determine if hooks are supported.
{{baseUrl}}/subscription/supports
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/subscription/supports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/subscription/supports")
require "http/client"
url = "{{baseUrl}}/subscription/supports"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/subscription/supports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/subscription/supports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/subscription/supports"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/subscription/supports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/subscription/supports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/subscription/supports"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/subscription/supports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/subscription/supports")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/subscription/supports');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/subscription/supports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/subscription/supports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/subscription/supports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/subscription/supports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/subscription/supports',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/subscription/supports'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/subscription/supports');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/subscription/supports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/subscription/supports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/subscription/supports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/subscription/supports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/subscription/supports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/subscription/supports');
echo $response->getBody();
setUrl('{{baseUrl}}/subscription/supports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/subscription/supports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/subscription/supports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/subscription/supports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/subscription/supports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/subscription/supports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/subscription/supports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/subscription/supports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/subscription/supports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/subscription/supports";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/subscription/supports
http GET {{baseUrl}}/subscription/supports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/subscription/supports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/subscription/supports")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Unsubscribe from event
{{baseUrl}}/subscription/:subscriptionId
QUERY PARAMS
subscriptionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/subscription/:subscriptionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/subscription/:subscriptionId")
require "http/client"
url = "{{baseUrl}}/subscription/:subscriptionId"
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}}/subscription/:subscriptionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/subscription/:subscriptionId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/subscription/:subscriptionId"
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/subscription/:subscriptionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/subscription/:subscriptionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/subscription/:subscriptionId"))
.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}}/subscription/:subscriptionId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/subscription/:subscriptionId")
.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}}/subscription/:subscriptionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/subscription/:subscriptionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/subscription/:subscriptionId';
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}}/subscription/:subscriptionId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/subscription/:subscriptionId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/subscription/:subscriptionId',
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}}/subscription/:subscriptionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/subscription/:subscriptionId');
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}}/subscription/:subscriptionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/subscription/:subscriptionId';
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}}/subscription/:subscriptionId"]
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}}/subscription/:subscriptionId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/subscription/:subscriptionId",
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}}/subscription/:subscriptionId');
echo $response->getBody();
setUrl('{{baseUrl}}/subscription/:subscriptionId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/subscription/:subscriptionId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/subscription/:subscriptionId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/subscription/:subscriptionId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/subscription/:subscriptionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/subscription/:subscriptionId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/subscription/:subscriptionId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/subscription/:subscriptionId")
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/subscription/:subscriptionId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/subscription/:subscriptionId";
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}}/subscription/:subscriptionId
http DELETE {{baseUrl}}/subscription/:subscriptionId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/subscription/:subscriptionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/subscription/:subscriptionId")! 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()
POST
Adds files to a given task.
{{baseUrl}}/tasks/:taskId/files/input
QUERY PARAMS
taskId
BODY json
{
"content": "",
"name": "",
"token": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/files/input");
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, "/home-api/assets/examples/v1/tasks/addFile.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:taskId/files/input" {:body "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/files/input"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
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}}/tasks/:taskId/files/input"),
Content = new StringContent("/home-api/assets/examples/v1/tasks/addFile.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/files/input");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/tasks/addFile.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/files/input"
payload := strings.NewReader("/home-api/assets/examples/v1/tasks/addFile.json#requestBody")
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/tasks/:taskId/files/input HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
/home-api/assets/examples/v1/tasks/addFile.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:taskId/files/input")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/tasks/addFile.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/files/input"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/tasks/addFile.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/addFile.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/files/input")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:taskId/files/input")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/tasks/addFile.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/tasks/addFile.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/tasks/:taskId/files/input');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:taskId/files/input',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/files/input';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
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}}/tasks/:taskId/files/input',
method: 'POST',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/addFile.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/files/input")
.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/tasks/:taskId/files/input',
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('/home-api/assets/examples/v1/tasks/addFile.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:taskId/files/input',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tasks/:taskId/files/input');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/tasks/addFile.json#requestBody');
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}}/tasks/:taskId/files/input',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/files/input';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/tasks/addFile.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/files/input"]
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}}/tasks/:taskId/files/input" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/tasks/addFile.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/files/input",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/tasks/addFile.json#requestBody",
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}}/tasks/:taskId/files/input', [
'body' => '/home-api/assets/examples/v1/tasks/addFile.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/files/input');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/tasks/addFile.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/tasks/addFile.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/files/input');
$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}}/tasks/:taskId/files/input' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/files/input' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/tasks/:taskId/files/input", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/files/input"
payload = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/files/input"
payload <- "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/files/input")
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 = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
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/tasks/:taskId/files/input') do |req|
req.body = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/files/input";
let payload = "/home-api/assets/examples/v1/tasks/addFile.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:taskId/files/input \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/tasks/addFile.json#requestBody'
echo '/home-api/assets/examples/v1/tasks/addFile.json#requestBody' | \
http POST {{baseUrl}}/tasks/:taskId/files/input \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/tasks/addFile.json#requestBody' \
--output-document \
- {{baseUrl}}/tasks/:taskId/files/input
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/tasks/addFile.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/files/input")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a task.
{{baseUrl}}/tasks/:taskId
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/tasks/:taskId")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId"
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}}/tasks/:taskId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId"
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/tasks/:taskId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/tasks/:taskId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId"))
.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}}/tasks/:taskId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/tasks/:taskId")
.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}}/tasks/:taskId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/tasks/:taskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId';
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}}/tasks/:taskId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId',
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}}/tasks/:taskId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/tasks/:taskId');
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}}/tasks/:taskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId';
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}}/tasks/:taskId"]
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}}/tasks/:taskId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId",
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}}/tasks/:taskId');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/tasks/:taskId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId")
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/tasks/:taskId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId";
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}}/tasks/:taskId
http DELETE {{baseUrl}}/tasks/:taskId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/tasks/:taskId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns contacts of a given task.
{{baseUrl}}/tasks/:taskId/contacts
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/contacts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/contacts")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/contacts"
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}}/tasks/:taskId/contacts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/contacts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/contacts"
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/tasks/:taskId/contacts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/contacts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/contacts"))
.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}}/tasks/:taskId/contacts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/contacts")
.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}}/tasks/:taskId/contacts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/contacts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/contacts';
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}}/tasks/:taskId/contacts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/contacts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/contacts',
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}}/tasks/:taskId/contacts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/contacts');
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}}/tasks/:taskId/contacts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/contacts';
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}}/tasks/:taskId/contacts"]
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}}/tasks/:taskId/contacts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/contacts",
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}}/tasks/:taskId/contacts');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/contacts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/contacts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/contacts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/contacts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/contacts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/contacts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/contacts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/contacts")
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/tasks/:taskId/contacts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/contacts";
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}}/tasks/:taskId/contacts
http GET {{baseUrl}}/tasks/:taskId/contacts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/contacts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/contacts")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getContacts.json#responseBody
GET
Returns custom fields of a given task.
{{baseUrl}}/tasks/:taskId/customFields
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/customFields")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/customFields"
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}}/tasks/:taskId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/customFields"
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/tasks/:taskId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/customFields"))
.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}}/tasks/:taskId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/customFields")
.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}}/tasks/:taskId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/customFields';
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}}/tasks/:taskId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/customFields',
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}}/tasks/:taskId/customFields'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/customFields');
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}}/tasks/:taskId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/customFields';
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}}/tasks/:taskId/customFields"]
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}}/tasks/:taskId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/customFields",
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}}/tasks/:taskId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/customFields")
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/tasks/:taskId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/customFields";
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}}/tasks/:taskId/customFields
http GET {{baseUrl}}/tasks/:taskId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getCustomFields.json#responseBody
GET
Returns dates of a given task.
{{baseUrl}}/tasks/:taskId/dates
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/dates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/dates")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/dates"
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}}/tasks/:taskId/dates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/dates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/dates"
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/tasks/:taskId/dates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/dates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/dates"))
.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}}/tasks/:taskId/dates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/dates")
.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}}/tasks/:taskId/dates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/dates';
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}}/tasks/:taskId/dates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/dates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/dates',
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}}/tasks/:taskId/dates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/dates');
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}}/tasks/:taskId/dates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/dates';
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}}/tasks/:taskId/dates"]
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}}/tasks/:taskId/dates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/dates",
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}}/tasks/:taskId/dates');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/dates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/dates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/dates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/dates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/dates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/dates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/dates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/dates")
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/tasks/:taskId/dates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/dates";
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}}/tasks/:taskId/dates
http GET {{baseUrl}}/tasks/:taskId/dates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/dates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/dates")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getDates.json#responseBody
GET
Returns instructions of a given task.
{{baseUrl}}/tasks/:taskId/instructions
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/instructions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/instructions")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/instructions"
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}}/tasks/:taskId/instructions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/instructions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/instructions"
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/tasks/:taskId/instructions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/instructions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/instructions"))
.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}}/tasks/:taskId/instructions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/instructions")
.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}}/tasks/:taskId/instructions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/instructions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/instructions';
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}}/tasks/:taskId/instructions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/instructions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/instructions',
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}}/tasks/:taskId/instructions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/instructions');
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}}/tasks/:taskId/instructions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/instructions';
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}}/tasks/:taskId/instructions"]
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}}/tasks/:taskId/instructions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/instructions",
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}}/tasks/:taskId/instructions');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/instructions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/instructions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/instructions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/instructions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/instructions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/instructions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/instructions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/instructions")
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/tasks/:taskId/instructions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/instructions";
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}}/tasks/:taskId/instructions
http GET {{baseUrl}}/tasks/:taskId/instructions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/instructions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getInstructions.json#responseBody
GET
Returns lists of files of a given task.
{{baseUrl}}/tasks/:taskId/files
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/files");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/files")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/files"
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}}/tasks/:taskId/files"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/files");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/files"
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/tasks/:taskId/files HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/files")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/files"))
.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}}/tasks/:taskId/files")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/files")
.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}}/tasks/:taskId/files');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/files';
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}}/tasks/:taskId/files',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/files")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/files',
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}}/tasks/:taskId/files'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/files');
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}}/tasks/:taskId/files'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/files';
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}}/tasks/:taskId/files"]
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}}/tasks/:taskId/files" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/files",
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}}/tasks/:taskId/files');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/files');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/files');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/files' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/files' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/files")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/files"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/files"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/files")
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/tasks/:taskId/files') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/files";
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}}/tasks/:taskId/files
http GET {{baseUrl}}/tasks/:taskId/files
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/files
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/files")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getTaskFiles.json#responseBody
GET
Returns progress of a given task.
{{baseUrl}}/tasks/:taskId/progress
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/progress");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:taskId/progress")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/progress"
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}}/tasks/:taskId/progress"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/progress");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/progress"
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/tasks/:taskId/progress HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:taskId/progress")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/progress"))
.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}}/tasks/:taskId/progress")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:taskId/progress")
.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}}/tasks/:taskId/progress');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tasks/:taskId/progress'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/progress';
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}}/tasks/:taskId/progress',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/progress")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/progress',
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}}/tasks/:taskId/progress'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tasks/:taskId/progress');
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}}/tasks/:taskId/progress'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/progress';
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}}/tasks/:taskId/progress"]
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}}/tasks/:taskId/progress" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/progress",
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}}/tasks/:taskId/progress');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/progress');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/progress');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/progress' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/progress' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tasks/:taskId/progress")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/progress"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/progress"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/progress")
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/tasks/:taskId/progress') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/progress";
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}}/tasks/:taskId/progress
http GET {{baseUrl}}/tasks/:taskId/progress
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tasks/:taskId/progress
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/progress")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/getProgress.json#responseBody
POST
Starts a task.
{{baseUrl}}/tasks/:taskId/start
QUERY PARAMS
taskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/start");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:taskId/start")
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/start"
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}}/tasks/:taskId/start"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/start");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/start"
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/tasks/:taskId/start HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:taskId/start")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/start"))
.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}}/tasks/:taskId/start")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:taskId/start")
.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}}/tasks/:taskId/start');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/tasks/:taskId/start'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/start';
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}}/tasks/:taskId/start',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/start")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:taskId/start',
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}}/tasks/:taskId/start'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tasks/:taskId/start');
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}}/tasks/:taskId/start'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/start';
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}}/tasks/:taskId/start"]
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}}/tasks/:taskId/start" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/start",
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}}/tasks/:taskId/start');
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/start');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:taskId/start');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:taskId/start' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/start' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/tasks/:taskId/start")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/start"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/start"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/start")
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/tasks/:taskId/start') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:taskId/start";
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}}/tasks/:taskId/start
http POST {{baseUrl}}/tasks/:taskId/start
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/tasks/:taskId/start
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/start")! 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()
PUT
Updates Client Task PO Number of a given task.
{{baseUrl}}/tasks/:taskId/clientTaskPONumber
QUERY PARAMS
taskId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/clientTaskPONumber");
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 \"value\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/clientTaskPONumber" {:content-type :json
:form-params {:value ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/clientTaskPONumber"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"value\": \"\"\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}}/tasks/:taskId/clientTaskPONumber"),
Content = new StringContent("{\n \"value\": \"\"\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}}/tasks/:taskId/clientTaskPONumber");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"value\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/clientTaskPONumber"
payload := strings.NewReader("{\n \"value\": \"\"\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/tasks/:taskId/clientTaskPONumber HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"value": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/clientTaskPONumber")
.setHeader("content-type", "application/json")
.setBody("{\n \"value\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/clientTaskPONumber"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"value\": \"\"\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 \"value\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/clientTaskPONumber")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/clientTaskPONumber")
.header("content-type", "application/json")
.body("{\n \"value\": \"\"\n}")
.asString();
const data = JSON.stringify({
value: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/clientTaskPONumber');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/clientTaskPONumber',
headers: {'content-type': 'application/json'},
data: {value: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/clientTaskPONumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"value":""}'
};
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}}/tasks/:taskId/clientTaskPONumber',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "value": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"value\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/clientTaskPONumber")
.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/tasks/:taskId/clientTaskPONumber',
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({value: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/clientTaskPONumber',
headers: {'content-type': 'application/json'},
body: {value: ''},
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}}/tasks/:taskId/clientTaskPONumber');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
value: ''
});
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}}/tasks/:taskId/clientTaskPONumber',
headers: {'content-type': 'application/json'},
data: {value: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/clientTaskPONumber';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"value":""}'
};
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 = @{ @"value": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/clientTaskPONumber"]
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}}/tasks/:taskId/clientTaskPONumber" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"value\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/clientTaskPONumber",
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([
'value' => ''
]),
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}}/tasks/:taskId/clientTaskPONumber', [
'body' => '{
"value": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/clientTaskPONumber');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'value' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'value' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/clientTaskPONumber');
$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}}/tasks/:taskId/clientTaskPONumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"value": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/clientTaskPONumber' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"value": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"value\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/clientTaskPONumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/clientTaskPONumber"
payload = { "value": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/clientTaskPONumber"
payload <- "{\n \"value\": \"\"\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}}/tasks/:taskId/clientTaskPONumber")
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 \"value\": \"\"\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/tasks/:taskId/clientTaskPONumber') do |req|
req.body = "{\n \"value\": \"\"\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}}/tasks/:taskId/clientTaskPONumber";
let payload = json!({"value": ""});
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}}/tasks/:taskId/clientTaskPONumber \
--header 'content-type: application/json' \
--data '{
"value": ""
}'
echo '{
"value": ""
}' | \
http PUT {{baseUrl}}/tasks/:taskId/clientTaskPONumber \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "value": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:taskId/clientTaskPONumber
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["value": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/clientTaskPONumber")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/updateClientTaskPONumber.json#responseBody
PUT
Updates contacts of a given task.
{{baseUrl}}/tasks/:taskId/contacts
QUERY PARAMS
taskId
BODY json
{
"additionalIds": [],
"primaryId": 0,
"sendBackToId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/contacts");
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, "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/contacts" {:body "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/contacts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
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}}/tasks/:taskId/contacts"),
Content = new StringContent("/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/contacts");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/contacts"
payload := strings.NewReader("/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody")
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/tasks/:taskId/contacts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 66
/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/contacts")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/contacts"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/contacts")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/contacts")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/contacts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/contacts',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/contacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
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}}/tasks/:taskId/contacts',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/contacts")
.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/tasks/:taskId/contacts',
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('/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/contacts',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/tasks/:taskId/contacts');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody');
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}}/tasks/:taskId/contacts',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/contacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/contacts"]
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}}/tasks/:taskId/contacts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody",
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}}/tasks/:taskId/contacts', [
'body' => '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/contacts');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/contacts');
$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}}/tasks/:taskId/contacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/contacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/contacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/contacts"
payload = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/contacts"
payload <- "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/contacts")
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 = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
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/tasks/:taskId/contacts') do |req|
req.body = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody"
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}}/tasks/:taskId/contacts";
let payload = "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/tasks/:taskId/contacts \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody'
echo '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody' | \
http PUT {{baseUrl}}/tasks/:taskId/contacts \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody' \
--output-document \
- {{baseUrl}}/tasks/:taskId/contacts
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/tasks/updateContacts.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/contacts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates custom fields of a given task.
{{baseUrl}}/tasks/:taskId/customFields
QUERY PARAMS
taskId
BODY json
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/customFields");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/customFields" {:content-type :json
:form-params [{:key ""
:name ""
:type ""
:value {}}]})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/customFields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/tasks/:taskId/customFields"),
Content = new StringContent("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/tasks/:taskId/customFields");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/customFields"
payload := strings.NewReader("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/tasks/:taskId/customFields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/customFields")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/customFields"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/customFields")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/customFields")
.header("content-type", "application/json")
.body("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.asString();
const data = JSON.stringify([
{
key: '',
name: '',
type: '',
value: {}
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/customFields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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}}/tasks/:taskId/customFields',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/customFields")
.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/tasks/:taskId/customFields',
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([{key: '', name: '', type: '', value: {}}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/customFields',
headers: {'content-type': 'application/json'},
body: [{key: '', name: '', type: '', value: {}}],
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}}/tasks/:taskId/customFields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
key: '',
name: '',
type: '',
value: {}
}
]);
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}}/tasks/:taskId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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 = @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/customFields"]
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}}/tasks/:taskId/customFields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/customFields",
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([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]),
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}}/tasks/:taskId/customFields', [
'body' => '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/customFields');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/customFields');
$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}}/tasks/:taskId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/customFields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/customFields"
payload = [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/customFields"
payload <- "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/tasks/:taskId/customFields")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/tasks/:taskId/customFields') do |req|
req.body = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/tasks/:taskId/customFields";
let payload = (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
);
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/tasks/:taskId/customFields \
--header 'content-type: application/json' \
--data '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
echo '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]' | \
http PUT {{baseUrl}}/tasks/:taskId/customFields \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n]' \
--output-document \
- {{baseUrl}}/tasks/:taskId/customFields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"key": "",
"name": "",
"type": "",
"value": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/updateCustomFields.json#responseBody
PUT
Updates dates of a given task.
{{baseUrl}}/tasks/:taskId/dates
QUERY PARAMS
taskId
BODY json
{
"actualDeliveryDate": {
"value": 0
},
"actualStartDate": {},
"deadline": {},
"startDate": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/dates");
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, "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/dates" {:body "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/dates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
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}}/tasks/:taskId/dates"),
Content = new StringContent("/home-api/assets/examples/v1/tasks/updateDates.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:taskId/dates");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/dates"
payload := strings.NewReader("/home-api/assets/examples/v1/tasks/updateDates.json#requestBody")
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/tasks/:taskId/dates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
/home-api/assets/examples/v1/tasks/updateDates.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/dates")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/v1/tasks/updateDates.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/dates"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/dates")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/dates")
.header("content-type", "application/json")
.body("/home-api/assets/examples/v1/tasks/updateDates.json#requestBody")
.asString();
const data = '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/dates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
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}}/tasks/:taskId/dates',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/dates")
.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/tasks/:taskId/dates',
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('/home-api/assets/examples/v1/tasks/updateDates.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/dates',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/tasks/:taskId/dates');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/v1/tasks/updateDates.json#requestBody');
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}}/tasks/:taskId/dates',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/dates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/v1/tasks/updateDates.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/dates"]
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}}/tasks/:taskId/dates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody",
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}}/tasks/:taskId/dates', [
'body' => '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/dates');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/v1/tasks/updateDates.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/v1/tasks/updateDates.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/dates');
$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}}/tasks/:taskId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/dates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/dates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/dates"
payload = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/dates"
payload <- "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
encode <- "raw"
response <- VERB("PUT", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:taskId/dates")
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 = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
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/tasks/:taskId/dates') do |req|
req.body = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody"
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}}/tasks/:taskId/dates";
let payload = "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/tasks/:taskId/dates \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody'
echo '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody' | \
http PUT {{baseUrl}}/tasks/:taskId/dates \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/v1/tasks/updateDates.json#requestBody' \
--output-document \
- {{baseUrl}}/tasks/:taskId/dates
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/v1/tasks/updateDates.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/dates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates instructions of a given task.
{{baseUrl}}/tasks/:taskId/instructions
QUERY PARAMS
taskId
BODY json
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/instructions");
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/instructions" {:content-type :json
:form-params {:forProvider ""
:fromCustomer ""
:internal ""
:notes ""
:paymentNoteForCustomer ""
:paymentNoteForVendor ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/instructions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/tasks/:taskId/instructions"),
Content = new StringContent("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/tasks/:taskId/instructions");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/instructions"
payload := strings.NewReader("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/tasks/:taskId/instructions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 140
{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/instructions")
.setHeader("content-type", "application/json")
.setBody("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/instructions"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/instructions")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/instructions")
.header("content-type", "application/json")
.body("{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
.asString();
const data = JSON.stringify({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/instructions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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}}/tasks/:taskId/instructions',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/instructions")
.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/tasks/:taskId/instructions',
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({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/instructions',
headers: {'content-type': 'application/json'},
body: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
},
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}}/tasks/:taskId/instructions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
});
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}}/tasks/:taskId/instructions',
headers: {'content-type': 'application/json'},
data: {
forProvider: '',
fromCustomer: '',
internal: '',
notes: '',
paymentNoteForCustomer: '',
paymentNoteForVendor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/instructions';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"forProvider":"","fromCustomer":"","internal":"","notes":"","paymentNoteForCustomer":"","paymentNoteForVendor":""}'
};
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 = @{ @"forProvider": @"",
@"fromCustomer": @"",
@"internal": @"",
@"notes": @"",
@"paymentNoteForCustomer": @"",
@"paymentNoteForVendor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/instructions"]
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}}/tasks/:taskId/instructions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/instructions",
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([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]),
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}}/tasks/:taskId/instructions', [
'body' => '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/instructions');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'forProvider' => '',
'fromCustomer' => '',
'internal' => '',
'notes' => '',
'paymentNoteForCustomer' => '',
'paymentNoteForVendor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/instructions');
$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}}/tasks/:taskId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/instructions' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/instructions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/instructions"
payload = {
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/instructions"
payload <- "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/tasks/:taskId/instructions")
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 \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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/tasks/:taskId/instructions') do |req|
req.body = "{\n \"forProvider\": \"\",\n \"fromCustomer\": \"\",\n \"internal\": \"\",\n \"notes\": \"\",\n \"paymentNoteForCustomer\": \"\",\n \"paymentNoteForVendor\": \"\"\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}}/tasks/:taskId/instructions";
let payload = json!({
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
});
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}}/tasks/:taskId/instructions \
--header 'content-type: application/json' \
--data '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}'
echo '{
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
}' | \
http PUT {{baseUrl}}/tasks/:taskId/instructions \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "forProvider": "",\n "fromCustomer": "",\n "internal": "",\n "notes": "",\n "paymentNoteForCustomer": "",\n "paymentNoteForVendor": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:taskId/instructions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"forProvider": "",
"fromCustomer": "",
"internal": "",
"notes": "",
"paymentNoteForCustomer": "",
"paymentNoteForVendor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/instructions")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/updateInstructions.json#responseBody
PUT
Updates name of a given task.
{{baseUrl}}/tasks/:taskId/name
QUERY PARAMS
taskId
BODY json
{
"value": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:taskId/name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"value\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:taskId/name" {:content-type :json
:form-params {:value ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:taskId/name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"value\": \"\"\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}}/tasks/:taskId/name"),
Content = new StringContent("{\n \"value\": \"\"\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}}/tasks/:taskId/name");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"value\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:taskId/name"
payload := strings.NewReader("{\n \"value\": \"\"\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/tasks/:taskId/name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"value": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:taskId/name")
.setHeader("content-type", "application/json")
.setBody("{\n \"value\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:taskId/name"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"value\": \"\"\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 \"value\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/name")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:taskId/name")
.header("content-type", "application/json")
.body("{\n \"value\": \"\"\n}")
.asString();
const data = JSON.stringify({
value: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:taskId/name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/name',
headers: {'content-type': 'application/json'},
data: {value: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:taskId/name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"value":""}'
};
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}}/tasks/:taskId/name',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "value": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"value\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:taskId/name")
.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/tasks/:taskId/name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({value: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:taskId/name',
headers: {'content-type': 'application/json'},
body: {value: ''},
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}}/tasks/:taskId/name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
value: ''
});
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}}/tasks/:taskId/name',
headers: {'content-type': 'application/json'},
data: {value: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:taskId/name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"value":""}'
};
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 = @{ @"value": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:taskId/name"]
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}}/tasks/:taskId/name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"value\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:taskId/name",
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([
'value' => ''
]),
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}}/tasks/:taskId/name', [
'body' => '{
"value": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:taskId/name');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'value' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'value' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:taskId/name');
$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}}/tasks/:taskId/name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"value": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:taskId/name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"value": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"value\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/tasks/:taskId/name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:taskId/name"
payload = { "value": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:taskId/name"
payload <- "{\n \"value\": \"\"\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}}/tasks/:taskId/name")
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 \"value\": \"\"\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/tasks/:taskId/name') do |req|
req.body = "{\n \"value\": \"\"\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}}/tasks/:taskId/name";
let payload = json!({"value": ""});
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}}/tasks/:taskId/name \
--header 'content-type: application/json' \
--data '{
"value": ""
}'
echo '{
"value": ""
}' | \
http PUT {{baseUrl}}/tasks/:taskId/name \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "value": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:taskId/name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["value": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:taskId/name")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/v1/tasks/updateName.json#responseBody
GET
Returns currently signed in user details.
{{baseUrl}}/users/me
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/me");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/me")
require "http/client"
url = "{{baseUrl}}/users/me"
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}}/users/me"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/me");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/me"
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/users/me HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/me")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/me"))
.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}}/users/me")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/me")
.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}}/users/me');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/users/me'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/me';
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}}/users/me',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/me")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/me',
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}}/users/me'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users/me');
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}}/users/me'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/me';
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}}/users/me"]
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}}/users/me" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/me",
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}}/users/me');
echo $response->getBody();
setUrl('{{baseUrl}}/users/me');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/me');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/me' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/me' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users/me")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/me"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/me"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/me")
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/users/me') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/me";
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}}/users/me
http GET {{baseUrl}}/users/me
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users/me
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/me")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getMe.json#responseBody
GET
Returns custom field of a given user.
{{baseUrl}}/users/:userId/customFields/:customFieldKey
QUERY PARAMS
userId
customFieldKey
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId/customFields/:customFieldKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/:userId/customFields/:customFieldKey")
require "http/client"
url = "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
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}}/users/:userId/customFields/:customFieldKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:userId/customFields/:customFieldKey");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
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/users/:userId/customFields/:customFieldKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId/customFields/:customFieldKey"))
.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}}/users/:userId/customFields/:customFieldKey")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.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}}/users/:userId/customFields/:customFieldKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users/:userId/customFields/:customFieldKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId/customFields/:customFieldKey';
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}}/users/:userId/customFields/:customFieldKey',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:userId/customFields/:customFieldKey',
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}}/users/:userId/customFields/:customFieldKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users/:userId/customFields/:customFieldKey');
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}}/users/:userId/customFields/:customFieldKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId/customFields/:customFieldKey';
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}}/users/:userId/customFields/:customFieldKey"]
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}}/users/:userId/customFields/:customFieldKey" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId/customFields/:customFieldKey",
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}}/users/:userId/customFields/:customFieldKey');
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId/customFields/:customFieldKey');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:userId/customFields/:customFieldKey');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:userId/customFields/:customFieldKey' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId/customFields/:customFieldKey' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users/:userId/customFields/:customFieldKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
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/users/:userId/customFields/:customFieldKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:userId/customFields/:customFieldKey";
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}}/users/:userId/customFields/:customFieldKey
http GET {{baseUrl}}/users/:userId/customFields/:customFieldKey
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users/:userId/customFields/:customFieldKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId/customFields/:customFieldKey")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getCustomField.json#responseBody
GET
Returns custom fields of a given user.
{{baseUrl}}/users/:userId/customFields
QUERY PARAMS
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/:userId/customFields")
require "http/client"
url = "{{baseUrl}}/users/:userId/customFields"
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}}/users/:userId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:userId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId/customFields"
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/users/:userId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/:userId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId/customFields"))
.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}}/users/:userId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/:userId/customFields")
.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}}/users/:userId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/users/:userId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId/customFields';
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}}/users/:userId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:userId/customFields',
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}}/users/:userId/customFields'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users/:userId/customFields');
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}}/users/:userId/customFields'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId/customFields';
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}}/users/:userId/customFields"]
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}}/users/:userId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId/customFields",
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}}/users/:userId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:userId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:userId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users/:userId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:userId/customFields")
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/users/:userId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:userId/customFields";
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}}/users/:userId/customFields
http GET {{baseUrl}}/users/:userId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users/:userId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getCustomFields.json#responseBody
GET
Returns list of simple users representations
{{baseUrl}}/users
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users")
require "http/client"
url = "{{baseUrl}}/users"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/users HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/users")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/users');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/users',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/users'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users');
echo $response->getBody();
setUrl('{{baseUrl}}/users');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users
http GET {{baseUrl}}/users
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getAllNamesWithIds.json#responseBody
GET
Returns time zone preferred by user currently signed in.
{{baseUrl}}/users/me/timeZone
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/me/timeZone");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/me/timeZone")
require "http/client"
url = "{{baseUrl}}/users/me/timeZone"
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}}/users/me/timeZone"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/me/timeZone");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/me/timeZone"
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/users/me/timeZone HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/me/timeZone")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/me/timeZone"))
.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}}/users/me/timeZone")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/me/timeZone")
.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}}/users/me/timeZone');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/users/me/timeZone'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/me/timeZone';
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}}/users/me/timeZone',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/me/timeZone")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/me/timeZone',
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}}/users/me/timeZone'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users/me/timeZone');
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}}/users/me/timeZone'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/me/timeZone';
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}}/users/me/timeZone"]
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}}/users/me/timeZone" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/me/timeZone",
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}}/users/me/timeZone');
echo $response->getBody();
setUrl('{{baseUrl}}/users/me/timeZone');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/me/timeZone');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/me/timeZone' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/me/timeZone' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users/me/timeZone")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/me/timeZone"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/me/timeZone"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/me/timeZone")
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/users/me/timeZone') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/me/timeZone";
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}}/users/me/timeZone
http GET {{baseUrl}}/users/me/timeZone
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users/me/timeZone
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/me/timeZone")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getTimeZone.json#responseBody
GET
Returns user details.
{{baseUrl}}/users/:userId
QUERY PARAMS
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/:userId")
require "http/client"
url = "{{baseUrl}}/users/:userId"
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}}/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:userId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId"
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/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId"))
.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}}/users/:userId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/:userId")
.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}}/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/users/:userId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId';
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}}/users/:userId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:userId',
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}}/users/:userId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/users/:userId');
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}}/users/:userId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId';
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}}/users/:userId"]
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}}/users/:userId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId",
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}}/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:userId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:userId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:userId")
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/users/:userId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:userId";
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}}/users/:userId
http GET {{baseUrl}}/users/:userId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/getById.json#responseBody
PUT
Sets user's password to a new value.
{{baseUrl}}/users/:userId/password
QUERY PARAMS
userId
BODY formUrlEncoded
newPassword
oldPassword
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId/password");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "newPassword=&oldPassword=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:userId/password" {:form-params {:newPassword ""
:oldPassword ""}})
require "http/client"
url = "{{baseUrl}}/users/:userId/password"
headers = HTTP::Headers{
"content-type" => "application/x-www-form-urlencoded"
}
reqBody = "newPassword=&oldPassword="
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}}/users/:userId/password"),
Content = new FormUrlEncodedContent(new Dictionary
{
{ "newPassword", "" },
{ "oldPassword", "" },
}),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:userId/password");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "newPassword=&oldPassword=", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId/password"
payload := strings.NewReader("newPassword=&oldPassword=")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/users/:userId/password HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com
Content-Length: 25
newPassword=&oldPassword=
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:userId/password")
.setHeader("content-type", "application/x-www-form-urlencoded")
.setBody("newPassword=&oldPassword=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId/password"))
.header("content-type", "application/x-www-form-urlencoded")
.method("PUT", HttpRequest.BodyPublishers.ofString("newPassword=&oldPassword="))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "newPassword=&oldPassword=");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:userId/password")
.put(body)
.addHeader("content-type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:userId/password")
.header("content-type", "application/x-www-form-urlencoded")
.body("newPassword=&oldPassword=")
.asString();
const data = 'newPassword=&oldPassword=';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/users/:userId/password');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
xhr.send(data);
import axios from 'axios';
const encodedParams = new URLSearchParams();
encodedParams.set('newPassword', '');
encodedParams.set('oldPassword', '');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/password',
headers: {'content-type': 'application/x-www-form-urlencoded'},
data: encodedParams,
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId/password';
const options = {
method: 'PUT',
headers: {'content-type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({newPassword: '', oldPassword: ''})
};
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}}/users/:userId/password',
method: 'PUT',
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
data: {
newPassword: '',
oldPassword: ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/x-www-form-urlencoded")
val body = RequestBody.create(mediaType, "newPassword=&oldPassword=")
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId/password")
.put(body)
.addHeader("content-type", "application/x-www-form-urlencoded")
.build()
val response = client.newCall(request).execute()
const qs = require('querystring');
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:userId/password',
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
};
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(qs.stringify({newPassword: '', oldPassword: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/password',
headers: {'content-type': 'application/x-www-form-urlencoded'},
form: {newPassword: '', oldPassword: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/users/:userId/password');
req.headers({
'content-type': 'application/x-www-form-urlencoded'
});
req.form({
newPassword: '',
oldPassword: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const { URLSearchParams } = require('url');
const encodedParams = new URLSearchParams();
encodedParams.set('newPassword', '');
encodedParams.set('oldPassword', '');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/password',
headers: {'content-type': 'application/x-www-form-urlencoded'},
data: encodedParams,
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const { URLSearchParams } = require('url');
const fetch = require('node-fetch');
const encodedParams = new URLSearchParams();
encodedParams.set('newPassword', '');
encodedParams.set('oldPassword', '');
const url = '{{baseUrl}}/users/:userId/password';
const options = {
method: 'PUT',
headers: {'content-type': 'application/x-www-form-urlencoded'},
body: encodedParams
};
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/x-www-form-urlencoded" };
NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"newPassword=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&oldPassword=" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:userId/password"]
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}}/users/:userId/password" in
let headers = Header.add (Header.init ()) "content-type" "application/x-www-form-urlencoded" in
let body = Cohttp_lwt_body.of_string "newPassword=&oldPassword=" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "newPassword=&oldPassword=",
CURLOPT_HTTPHEADER => [
"content-type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/users/:userId/password', [
'form_params' => [
'newPassword' => '',
'oldPassword' => ''
],
'headers' => [
'content-type' => 'application/x-www-form-urlencoded',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId/password');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/x-www-form-urlencoded'
]);
$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields([
'newPassword' => '',
'oldPassword' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(new http\QueryString([
'newPassword' => '',
'oldPassword' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:userId/password');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/x-www-form-urlencoded'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:userId/password' -Method PUT -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'newPassword=&oldPassword='
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId/password' -Method PUT -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'newPassword=&oldPassword='
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "newPassword=&oldPassword="
headers = { 'content-type': "application/x-www-form-urlencoded" }
conn.request("PUT", "/baseUrl/users/:userId/password", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId/password"
payload = {
"newPassword": "",
"oldPassword": ""
}
headers = {"content-type": "application/x-www-form-urlencoded"}
response = requests.put(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId/password"
payload <- "newPassword=&oldPassword="
encode <- "form"
response <- VERB("PUT", url, body = payload, content_type("application/x-www-form-urlencoded"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:userId/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request.body = "newPassword=&oldPassword="
response = http.request(request)
puts response.read_body
require 'faraday'
data = {
:newPassword => "",
:oldPassword => "",
}
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/x-www-form-urlencoded'}
)
response = conn.put('/baseUrl/users/:userId/password') do |req|
req.body = URI.encode_www_form(data)
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}}/users/:userId/password";
let payload = json!({
"newPassword": "",
"oldPassword": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/x-www-form-urlencoded".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.form(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/users/:userId/password \
--header 'content-type: application/x-www-form-urlencoded' \
--data newPassword= \
--data oldPassword=
http --form PUT {{baseUrl}}/users/:userId/password \
content-type:application/x-www-form-urlencoded \
newPassword='' \
oldPassword=''
wget --quiet \
--method PUT \
--header 'content-type: application/x-www-form-urlencoded' \
--body-data 'newPassword=&oldPassword=' \
--output-document \
- {{baseUrl}}/users/:userId/password
import Foundation
let headers = ["content-type": "application/x-www-form-urlencoded"]
let postData = NSMutableData(data: "newPassword=".data(using: String.Encoding.utf8)!)
postData.append("&oldPassword=".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId/password")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Updates an existing user.
{{baseUrl}}/users/:userId
QUERY PARAMS
userId
BODY json
{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId");
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 \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:userId" {:content-type :json
:form-params {:customFields [{:key ""
:name ""
:type ""
:value {}}]
:email ""
:firstName ""
:gender ""
:id 0
:lastName ""
:login ""
:mobilePhone ""
:phone ""
:positionName ""
:timeZoneId ""
:userGroupName ""}})
require "http/client"
url = "{{baseUrl}}/users/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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}}/users/:userId"),
Content = new StringContent("{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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}}/users/:userId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId"
payload := strings.NewReader("{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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/users/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 305
{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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 \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:userId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:userId")
.header("content-type", "application/json")
.body("{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}")
.asString();
const data = JSON.stringify({
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/users/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId',
headers: {'content-type': 'application/json'},
data: {
customFields: [{key: '', name: '', type: '', value: {}}],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"customFields":[{"key":"","name":"","type":"","value":{}}],"email":"","firstName":"","gender":"","id":0,"lastName":"","login":"","mobilePhone":"","phone":"","positionName":"","timeZoneId":"","userGroupName":""}'
};
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}}/users/:userId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "email": "",\n "firstName": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "login": "",\n "mobilePhone": "",\n "phone": "",\n "positionName": "",\n "timeZoneId": "",\n "userGroupName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId")
.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/users/:userId',
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({
customFields: [{key: '', name: '', type: '', value: {}}],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId',
headers: {'content-type': 'application/json'},
body: {
customFields: [{key: '', name: '', type: '', value: {}}],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
},
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}}/users/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
customFields: [
{
key: '',
name: '',
type: '',
value: {}
}
],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
});
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}}/users/:userId',
headers: {'content-type': 'application/json'},
data: {
customFields: [{key: '', name: '', type: '', value: {}}],
email: '',
firstName: '',
gender: '',
id: 0,
lastName: '',
login: '',
mobilePhone: '',
phone: '',
positionName: '',
timeZoneId: '',
userGroupName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"customFields":[{"key":"","name":"","type":"","value":{}}],"email":"","firstName":"","gender":"","id":0,"lastName":"","login":"","mobilePhone":"","phone":"","positionName":"","timeZoneId":"","userGroupName":""}'
};
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 = @{ @"customFields": @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ],
@"email": @"",
@"firstName": @"",
@"gender": @"",
@"id": @0,
@"lastName": @"",
@"login": @"",
@"mobilePhone": @"",
@"phone": @"",
@"positionName": @"",
@"timeZoneId": @"",
@"userGroupName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:userId"]
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}}/users/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId",
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([
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'email' => '',
'firstName' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'login' => '',
'mobilePhone' => '',
'phone' => '',
'positionName' => '',
'timeZoneId' => '',
'userGroupName' => ''
]),
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}}/users/:userId', [
'body' => '{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'email' => '',
'firstName' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'login' => '',
'mobilePhone' => '',
'phone' => '',
'positionName' => '',
'timeZoneId' => '',
'userGroupName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'customFields' => [
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
],
'email' => '',
'firstName' => '',
'gender' => '',
'id' => 0,
'lastName' => '',
'login' => '',
'mobilePhone' => '',
'phone' => '',
'positionName' => '',
'timeZoneId' => '',
'userGroupName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:userId');
$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}}/users/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/users/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId"
payload = {
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId"
payload <- "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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}}/users/:userId")
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 \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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/users/:userId') do |req|
req.body = "{\n \"customFields\": [\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n ],\n \"email\": \"\",\n \"firstName\": \"\",\n \"gender\": \"\",\n \"id\": 0,\n \"lastName\": \"\",\n \"login\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"positionName\": \"\",\n \"timeZoneId\": \"\",\n \"userGroupName\": \"\"\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}}/users/:userId";
let payload = json!({
"customFields": (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
),
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
});
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}}/users/:userId \
--header 'content-type: application/json' \
--data '{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}'
echo '{
"customFields": [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
}' | \
http PUT {{baseUrl}}/users/:userId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "customFields": [\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n ],\n "email": "",\n "firstName": "",\n "gender": "",\n "id": 0,\n "lastName": "",\n "login": "",\n "mobilePhone": "",\n "phone": "",\n "positionName": "",\n "timeZoneId": "",\n "userGroupName": ""\n}' \
--output-document \
- {{baseUrl}}/users/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"customFields": [
[
"key": "",
"name": "",
"type": "",
"value": []
]
],
"email": "",
"firstName": "",
"gender": "",
"id": 0,
"lastName": "",
"login": "",
"mobilePhone": "",
"phone": "",
"positionName": "",
"timeZoneId": "",
"userGroupName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/update2.json#responseBody
PUT
Updates custom fields of a given user.
{{baseUrl}}/users/:userId/customFields
QUERY PARAMS
userId
BODY json
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId/customFields");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:userId/customFields" {:content-type :json
:form-params [{:key ""
:name ""
:type ""
:value {}}]})
require "http/client"
url = "{{baseUrl}}/users/:userId/customFields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields"),
Content = new StringContent("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId/customFields"
payload := strings.NewReader("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/users/:userId/customFields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:userId/customFields")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId/customFields"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:userId/customFields")
.header("content-type", "application/json")
.body("[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
.asString();
const data = JSON.stringify([
{
key: '',
name: '',
type: '',
value: {}
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/users/:userId/customFields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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}}/users/:userId/customFields',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields")
.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/users/:userId/customFields',
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([{key: '', name: '', type: '', value: {}}]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/customFields',
headers: {'content-type': 'application/json'},
body: [{key: '', name: '', type: '', value: {}}],
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}}/users/:userId/customFields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
key: '',
name: '',
type: '',
value: {}
}
]);
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}}/users/:userId/customFields',
headers: {'content-type': 'application/json'},
data: [{key: '', name: '', type: '', value: {}}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId/customFields';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"key":"","name":"","type":"","value":{}}]'
};
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 = @[ @{ @"key": @"", @"name": @"", @"type": @"", @"value": @{ } } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:userId/customFields"]
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}}/users/:userId/customFields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId/customFields",
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([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]),
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}}/users/:userId/customFields', [
'body' => '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId/customFields');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/users/:userId/customFields');
$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}}/users/:userId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId/customFields' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/users/:userId/customFields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId/customFields"
payload = [
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId/customFields"
payload <- "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/users/:userId/customFields') do |req|
req.body = "[\n {\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields";
let payload = (
json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
})
);
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/users/:userId/customFields \
--header 'content-type: application/json' \
--data '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]'
echo '[
{
"key": "",
"name": "",
"type": "",
"value": {}
}
]' | \
http PUT {{baseUrl}}/users/:userId/customFields \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n }\n]' \
--output-document \
- {{baseUrl}}/users/:userId/customFields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"key": "",
"name": "",
"type": "",
"value": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/updateCustomFields.json#responseBody
PUT
Updates given custom field of a given user.
{{baseUrl}}/users/:userId/customFields/:customFieldKey
QUERY PARAMS
userId
customFieldKey
BODY json
{
"key": "",
"name": "",
"type": "",
"value": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:userId/customFields/:customFieldKey");
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:userId/customFields/:customFieldKey" {:content-type :json
:form-params {:key ""
:name ""
:type ""
:value {}}})
require "http/client"
url = "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields/:customFieldKey"),
Content = new StringContent("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields/:customFieldKey");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
payload := strings.NewReader("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/users/:userId/customFields/:customFieldKey HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"key": "",
"name": "",
"type": "",
"value": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.setHeader("content-type", "application/json")
.setBody("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:userId/customFields/:customFieldKey"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.header("content-type", "application/json")
.body("{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
.asString();
const data = JSON.stringify({
key: '',
name: '',
type: '',
value: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/users/:userId/customFields/:customFieldKey');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
data: {key: '', name: '', type: '', value: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:userId/customFields/:customFieldKey';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"key":"","name":"","type":"","value":{}}'
};
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}}/users/:userId/customFields/:customFieldKey',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:userId/customFields/:customFieldKey")
.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/users/:userId/customFields/:customFieldKey',
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({key: '', name: '', type: '', value: {}}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:userId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
body: {key: '', name: '', type: '', value: {}},
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}}/users/:userId/customFields/:customFieldKey');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
key: '',
name: '',
type: '',
value: {}
});
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}}/users/:userId/customFields/:customFieldKey',
headers: {'content-type': 'application/json'},
data: {key: '', name: '', type: '', value: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:userId/customFields/:customFieldKey';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"key":"","name":"","type":"","value":{}}'
};
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 = @{ @"key": @"",
@"name": @"",
@"type": @"",
@"value": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:userId/customFields/:customFieldKey"]
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}}/users/:userId/customFields/:customFieldKey" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:userId/customFields/:customFieldKey",
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([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]),
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}}/users/:userId/customFields/:customFieldKey', [
'body' => '{
"key": "",
"name": "",
"type": "",
"value": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:userId/customFields/:customFieldKey');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'key' => '',
'name' => '',
'type' => '',
'value' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/users/:userId/customFields/:customFieldKey');
$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}}/users/:userId/customFields/:customFieldKey' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:userId/customFields/:customFieldKey' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/users/:userId/customFields/:customFieldKey", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
payload = {
"key": "",
"name": "",
"type": "",
"value": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:userId/customFields/:customFieldKey"
payload <- "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields/:customFieldKey")
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 \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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/users/:userId/customFields/:customFieldKey') do |req|
req.body = "{\n \"key\": \"\",\n \"name\": \"\",\n \"type\": \"\",\n \"value\": {}\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}}/users/:userId/customFields/:customFieldKey";
let payload = json!({
"key": "",
"name": "",
"type": "",
"value": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/users/:userId/customFields/:customFieldKey \
--header 'content-type: application/json' \
--data '{
"key": "",
"name": "",
"type": "",
"value": {}
}'
echo '{
"key": "",
"name": "",
"type": "",
"value": {}
}' | \
http PUT {{baseUrl}}/users/:userId/customFields/:customFieldKey \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "key": "",\n "name": "",\n "type": "",\n "value": {}\n}' \
--output-document \
- {{baseUrl}}/users/:userId/customFields/:customFieldKey
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"key": "",
"name": "",
"type": "",
"value": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:userId/customFields/:customFieldKey")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/users/updateCustomField.json#responseBody
POST
Changes invoice status to given status.
{{baseUrl}}/accounting/providers/invoices/:invoiceId/status
QUERY PARAMS
invoiceId
BODY json
{
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status");
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, "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status" {:body "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
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}}/accounting/providers/invoices/:invoiceId/status"),
Content = new StringContent("/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"
payload := strings.NewReader("/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody")
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/accounting/providers/invoices/:invoiceId/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")
.setHeader("content-type", "application/json")
.setBody("/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")
.header("content-type", "application/json")
.body("/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody")
.asString();
const data = '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
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}}/accounting/providers/invoices/:invoiceId/status',
method: 'POST',
headers: {
'content-type': 'application/json'
},
data: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")
.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/accounting/providers/invoices/:invoiceId/status',
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('/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status');
req.headers({
'content-type': 'application/json'
});
req.send('/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody');
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}}/accounting/providers/invoices/:invoiceId/status',
headers: {'content-type': 'application/json'},
data: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
};
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" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"]
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}}/accounting/providers/invoices/:invoiceId/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody",
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}}/accounting/providers/invoices/:invoiceId/status', [
'body' => '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/status');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setBody('/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/status');
$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}}/accounting/providers/invoices/:invoiceId/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/accounting/providers/invoices/:invoiceId/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"
payload = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
headers = {"content-type": "application/json"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status"
payload <- "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")
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 = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
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/accounting/providers/invoices/:invoiceId/status') do |req|
req.body = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status";
let payload = "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody";
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)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounting/providers/invoices/:invoiceId/status \
--header 'content-type: application/json' \
--data '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody'
echo '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody' | \
http POST {{baseUrl}}/accounting/providers/invoices/:invoiceId/status \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody' \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId/status
import Foundation
let headers = ["content-type": "application/json"]
let postData = NSData(data: "/home-api/assets/examples/accounting/providers/invoices/setStatus.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId/status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Creates a new invoice. (POST)
{{baseUrl}}/accounting/providers/invoices
BODY json
{
"jobsIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices");
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 \"jobsIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/providers/invoices" {:content-type :json
:form-params {:jobsIds []}})
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jobsIds\": []\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}}/accounting/providers/invoices"),
Content = new StringContent("{\n \"jobsIds\": []\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}}/accounting/providers/invoices");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jobsIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices"
payload := strings.NewReader("{\n \"jobsIds\": []\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/accounting/providers/invoices HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"jobsIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/providers/invoices")
.setHeader("content-type", "application/json")
.setBody("{\n \"jobsIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jobsIds\": []\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 \"jobsIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/providers/invoices")
.header("content-type", "application/json")
.body("{\n \"jobsIds\": []\n}")
.asString();
const data = JSON.stringify({
jobsIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounting/providers/invoices');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices',
headers: {'content-type': 'application/json'},
data: {jobsIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobsIds":[]}'
};
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}}/accounting/providers/invoices',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jobsIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"jobsIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices")
.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/accounting/providers/invoices',
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({jobsIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices',
headers: {'content-type': 'application/json'},
body: {jobsIds: []},
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}}/accounting/providers/invoices');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jobsIds: []
});
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}}/accounting/providers/invoices',
headers: {'content-type': 'application/json'},
data: {jobsIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobsIds":[]}'
};
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 = @{ @"jobsIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/providers/invoices"]
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}}/accounting/providers/invoices" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jobsIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices",
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([
'jobsIds' => [
]
]),
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}}/accounting/providers/invoices', [
'body' => '{
"jobsIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jobsIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jobsIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/accounting/providers/invoices');
$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}}/accounting/providers/invoices' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobsIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobsIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jobsIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/accounting/providers/invoices", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices"
payload = { "jobsIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices"
payload <- "{\n \"jobsIds\": []\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}}/accounting/providers/invoices")
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 \"jobsIds\": []\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/accounting/providers/invoices') do |req|
req.body = "{\n \"jobsIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices";
let payload = json!({"jobsIds": ()});
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}}/accounting/providers/invoices \
--header 'content-type: application/json' \
--data '{
"jobsIds": []
}'
echo '{
"jobsIds": []
}' | \
http POST {{baseUrl}}/accounting/providers/invoices \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jobsIds": []\n}' \
--output-document \
- {{baseUrl}}/accounting/providers/invoices
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["jobsIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/createSingleFromJobs.json#responseBody
POST
Creates a new payment on the vendor account and assigns the payment to the invoice.
{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json;charset=UTF-8");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments" {:body "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"})
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
headers = HTTP::Headers{
"content-type" => "application/json;charset=UTF-8"
}
reqBody = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
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}}/accounting/providers/invoices/:invoiceId/payments"),
Content = new StringContent("/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("text/plain")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json;charset=UTF-8");
request.AddParameter("application/json;charset=UTF-8", "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
payload := strings.NewReader("/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/accounting/providers/invoices/:invoiceId/payments HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: example.com
Content-Length: 86
/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.setHeader("content-type", "application/json;charset=UTF-8")
.setBody("/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"))
.header("content-type", "application/json;charset=UTF-8")
.method("POST", HttpRequest.BodyPublishers.ofString("/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.header("content-type", "application/json;charset=UTF-8")
.body("/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody")
.asString();
const data = '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
xhr.setRequestHeader('content-type', 'application/json;charset=UTF-8');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
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}}/accounting/providers/invoices/:invoiceId/payments',
method: 'POST',
headers: {
'content-type': 'application/json;charset=UTF-8'
},
data: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("text/plain")
val body = RequestBody.create(mediaType, "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody")
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.post(body)
.addHeader("content-type", "application/json;charset=UTF-8")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId/payments',
headers: {
'content-type': 'application/json;charset=UTF-8'
}
};
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('/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
req.headers({
'content-type': 'application/json;charset=UTF-8'
});
req.send('/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody');
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}}/accounting/providers/invoices/:invoiceId/payments',
headers: {'content-type': 'application/json;charset=UTF-8'},
data: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json;charset=UTF-8'},
body: '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
};
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;charset=UTF-8" };
NSData *postData = [[NSData alloc] initWithData:[@"/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"]
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}}/accounting/providers/invoices/:invoiceId/payments" in
let headers = Header.add (Header.init ()) "content-type" "application/json;charset=UTF-8" in
let body = Cohttp_lwt_body.of_string "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody",
CURLOPT_HTTPHEADER => [
"content-type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments', [
'body' => '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody',
'headers' => [
'content-type' => 'application/json;charset=UTF-8',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$request->setBody('/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody');
$request->setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json;charset=UTF-8'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
$headers=@{}
$headers.Add("content-type", "application/json;charset=UTF-8")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments' -Method POST -Headers $headers -ContentType 'application/json;charset=UTF-8' -Body '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
headers = { 'content-type': "application/json;charset=UTF-8" }
conn.request("POST", "/baseUrl/accounting/providers/invoices/:invoiceId/payments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
payload = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
headers = {"content-type": "application/json;charset=UTF-8"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
payload <- "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
encode <- "raw"
response <- VERB("POST", url, body = payload, content_type("text/plain"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json;charset=UTF-8'
request.body = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json;charset=UTF-8'}
)
response = conn.post('/baseUrl/accounting/providers/invoices/:invoiceId/payments') do |req|
req.body = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments";
let payload = "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json;charset=UTF-8".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounting/providers/invoices/:invoiceId/payments \
--header 'content-type: application/json;charset=UTF-8' \
--data '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody'
echo '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody' | \
http POST {{baseUrl}}/accounting/providers/invoices/:invoiceId/payments \
content-type:'application/json;charset=UTF-8'
wget --quiet \
--method POST \
--header 'content-type: application/json;charset=UTF-8' \
--body-data '/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody' \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId/payments
import Foundation
let headers = ["content-type": "application/json;charset=UTF-8"]
let postData = NSData(data: "/home-api/assets/examples/accounting/providers/invoices/createPayment.json#requestBody".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Generates provider invoice document (PDF).
{{baseUrl}}/accounting/providers/invoices/:invoiceId/document
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document"
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}}/accounting/providers/invoices/:invoiceId/document"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId/document");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document"
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/accounting/providers/invoices/:invoiceId/document HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId/document"))
.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}}/accounting/providers/invoices/:invoiceId/document")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")
.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}}/accounting/providers/invoices/:invoiceId/document');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document';
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}}/accounting/providers/invoices/:invoiceId/document',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId/document',
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}}/accounting/providers/invoices/:invoiceId/document'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document');
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}}/accounting/providers/invoices/:invoiceId/document'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document';
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}}/accounting/providers/invoices/:invoiceId/document"]
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}}/accounting/providers/invoices/:invoiceId/document" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId/document",
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}}/accounting/providers/invoices/:invoiceId/document');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/document');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/document');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/document' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/providers/invoices/:invoiceId/document")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")
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/accounting/providers/invoices/:invoiceId/document') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document";
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}}/accounting/providers/invoices/:invoiceId/document
http GET {{baseUrl}}/accounting/providers/invoices/:invoiceId/document
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId/document
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId/document")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/getDocument.json#responseBody
GET
Lists all vendor invoices in all statuses (including not ready and drafts) that have been updated since a specific date.
{{baseUrl}}/accounting/providers/invoices
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/providers/invoices")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounting/providers/invoices"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounting/providers/invoices HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/providers/invoices")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/providers/invoices")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/accounting/providers/invoices');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounting/providers/invoices',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/providers/invoices');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounting/providers/invoices"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounting/providers/invoices" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounting/providers/invoices');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/providers/invoices")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounting/providers/invoices') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounting/providers/invoices
http GET {{baseUrl}}/accounting/providers/invoices
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/providers/invoices
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/getAll.json#responseBody
DELETE
Removes a provider invoice.
{{baseUrl}}/accounting/providers/invoices/:invoiceId
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounting/providers/invoices/:invoiceId")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
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}}/accounting/providers/invoices/:invoiceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
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/accounting/providers/invoices/:invoiceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId"))
.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}}/accounting/providers/invoices/:invoiceId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.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}}/accounting/providers/invoices/:invoiceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId';
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}}/accounting/providers/invoices/:invoiceId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId',
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}}/accounting/providers/invoices/:invoiceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounting/providers/invoices/:invoiceId');
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}}/accounting/providers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId';
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}}/accounting/providers/invoices/:invoiceId"]
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}}/accounting/providers/invoices/:invoiceId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId",
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}}/accounting/providers/invoices/:invoiceId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/accounting/providers/invoices/:invoiceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
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/accounting/providers/invoices/:invoiceId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId";
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}}/accounting/providers/invoices/:invoiceId
http DELETE {{baseUrl}}/accounting/providers/invoices/:invoiceId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a provider payment.
{{baseUrl}}/accounting/providers/payments/:paymentId
QUERY PARAMS
paymentId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/payments/:paymentId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounting/providers/payments/:paymentId")
require "http/client"
url = "{{baseUrl}}/accounting/providers/payments/:paymentId"
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}}/accounting/providers/payments/:paymentId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/payments/:paymentId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/payments/:paymentId"
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/accounting/providers/payments/:paymentId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounting/providers/payments/:paymentId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/payments/:paymentId"))
.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}}/accounting/providers/payments/:paymentId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounting/providers/payments/:paymentId")
.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}}/accounting/providers/payments/:paymentId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounting/providers/payments/:paymentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/payments/:paymentId';
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}}/accounting/providers/payments/:paymentId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/payments/:paymentId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/payments/:paymentId',
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}}/accounting/providers/payments/:paymentId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounting/providers/payments/:paymentId');
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}}/accounting/providers/payments/:paymentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/payments/:paymentId';
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}}/accounting/providers/payments/:paymentId"]
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}}/accounting/providers/payments/:paymentId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/payments/:paymentId",
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}}/accounting/providers/payments/:paymentId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/payments/:paymentId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/payments/:paymentId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/payments/:paymentId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/payments/:paymentId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/accounting/providers/payments/:paymentId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/payments/:paymentId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/payments/:paymentId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/payments/:paymentId")
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/accounting/providers/payments/:paymentId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/payments/:paymentId";
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}}/accounting/providers/payments/:paymentId
http DELETE {{baseUrl}}/accounting/providers/payments/:paymentId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/accounting/providers/payments/:paymentId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/payments/:paymentId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns all payments for the vendor invoice.
{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId/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/accounting/providers/invoices/:invoiceId/payments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/providers/invoices/:invoiceId/payments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId/payments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId/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/accounting/providers/invoices/:invoiceId/payments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/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}}/accounting/providers/invoices/:invoiceId/payments
http GET {{baseUrl}}/accounting/providers/invoices/:invoiceId/payments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId/payments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId/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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/getPayments.json#responseBody
GET
Returns provider invoice details.
{{baseUrl}}/accounting/providers/invoices/:invoiceId
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/providers/invoices/:invoiceId")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
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}}/accounting/providers/invoices/:invoiceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
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/accounting/providers/invoices/:invoiceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId"))
.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}}/accounting/providers/invoices/:invoiceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.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}}/accounting/providers/invoices/:invoiceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId';
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}}/accounting/providers/invoices/:invoiceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId',
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}}/accounting/providers/invoices/:invoiceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/providers/invoices/:invoiceId');
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}}/accounting/providers/invoices/:invoiceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId';
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}}/accounting/providers/invoices/:invoiceId"]
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}}/accounting/providers/invoices/:invoiceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId",
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}}/accounting/providers/invoices/:invoiceId');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/providers/invoices/:invoiceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId")
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/accounting/providers/invoices/:invoiceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId";
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}}/accounting/providers/invoices/:invoiceId
http GET {{baseUrl}}/accounting/providers/invoices/:invoiceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/getById.json#responseBody
GET
Returns vendor invoices' internal identifiers.
{{baseUrl}}/accounting/providers/invoices/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounting/providers/invoices/ids")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/ids"
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}}/accounting/providers/invoices/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/ids"
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/accounting/providers/invoices/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounting/providers/invoices/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/ids"))
.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}}/accounting/providers/invoices/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounting/providers/invoices/ids")
.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}}/accounting/providers/invoices/ids');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounting/providers/invoices/ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/ids';
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}}/accounting/providers/invoices/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/ids',
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}}/accounting/providers/invoices/ids'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounting/providers/invoices/ids');
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}}/accounting/providers/invoices/ids'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/ids';
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}}/accounting/providers/invoices/ids"]
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}}/accounting/providers/invoices/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/ids",
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}}/accounting/providers/invoices/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accounting/providers/invoices/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/ids")
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/accounting/providers/invoices/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/ids";
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}}/accounting/providers/invoices/ids
http GET {{baseUrl}}/accounting/providers/invoices/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/accounting/providers/invoices/getIds.json#responseBody
POST
Sends a provider invoice.
{{baseUrl}}/accounting/providers/invoices/:invoiceId/send
QUERY PARAMS
invoiceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")
require "http/client"
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send"
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}}/accounting/providers/invoices/:invoiceId/send"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounting/providers/invoices/:invoiceId/send");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send"
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/accounting/providers/invoices/:invoiceId/send HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounting/providers/invoices/:invoiceId/send"))
.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}}/accounting/providers/invoices/:invoiceId/send")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")
.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}}/accounting/providers/invoices/:invoiceId/send');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send';
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}}/accounting/providers/invoices/:invoiceId/send',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounting/providers/invoices/:invoiceId/send',
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}}/accounting/providers/invoices/:invoiceId/send'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send';
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}}/accounting/providers/invoices/:invoiceId/send"]
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}}/accounting/providers/invoices/:invoiceId/send" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounting/providers/invoices/:invoiceId/send",
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}}/accounting/providers/invoices/:invoiceId/send');
echo $response->getBody();
setUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/send');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounting/providers/invoices/:invoiceId/send');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounting/providers/invoices/:invoiceId/send' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/accounting/providers/invoices/:invoiceId/send")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")
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/accounting/providers/invoices/:invoiceId/send') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send";
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}}/accounting/providers/invoices/:invoiceId/send
http POST {{baseUrl}}/accounting/providers/invoices/:invoiceId/send
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/accounting/providers/invoices/:invoiceId/send
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounting/providers/invoices/:invoiceId/send")! 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()
DELETE
Removes a person. (DELETE)
{{baseUrl}}/providers/persons/:personId
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/:personId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/providers/persons/:personId")
require "http/client"
url = "{{baseUrl}}/providers/persons/:personId"
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}}/providers/persons/:personId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/:personId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/:personId"
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/providers/persons/:personId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/providers/persons/:personId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/:personId"))
.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}}/providers/persons/:personId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/providers/persons/:personId")
.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}}/providers/persons/:personId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/providers/persons/:personId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/:personId';
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}}/providers/persons/:personId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/:personId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/:personId',
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}}/providers/persons/:personId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/providers/persons/:personId');
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}}/providers/persons/:personId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/:personId';
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}}/providers/persons/:personId"]
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}}/providers/persons/:personId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/:personId",
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}}/providers/persons/:personId');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/:personId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/:personId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/:personId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/:personId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/providers/persons/:personId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/:personId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/:personId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/:personId")
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/providers/persons/:personId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/:personId";
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}}/providers/persons/:personId
http DELETE {{baseUrl}}/providers/persons/:personId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/providers/persons/:personId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/:personId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a provider price list.
{{baseUrl}}/providers/priceLists/:priceListId
QUERY PARAMS
priceListId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/priceLists/:priceListId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/providers/priceLists/:priceListId")
require "http/client"
url = "{{baseUrl}}/providers/priceLists/:priceListId"
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}}/providers/priceLists/:priceListId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/priceLists/:priceListId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/priceLists/:priceListId"
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/providers/priceLists/:priceListId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/providers/priceLists/:priceListId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/priceLists/:priceListId"))
.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}}/providers/priceLists/:priceListId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/providers/priceLists/:priceListId")
.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}}/providers/priceLists/:priceListId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/providers/priceLists/:priceListId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/priceLists/:priceListId';
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}}/providers/priceLists/:priceListId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/priceLists/:priceListId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/priceLists/:priceListId',
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}}/providers/priceLists/:priceListId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/providers/priceLists/:priceListId');
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}}/providers/priceLists/:priceListId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/priceLists/:priceListId';
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}}/providers/priceLists/:priceListId"]
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}}/providers/priceLists/:priceListId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/priceLists/:priceListId",
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}}/providers/priceLists/:priceListId');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/priceLists/:priceListId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/priceLists/:priceListId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/priceLists/:priceListId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/priceLists/:priceListId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/providers/priceLists/:priceListId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/priceLists/:priceListId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/priceLists/:priceListId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/priceLists/:priceListId")
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/providers/priceLists/:priceListId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/priceLists/:priceListId";
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}}/providers/priceLists/:priceListId
http DELETE {{baseUrl}}/providers/priceLists/:priceListId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/providers/priceLists/:priceListId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/priceLists/:priceListId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Removes a provider.
{{baseUrl}}/providers/:providerId
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/providers/:providerId")
require "http/client"
url = "{{baseUrl}}/providers/:providerId"
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}}/providers/:providerId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId"
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/providers/:providerId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/providers/:providerId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId"))
.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}}/providers/:providerId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/providers/:providerId")
.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}}/providers/:providerId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/providers/:providerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId';
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}}/providers/:providerId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId',
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}}/providers/:providerId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/providers/:providerId');
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}}/providers/:providerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId';
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}}/providers/:providerId"]
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}}/providers/:providerId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId",
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}}/providers/:providerId');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/providers/:providerId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId")
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/providers/:providerId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId";
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}}/providers/:providerId
http DELETE {{baseUrl}}/providers/:providerId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/providers/:providerId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns address of a given provider.
{{baseUrl}}/providers/:providerId/address
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/address");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId/address")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/address"
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}}/providers/:providerId/address"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/address");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/address"
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/providers/:providerId/address HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId/address")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/address"))
.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}}/providers/:providerId/address")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId/address")
.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}}/providers/:providerId/address');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/:providerId/address'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/address';
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}}/providers/:providerId/address',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/address")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/address',
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}}/providers/:providerId/address'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId/address');
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}}/providers/:providerId/address'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/address';
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}}/providers/:providerId/address"]
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}}/providers/:providerId/address" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/address",
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}}/providers/:providerId/address');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/address');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/address');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/address' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/address' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId/address")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/address"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/address"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/address")
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/providers/:providerId/address') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/address";
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}}/providers/:providerId/address
http GET {{baseUrl}}/providers/:providerId/address
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId/address
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/address")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/address/getAddress.json#responseBody
GET
Returns competencies of a given provider.
{{baseUrl}}/providers/:providerId/competencies
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/competencies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId/competencies")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/competencies"
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}}/providers/:providerId/competencies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/competencies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/competencies"
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/providers/:providerId/competencies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId/competencies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/competencies"))
.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}}/providers/:providerId/competencies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId/competencies")
.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}}/providers/:providerId/competencies');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/:providerId/competencies'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/competencies';
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}}/providers/:providerId/competencies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/competencies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/competencies',
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}}/providers/:providerId/competencies'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId/competencies');
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}}/providers/:providerId/competencies'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/competencies';
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}}/providers/:providerId/competencies"]
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}}/providers/:providerId/competencies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/competencies",
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}}/providers/:providerId/competencies');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/competencies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/competencies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/competencies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/competencies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId/competencies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/competencies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/competencies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/competencies")
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/providers/:providerId/competencies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/competencies";
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}}/providers/:providerId/competencies
http GET {{baseUrl}}/providers/:providerId/competencies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId/competencies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/competencies")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/getCompetencies.json#responseBody
GET
Returns contact of a given person. (GET)
{{baseUrl}}/providers/persons/:personId/contact
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/:personId/contact");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/persons/:personId/contact")
require "http/client"
url = "{{baseUrl}}/providers/persons/:personId/contact"
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}}/providers/persons/:personId/contact"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/:personId/contact");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/:personId/contact"
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/providers/persons/:personId/contact HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/persons/:personId/contact")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/:personId/contact"))
.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}}/providers/persons/:personId/contact")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/persons/:personId/contact")
.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}}/providers/persons/:personId/contact');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/:personId/contact';
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}}/providers/persons/:personId/contact',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/:personId/contact")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/:personId/contact',
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}}/providers/persons/:personId/contact'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/persons/:personId/contact');
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}}/providers/persons/:personId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/:personId/contact';
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}}/providers/persons/:personId/contact"]
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}}/providers/persons/:personId/contact" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/:personId/contact",
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}}/providers/persons/:personId/contact');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/:personId/contact');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/:personId/contact');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/:personId/contact' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/:personId/contact' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/persons/:personId/contact")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/:personId/contact"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/:personId/contact"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/:personId/contact")
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/providers/persons/:personId/contact') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/:personId/contact";
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}}/providers/persons/:personId/contact
http GET {{baseUrl}}/providers/persons/:personId/contact
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/persons/:personId/contact
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/:personId/contact")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/persons/getContact.json#responseBody
GET
Returns contact of a given provider.
{{baseUrl}}/providers/:providerId/contact
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/contact");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId/contact")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/contact"
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}}/providers/:providerId/contact"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/contact");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/contact"
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/providers/:providerId/contact HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId/contact")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/contact"))
.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}}/providers/:providerId/contact")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId/contact")
.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}}/providers/:providerId/contact');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/:providerId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/contact';
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}}/providers/:providerId/contact',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/contact")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/contact',
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}}/providers/:providerId/contact'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId/contact');
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}}/providers/:providerId/contact'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/contact';
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}}/providers/:providerId/contact"]
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}}/providers/:providerId/contact" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/contact",
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}}/providers/:providerId/contact');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/contact');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/contact');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/contact' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/contact' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId/contact")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/contact"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/contact"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/contact")
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/providers/:providerId/contact') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/contact";
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}}/providers/:providerId/contact
http GET {{baseUrl}}/providers/:providerId/contact
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId/contact
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/contact")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/getContact.json#responseBody
GET
Returns correspondence address of a given provider.
{{baseUrl}}/providers/:providerId/correspondenceAddress
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/correspondenceAddress");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId/correspondenceAddress")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/correspondenceAddress"
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}}/providers/:providerId/correspondenceAddress"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/correspondenceAddress");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/correspondenceAddress"
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/providers/:providerId/correspondenceAddress HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId/correspondenceAddress")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/correspondenceAddress"))
.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}}/providers/:providerId/correspondenceAddress")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId/correspondenceAddress")
.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}}/providers/:providerId/correspondenceAddress');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/:providerId/correspondenceAddress'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/correspondenceAddress';
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}}/providers/:providerId/correspondenceAddress',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/correspondenceAddress")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/correspondenceAddress',
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}}/providers/:providerId/correspondenceAddress'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId/correspondenceAddress');
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}}/providers/:providerId/correspondenceAddress'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/correspondenceAddress';
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}}/providers/:providerId/correspondenceAddress"]
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}}/providers/:providerId/correspondenceAddress" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/correspondenceAddress",
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}}/providers/:providerId/correspondenceAddress');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/correspondenceAddress');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/correspondenceAddress');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/correspondenceAddress' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/correspondenceAddress' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId/correspondenceAddress")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/correspondenceAddress"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/correspondenceAddress"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/correspondenceAddress")
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/providers/:providerId/correspondenceAddress') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/correspondenceAddress";
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}}/providers/:providerId/correspondenceAddress
http GET {{baseUrl}}/providers/:providerId/correspondenceAddress
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId/correspondenceAddress
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/correspondenceAddress")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/address/getCorrespondenceAddress.json#responseBody
GET
Returns custom fields of a given person. (GET)
{{baseUrl}}/providers/persons/:personId/customFields
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/:personId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/persons/:personId/customFields")
require "http/client"
url = "{{baseUrl}}/providers/persons/:personId/customFields"
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}}/providers/persons/:personId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/:personId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/:personId/customFields"
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/providers/persons/:personId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/persons/:personId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/:personId/customFields"))
.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}}/providers/persons/:personId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/persons/:personId/customFields")
.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}}/providers/persons/:personId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/:personId/customFields';
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}}/providers/persons/:personId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/:personId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/:personId/customFields',
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}}/providers/persons/:personId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/persons/:personId/customFields');
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}}/providers/persons/:personId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/:personId/customFields';
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}}/providers/persons/:personId/customFields"]
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}}/providers/persons/:personId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/:personId/customFields",
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}}/providers/persons/:personId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/:personId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/:personId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/:personId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/:personId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/persons/:personId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/:personId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/:personId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/:personId/customFields")
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/providers/persons/:personId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/:personId/customFields";
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}}/providers/persons/:personId/customFields
http GET {{baseUrl}}/providers/persons/:personId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/persons/:personId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/:personId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/persons/getCustomFields.json#responseBody
GET
Returns custom fields of a given provider.
{{baseUrl}}/providers/:providerId/customFields
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/customFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId/customFields")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/customFields"
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}}/providers/:providerId/customFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/customFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/customFields"
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/providers/:providerId/customFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId/customFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/customFields"))
.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}}/providers/:providerId/customFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId/customFields")
.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}}/providers/:providerId/customFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/providers/:providerId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/customFields';
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}}/providers/:providerId/customFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/customFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/customFields',
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}}/providers/:providerId/customFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId/customFields');
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}}/providers/:providerId/customFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/customFields';
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}}/providers/:providerId/customFields"]
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}}/providers/:providerId/customFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/customFields",
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}}/providers/:providerId/customFields');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/customFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/customFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/customFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/customFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId/customFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/customFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/customFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/customFields")
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/providers/:providerId/customFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/customFields";
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}}/providers/:providerId/customFields
http GET {{baseUrl}}/providers/:providerId/customFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId/customFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/customFields")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/getCustomFields.json#responseBody
GET
Returns person details. (GET)
{{baseUrl}}/providers/persons/:personId
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/:personId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/persons/:personId")
require "http/client"
url = "{{baseUrl}}/providers/persons/:personId"
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}}/providers/persons/:personId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/:personId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/:personId"
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/providers/persons/:personId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/persons/:personId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/:personId"))
.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}}/providers/persons/:personId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/persons/:personId")
.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}}/providers/persons/:personId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/providers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/:personId';
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}}/providers/persons/:personId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/:personId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/:personId',
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}}/providers/persons/:personId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/persons/:personId');
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}}/providers/persons/:personId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/:personId';
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}}/providers/persons/:personId"]
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}}/providers/persons/:personId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/:personId",
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}}/providers/persons/:personId');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/:personId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/:personId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/:personId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/:personId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/persons/:personId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/:personId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/:personId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/:personId")
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/providers/persons/:personId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/:personId";
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}}/providers/persons/:personId
http GET {{baseUrl}}/providers/persons/:personId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/persons/:personId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/:personId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/persons/getById.json#responseBody
GET
Returns persons' internal identifiers. (GET)
{{baseUrl}}/providers/persons/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/persons/ids")
require "http/client"
url = "{{baseUrl}}/providers/persons/ids"
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}}/providers/persons/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/ids"
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/providers/persons/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/persons/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/ids"))
.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}}/providers/persons/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/persons/ids")
.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}}/providers/persons/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/providers/persons/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/ids';
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}}/providers/persons/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/ids',
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}}/providers/persons/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/persons/ids');
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}}/providers/persons/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/ids';
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}}/providers/persons/ids"]
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}}/providers/persons/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/ids",
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}}/providers/persons/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/persons/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/ids")
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/providers/persons/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/ids";
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}}/providers/persons/ids
http GET {{baseUrl}}/providers/persons/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/persons/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/persons/getIds.json#responseBody
GET
Returns provider details.
{{baseUrl}}/providers/:providerId
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/:providerId")
require "http/client"
url = "{{baseUrl}}/providers/:providerId"
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}}/providers/:providerId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId"
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/providers/:providerId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/:providerId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId"))
.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}}/providers/:providerId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/:providerId")
.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}}/providers/:providerId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/providers/:providerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId';
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}}/providers/:providerId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId',
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}}/providers/:providerId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/:providerId');
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}}/providers/:providerId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId';
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}}/providers/:providerId"]
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}}/providers/:providerId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId",
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}}/providers/:providerId');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/:providerId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId")
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/providers/:providerId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId";
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}}/providers/:providerId
http GET {{baseUrl}}/providers/:providerId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/:providerId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/getById.json#responseBody
GET
Returns providers' internal identifiers.
{{baseUrl}}/providers/ids
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/ids");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/providers/ids")
require "http/client"
url = "{{baseUrl}}/providers/ids"
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}}/providers/ids"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/ids");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/ids"
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/providers/ids HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/providers/ids")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/ids"))
.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}}/providers/ids")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/providers/ids")
.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}}/providers/ids');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/providers/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/ids';
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}}/providers/ids',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/ids")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/ids',
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}}/providers/ids'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/providers/ids');
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}}/providers/ids'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/ids';
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}}/providers/ids"]
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}}/providers/ids" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/ids",
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}}/providers/ids');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/ids');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/ids');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/ids' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/ids' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/providers/ids")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/ids"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/ids"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/ids")
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/providers/ids') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/ids";
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}}/providers/ids
http GET {{baseUrl}}/providers/ids
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/providers/ids
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/ids")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/getIds.json#responseBody
POST
Sends invitation to Vendor Portal.
{{baseUrl}}/providers/persons/:personId/notification/invitation
QUERY PARAMS
personId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/persons/:personId/notification/invitation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/providers/persons/:personId/notification/invitation")
require "http/client"
url = "{{baseUrl}}/providers/persons/:personId/notification/invitation"
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}}/providers/persons/:personId/notification/invitation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/persons/:personId/notification/invitation");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/persons/:personId/notification/invitation"
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/providers/persons/:personId/notification/invitation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/providers/persons/:personId/notification/invitation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/persons/:personId/notification/invitation"))
.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}}/providers/persons/:personId/notification/invitation")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/providers/persons/:personId/notification/invitation")
.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}}/providers/persons/:personId/notification/invitation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/providers/persons/:personId/notification/invitation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/persons/:personId/notification/invitation';
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}}/providers/persons/:personId/notification/invitation',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/persons/:personId/notification/invitation")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/persons/:personId/notification/invitation',
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}}/providers/persons/:personId/notification/invitation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/providers/persons/:personId/notification/invitation');
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}}/providers/persons/:personId/notification/invitation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/persons/:personId/notification/invitation';
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}}/providers/persons/:personId/notification/invitation"]
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}}/providers/persons/:personId/notification/invitation" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/persons/:personId/notification/invitation",
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}}/providers/persons/:personId/notification/invitation');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/persons/:personId/notification/invitation');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/persons/:personId/notification/invitation');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/persons/:personId/notification/invitation' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/persons/:personId/notification/invitation' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/providers/persons/:personId/notification/invitation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/persons/:personId/notification/invitation"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/persons/:personId/notification/invitation"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/persons/:personId/notification/invitation")
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/providers/persons/:personId/notification/invitation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/persons/:personId/notification/invitation";
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}}/providers/persons/:personId/notification/invitation
http POST {{baseUrl}}/providers/persons/:personId/notification/invitation
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/providers/persons/:personId/notification/invitation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/persons/:personId/notification/invitation")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/persons/sendInvitations.json#responseBody
POST
Sends invitations to Vendor Portal.
{{baseUrl}}/providers/:providerId/notification/invitation
QUERY PARAMS
providerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/providers/:providerId/notification/invitation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/providers/:providerId/notification/invitation")
require "http/client"
url = "{{baseUrl}}/providers/:providerId/notification/invitation"
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}}/providers/:providerId/notification/invitation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/providers/:providerId/notification/invitation");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/providers/:providerId/notification/invitation"
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/providers/:providerId/notification/invitation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/providers/:providerId/notification/invitation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/providers/:providerId/notification/invitation"))
.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}}/providers/:providerId/notification/invitation")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/providers/:providerId/notification/invitation")
.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}}/providers/:providerId/notification/invitation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/providers/:providerId/notification/invitation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/providers/:providerId/notification/invitation';
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}}/providers/:providerId/notification/invitation',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/providers/:providerId/notification/invitation")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/providers/:providerId/notification/invitation',
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}}/providers/:providerId/notification/invitation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/providers/:providerId/notification/invitation');
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}}/providers/:providerId/notification/invitation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/providers/:providerId/notification/invitation';
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}}/providers/:providerId/notification/invitation"]
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}}/providers/:providerId/notification/invitation" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/providers/:providerId/notification/invitation",
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}}/providers/:providerId/notification/invitation');
echo $response->getBody();
setUrl('{{baseUrl}}/providers/:providerId/notification/invitation');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/providers/:providerId/notification/invitation');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/providers/:providerId/notification/invitation' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/providers/:providerId/notification/invitation' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/providers/:providerId/notification/invitation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/providers/:providerId/notification/invitation"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/providers/:providerId/notification/invitation"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/providers/:providerId/notification/invitation")
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/providers/:providerId/notification/invitation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/providers/:providerId/notification/invitation";
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}}/providers/:providerId/notification/invitation
http POST {{baseUrl}}/providers/:providerId/notification/invitation
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/providers/:providerId/notification/invitation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/providers/:providerId/notification/invitation")! 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/vnd.xtrf-v1+json;charset=UTF-8
RESPONSE BODY text
/home-api/assets/examples/providers/sendInvitations.json#responseBody