GSMTasks Project API
POST
account_roles_activate_create
{{baseUrl}}/account_roles/:id/activate/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/activate/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/account_roles/:id/activate/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:token ""}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/activate/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"token\": \"\"\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}}/account_roles/:id/activate/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"token\": \"\"\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}}/account_roles/:id/activate/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/activate/"
payload := strings.NewReader("{\n \"token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/account_roles/:id/activate/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/account_roles/:id/activate/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/activate/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"token\": \"\"\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 \"token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/account_roles/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/account_roles/:id/activate/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"token\": \"\"\n}")
.asString();
const data = JSON.stringify({
token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/account_roles/:id/activate/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/account_roles/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/activate/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/account_roles/:id/activate/',
headers: {
authorization: '{{apiKey}}',
'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({token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/account_roles/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {token: ''},
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}}/account_roles/:id/activate/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
token: ''
});
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}}/account_roles/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/activate/"]
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}}/account_roles/:id/activate/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/activate/",
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([
'token' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/account_roles/:id/activate/', [
'body' => '{
"token": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/activate/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/account_roles/:id/activate/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"token": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"token\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/account_roles/:id/activate/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/activate/"
payload = { "token": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/activate/"
payload <- "{\n \"token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/activate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"token\": \"\"\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/account_roles/:id/activate/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/:id/activate/";
let payload = json!({"token": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/account_roles/:id/activate/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"token": ""
}'
echo '{
"token": ""
}' | \
http POST {{baseUrl}}/account_roles/:id/activate/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "token": ""\n}' \
--output-document \
- {{baseUrl}}/account_roles/:id/activate/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["token": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/activate/")! 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
account_roles_create
{{baseUrl}}/account_roles/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/account_roles/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:deleted_at ""
:display_name ""
:email ""
:id ""
:is_active false
:is_integration false
:is_manager false
:is_on_duty false
:is_worker false
:last_time_location ""
:phone ""
:route_end_address ""
:route_start_address ""
:show_unassigned false
:signature_image ""
:state ""
:updated_at ""
:url ""
:user ""
:vehicle_capacity []
:vehicle_profile ""
:vehicle_registration_number ""
:vehicle_service_time_factor ""
:vehicle_speed_factor ""}})
require "http/client"
url = "{{baseUrl}}/account_roles/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/account_roles/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 616
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/account_roles/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/account_roles/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/account_roles/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/account_roles/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/account_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/account_roles/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/account_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
},
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}}/account_roles/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
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}}/account_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"deleted_at": @"",
@"display_name": @"",
@"email": @"",
@"id": @"",
@"is_active": @NO,
@"is_integration": @NO,
@"is_manager": @NO,
@"is_on_duty": @NO,
@"is_worker": @NO,
@"last_time_location": @"",
@"phone": @"",
@"route_end_address": @"",
@"route_start_address": @"",
@"show_unassigned": @NO,
@"signature_image": @"",
@"state": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"",
@"vehicle_capacity": @[ ],
@"vehicle_profile": @"",
@"vehicle_registration_number": @"",
@"vehicle_service_time_factor": @"",
@"vehicle_speed_factor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/"]
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}}/account_roles/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/account_roles/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/account_roles/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/account_roles/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": False,
"is_integration": False,
"is_manager": False,
"is_on_duty": False,
"is_worker": False,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": False,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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/account_roles/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": (),
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/account_roles/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}' | \
http POST {{baseUrl}}/account_roles/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}' \
--output-document \
- {{baseUrl}}/account_roles/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/")! 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
account_roles_destroy
{{baseUrl}}/account_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/account_roles/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/account_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/account_roles/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/account_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/account_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/account_roles/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/account_roles/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/account_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/account_roles/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/account_roles/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/account_roles/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/account_roles/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/account_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/account_roles/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/account_roles/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/account_roles/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
account_roles_list
{{baseUrl}}/account_roles/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/account_roles/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/account_roles/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/account_roles/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/account_roles/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/account_roles/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/account_roles/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/"))
.header("authorization", "{{apiKey}}")
.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}}/account_roles/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/account_roles/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/account_roles/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/account_roles/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/account_roles/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/account_roles/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/account_roles/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/account_roles/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/account_roles/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/account_roles/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/account_roles/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/account_roles/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/account_roles/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/account_roles/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
account_roles_notify_create
{{baseUrl}}/account_roles/:id/notify/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/notify/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/account_roles/:id/notify/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/notify/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/account_roles/:id/notify/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/account_roles/:id/notify/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/notify/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/account_roles/:id/notify/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/account_roles/:id/notify/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/notify/"))
.header("authorization", "{{apiKey}}")
.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}}/account_roles/:id/notify/")
.post(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/account_roles/:id/notify/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/account_roles/:id/notify/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/account_roles/:id/notify/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/notify/';
const options = {method: 'POST', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/notify/',
method: 'POST',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/notify/")
.post(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/:id/notify/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/account_roles/:id/notify/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/account_roles/:id/notify/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/account_roles/:id/notify/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/notify/';
const options = {method: 'POST', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/notify/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/notify/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/notify/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/account_roles/:id/notify/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/notify/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/account_roles/:id/notify/');
$request->setRequestMethod('POST');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/notify/' -Method POST -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/notify/' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("POST", "/baseUrl/account_roles/:id/notify/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/notify/"
headers = {"authorization": "{{apiKey}}"}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/notify/"
response <- VERB("POST", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/notify/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/account_roles/:id/notify/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/:id/notify/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/account_roles/:id/notify/ \
--header 'authorization: {{apiKey}}'
http POST {{baseUrl}}/account_roles/:id/notify/ \
authorization:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/account_roles/:id/notify/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/notify/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
account_roles_partial_update
{{baseUrl}}/account_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/account_roles/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:deleted_at ""
:display_name ""
:email ""
:id ""
:is_active false
:is_integration false
:is_manager false
:is_on_duty false
:is_worker false
:last_time_location ""
:phone ""
:route_end_address ""
:route_start_address ""
:show_unassigned false
:signature_image ""
:state ""
:updated_at ""
:url ""
:user ""
:vehicle_capacity []
:vehicle_profile ""
:vehicle_registration_number ""
:vehicle_service_time_factor ""
:vehicle_speed_factor ""}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/account_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/account_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 616
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/account_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/account_roles/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/account_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/account_roles/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"deleted_at": @"",
@"display_name": @"",
@"email": @"",
@"id": @"",
@"is_active": @NO,
@"is_integration": @NO,
@"is_manager": @NO,
@"is_on_duty": @NO,
@"is_worker": @NO,
@"last_time_location": @"",
@"phone": @"",
@"route_end_address": @"",
@"route_start_address": @"",
@"show_unassigned": @NO,
@"signature_image": @"",
@"state": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"",
@"vehicle_capacity": @[ ],
@"vehicle_profile": @"",
@"vehicle_registration_number": @"",
@"vehicle_service_time_factor": @"",
@"vehicle_speed_factor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/account_roles/:id/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/account_roles/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/account_roles/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": False,
"is_integration": False,
"is_manager": False,
"is_on_duty": False,
"is_worker": False,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": False,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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.patch('/baseUrl/account_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/:id/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": (),
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/account_roles/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}' | \
http PATCH {{baseUrl}}/account_roles/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}' \
--output-document \
- {{baseUrl}}/account_roles/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
account_roles_retrieve
{{baseUrl}}/account_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/account_roles/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/account_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/account_roles/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/account_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/account_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/account_roles/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/account_roles/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/account_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/account_roles/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/account_roles/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/account_roles/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/account_roles/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/account_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/account_roles/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/account_roles/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/account_roles/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
account_roles_token_retrieve
{{baseUrl}}/account_roles/:id/token/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/token/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/account_roles/:id/token/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/token/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/account_roles/:id/token/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/account_roles/:id/token/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/token/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/account_roles/:id/token/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/account_roles/:id/token/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/token/"))
.header("authorization", "{{apiKey}}")
.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}}/account_roles/:id/token/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/account_roles/:id/token/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/account_roles/:id/token/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/account_roles/:id/token/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/token/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/token/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/token/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/account_roles/:id/token/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/account_roles/:id/token/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/account_roles/:id/token/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/account_roles/:id/token/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/token/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/token/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/token/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/token/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/account_roles/:id/token/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/token/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/account_roles/:id/token/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/token/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/token/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/account_roles/:id/token/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/token/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/token/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/account_roles/:id/token/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/account_roles/:id/token/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/account_roles/:id/token/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/account_roles/:id/token/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/account_roles/:id/token/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/token/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
account_roles_update
{{baseUrl}}/account_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/account_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/account_roles/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:deleted_at ""
:display_name ""
:email ""
:id ""
:is_active false
:is_integration false
:is_manager false
:is_on_duty false
:is_worker false
:last_time_location ""
:phone ""
:route_end_address ""
:route_start_address ""
:show_unassigned false
:signature_image ""
:state ""
:updated_at ""
:url ""
:user ""
:vehicle_capacity []
:vehicle_profile ""
:vehicle_registration_number ""
:vehicle_service_time_factor ""
:vehicle_speed_factor ""}})
require "http/client"
url = "{{baseUrl}}/account_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/account_roles/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/account_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 616
{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/account_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/account_roles/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/account_roles/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/account_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/account_roles/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/account_roles/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/account_roles/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/account_roles/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
},
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}}/account_roles/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
});
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}}/account_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
deleted_at: '',
display_name: '',
email: '',
id: '',
is_active: false,
is_integration: false,
is_manager: false,
is_on_duty: false,
is_worker: false,
last_time_location: '',
phone: '',
route_end_address: '',
route_start_address: '',
show_unassigned: false,
signature_image: '',
state: '',
updated_at: '',
url: '',
user: '',
vehicle_capacity: [],
vehicle_profile: '',
vehicle_registration_number: '',
vehicle_service_time_factor: '',
vehicle_speed_factor: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/account_roles/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","deleted_at":"","display_name":"","email":"","id":"","is_active":false,"is_integration":false,"is_manager":false,"is_on_duty":false,"is_worker":false,"last_time_location":"","phone":"","route_end_address":"","route_start_address":"","show_unassigned":false,"signature_image":"","state":"","updated_at":"","url":"","user":"","vehicle_capacity":[],"vehicle_profile":"","vehicle_registration_number":"","vehicle_service_time_factor":"","vehicle_speed_factor":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"deleted_at": @"",
@"display_name": @"",
@"email": @"",
@"id": @"",
@"is_active": @NO,
@"is_integration": @NO,
@"is_manager": @NO,
@"is_on_duty": @NO,
@"is_worker": @NO,
@"last_time_location": @"",
@"phone": @"",
@"route_end_address": @"",
@"route_start_address": @"",
@"show_unassigned": @NO,
@"signature_image": @"",
@"state": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"",
@"vehicle_capacity": @[ ],
@"vehicle_profile": @"",
@"vehicle_registration_number": @"",
@"vehicle_service_time_factor": @"",
@"vehicle_speed_factor": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/account_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/account_roles/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/account_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/account_roles/:id/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/account_roles/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'deleted_at' => '',
'display_name' => '',
'email' => '',
'id' => '',
'is_active' => null,
'is_integration' => null,
'is_manager' => null,
'is_on_duty' => null,
'is_worker' => null,
'last_time_location' => '',
'phone' => '',
'route_end_address' => '',
'route_start_address' => '',
'show_unassigned' => null,
'signature_image' => '',
'state' => '',
'updated_at' => '',
'url' => '',
'user' => '',
'vehicle_capacity' => [
],
'vehicle_profile' => '',
'vehicle_registration_number' => '',
'vehicle_service_time_factor' => '',
'vehicle_speed_factor' => ''
]));
$request->setRequestUrl('{{baseUrl}}/account_roles/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/account_roles/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/account_roles/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/account_roles/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/account_roles/:id/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": False,
"is_integration": False,
"is_manager": False,
"is_on_duty": False,
"is_worker": False,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": False,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/account_roles/:id/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/account_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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/account_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"deleted_at\": \"\",\n \"display_name\": \"\",\n \"email\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_integration\": false,\n \"is_manager\": false,\n \"is_on_duty\": false,\n \"is_worker\": false,\n \"last_time_location\": \"\",\n \"phone\": \"\",\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"show_unassigned\": false,\n \"signature_image\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"vehicle_capacity\": [],\n \"vehicle_profile\": \"\",\n \"vehicle_registration_number\": \"\",\n \"vehicle_service_time_factor\": \"\",\n \"vehicle_speed_factor\": \"\"\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}}/account_roles/:id/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": (),
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/account_roles/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
}' | \
http PUT {{baseUrl}}/account_roles/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "deleted_at": "",\n "display_name": "",\n "email": "",\n "id": "",\n "is_active": false,\n "is_integration": false,\n "is_manager": false,\n "is_on_duty": false,\n "is_worker": false,\n "last_time_location": "",\n "phone": "",\n "route_end_address": "",\n "route_start_address": "",\n "show_unassigned": false,\n "signature_image": "",\n "state": "",\n "updated_at": "",\n "url": "",\n "user": "",\n "vehicle_capacity": [],\n "vehicle_profile": "",\n "vehicle_registration_number": "",\n "vehicle_service_time_factor": "",\n "vehicle_speed_factor": ""\n}' \
--output-document \
- {{baseUrl}}/account_roles/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"deleted_at": "",
"display_name": "",
"email": "",
"id": "",
"is_active": false,
"is_integration": false,
"is_manager": false,
"is_on_duty": false,
"is_worker": false,
"last_time_location": "",
"phone": "",
"route_end_address": "",
"route_start_address": "",
"show_unassigned": false,
"signature_image": "",
"state": "",
"updated_at": "",
"url": "",
"user": "",
"vehicle_capacity": [],
"vehicle_profile": "",
"vehicle_registration_number": "",
"vehicle_service_time_factor": "",
"vehicle_speed_factor": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/account_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_braintree_customer_retrieve
{{baseUrl}}/accounts/:id/braintree_customer/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/braintree_customer/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/braintree_customer/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/braintree_customer/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/braintree_customer/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/braintree_customer/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/braintree_customer/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/braintree_customer/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/braintree_customer/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/braintree_customer/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/braintree_customer/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/braintree_customer/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/braintree_customer/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/braintree_customer/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/braintree_customer/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/braintree_customer/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/braintree_customer/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/braintree_customer/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/braintree_customer/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/braintree_customer/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/braintree_customer/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/braintree_customer/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/braintree_customer/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/braintree_customer/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/braintree_customer/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/braintree_customer/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/braintree_customer/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/braintree_customer/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/braintree_customer/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/braintree_customer/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/braintree_customer/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/braintree_customer/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/braintree_customer/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/braintree_customer/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/braintree_customer/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/braintree_customer/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/braintree_customer/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/braintree_customer/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/braintree_customer/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/braintree_customer/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
accounts_change_owner_create
{{baseUrl}}/accounts/:id/change_owner/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"owner": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/change_owner/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"owner\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/:id/change_owner/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:owner ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/change_owner/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"owner\": \"\"\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}}/accounts/:id/change_owner/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"owner\": \"\"\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}}/accounts/:id/change_owner/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"owner\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/change_owner/"
payload := strings.NewReader("{\n \"owner\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/change_owner/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"owner": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/:id/change_owner/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"owner\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/change_owner/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"owner\": \"\"\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 \"owner\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/change_owner/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/:id/change_owner/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"owner\": \"\"\n}")
.asString();
const data = JSON.stringify({
owner: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounts/:id/change_owner/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/change_owner/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {owner: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/change_owner/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"owner":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/change_owner/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "owner": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"owner\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/change_owner/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/change_owner/',
headers: {
authorization: '{{apiKey}}',
'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({owner: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/change_owner/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {owner: ''},
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}}/accounts/:id/change_owner/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
owner: ''
});
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}}/accounts/:id/change_owner/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {owner: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/change_owner/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"owner":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"owner": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/change_owner/"]
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}}/accounts/:id/change_owner/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"owner\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/change_owner/",
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([
'owner' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/change_owner/', [
'body' => '{
"owner": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/change_owner/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'owner' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'owner' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/change_owner/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/change_owner/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"owner": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/change_owner/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"owner": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"owner\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/accounts/:id/change_owner/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/change_owner/"
payload = { "owner": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/change_owner/"
payload <- "{\n \"owner\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/change_owner/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"owner\": \"\"\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/accounts/:id/change_owner/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"owner\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/change_owner/";
let payload = json!({"owner": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/:id/change_owner/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"owner": ""
}'
echo '{
"owner": ""
}' | \
http POST {{baseUrl}}/accounts/:id/change_owner/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "owner": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/change_owner/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["owner": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/change_owner/")! 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
accounts_list
{{baseUrl}}/accounts/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
accounts_managers_create
{{baseUrl}}/accounts/:id/managers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/managers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/:id/managers/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:display_name ""
:email ""
:first_name ""
:id ""
:is_on_duty false
:last_name ""
:phone ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/managers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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}}/accounts/:id/managers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/managers/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/managers/"
payload := strings.NewReader("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/managers/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 141
{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/:id/managers/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/managers/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/managers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/:id/managers/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/managers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"display_name":"","email":"","first_name":"","id":"","is_on_duty":false,"last_name":"","phone":"","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}}/accounts/:id/managers/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "is_on_duty": false,\n "last_name": "",\n "phone": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/managers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/managers/',
headers: {
authorization: '{{apiKey}}',
'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({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/managers/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"display_name":"","email":"","first_name":"","id":"","is_on_duty":false,"last_name":"","phone":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"display_name": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"is_on_duty": @NO,
@"last_name": @"",
@"phone": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/managers/"]
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}}/accounts/:id/managers/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/managers/",
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([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/managers/', [
'body' => '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/managers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/managers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/accounts/:id/managers/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/managers/"
payload = {
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": False,
"last_name": "",
"phone": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/managers/"
payload <- "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/managers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/accounts/:id/managers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/managers/";
let payload = json!({
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/:id/managers/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
echo '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}' | \
http POST {{baseUrl}}/accounts/:id/managers/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "is_on_duty": false,\n "last_name": "",\n "phone": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/managers/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/managers/")! 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
accounts_managers_destroy
{{baseUrl}}/accounts/:id/managers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/managers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounts/:id/managers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/managers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/managers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/managers/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/managers/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/accounts/:id/managers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounts/:id/managers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/managers/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/managers/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounts/:id/managers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/managers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/managers/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/managers/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/managers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounts/:id/managers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/managers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/managers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/managers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/accounts/:id/managers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/managers/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/managers/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/accounts/:id/managers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/managers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/managers/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/managers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/accounts/:id/managers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/managers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/accounts/:id/managers/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/accounts/:id/managers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/managers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/managers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_managers_retrieve
{{baseUrl}}/accounts/:id/managers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/managers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/managers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/managers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/managers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/managers/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/managers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/managers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/managers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/managers/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/managers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/managers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/managers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/managers/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/managers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/managers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/managers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/managers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/managers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/managers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/managers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/managers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/managers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/managers/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/managers/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/managers/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/managers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/managers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/managers/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/managers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/managers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/managers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/managers/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/managers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/managers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/managers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
accounts_partial_update
{{baseUrl}}/accounts/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/accounts/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:address ""
:assignee_proximity_radius 0
:auto_assign_max_distance 0
:auto_assign_max_tasks 0
:auto_assign_optimize false
:auto_assign_orders false
:auto_assign_rotate {}
:auto_assign_time_before ""
:billing_address ""
:billing_company ""
:billing_country ""
:billing_email ""
:billing_method ""
:billing_name ""
:billing_phone ""
:billing_vatin ""
:calendar_task_template ""
:country_code ""
:custom_integration_url ""
:dashboard_task_template ""
:dashboard_worker_limit 0
:date_format ""
:distance_units ""
:email ""
:feature_address_autosuggest_provider ""
:feature_app_task_search false
:feature_change_task_account false
:feature_document_signing false
:feature_geocoding_country_code ""
:feature_navigation_app_selection false
:feature_navigation_use_address false
:feature_show_tutorial false
:feature_show_unassigned_to_workers false
:feature_task_accept false
:feature_task_created_sound false
:feature_task_reject false
:feature_tracker_reviews_allowed false
:id ""
:language ""
:managers ""
:name ""
:notification_emails []
:optimization_objective ""
:optimize_after_create false
:owner ""
:reference_autogenerate false
:reference_length 0
:reference_offset 0
:reference_prefix ""
:registry_code ""
:review_emails []
:route_end_address ""
:route_start_address ""
:slug ""
:state ""
:stripe_customer_id ""
:stripe_payment_method_id ""
:task_duration {}
:task_expiry_duration_from_complete_after {}
:task_expiry_duration_from_complete_before {}
:task_expiry_state ""
:time_format ""
:timezone ""
:type ""
:url ""
:vatin ""
:website ""
:workers ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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}}/accounts/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/"
payload := strings.NewReader("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/accounts/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1898
{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/accounts/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/accounts/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/accounts/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":"","assignee_proximity_radius":0,"auto_assign_max_distance":0,"auto_assign_max_tasks":0,"auto_assign_optimize":false,"auto_assign_orders":false,"auto_assign_rotate":{},"auto_assign_time_before":"","billing_address":"","billing_company":"","billing_country":"","billing_email":"","billing_method":"","billing_name":"","billing_phone":"","billing_vatin":"","calendar_task_template":"","country_code":"","custom_integration_url":"","dashboard_task_template":"","dashboard_worker_limit":0,"date_format":"","distance_units":"","email":"","feature_address_autosuggest_provider":"","feature_app_task_search":false,"feature_change_task_account":false,"feature_document_signing":false,"feature_geocoding_country_code":"","feature_navigation_app_selection":false,"feature_navigation_use_address":false,"feature_show_tutorial":false,"feature_show_unassigned_to_workers":false,"feature_task_accept":false,"feature_task_created_sound":false,"feature_task_reject":false,"feature_tracker_reviews_allowed":false,"id":"","language":"","managers":"","name":"","notification_emails":[],"optimization_objective":"","optimize_after_create":false,"owner":"","reference_autogenerate":false,"reference_length":0,"reference_offset":0,"reference_prefix":"","registry_code":"","review_emails":[],"route_end_address":"","route_start_address":"","slug":"","state":"","stripe_customer_id":"","stripe_payment_method_id":"","task_duration":{},"task_expiry_duration_from_complete_after":{},"task_expiry_duration_from_complete_before":{},"task_expiry_state":"","time_format":"","timezone":"","type":"","url":"","vatin":"","website":"","workers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": "",\n "assignee_proximity_radius": 0,\n "auto_assign_max_distance": 0,\n "auto_assign_max_tasks": 0,\n "auto_assign_optimize": false,\n "auto_assign_orders": false,\n "auto_assign_rotate": {},\n "auto_assign_time_before": "",\n "billing_address": "",\n "billing_company": "",\n "billing_country": "",\n "billing_email": "",\n "billing_method": "",\n "billing_name": "",\n "billing_phone": "",\n "billing_vatin": "",\n "calendar_task_template": "",\n "country_code": "",\n "custom_integration_url": "",\n "dashboard_task_template": "",\n "dashboard_worker_limit": 0,\n "date_format": "",\n "distance_units": "",\n "email": "",\n "feature_address_autosuggest_provider": "",\n "feature_app_task_search": false,\n "feature_change_task_account": false,\n "feature_document_signing": false,\n "feature_geocoding_country_code": "",\n "feature_navigation_app_selection": false,\n "feature_navigation_use_address": false,\n "feature_show_tutorial": false,\n "feature_show_unassigned_to_workers": false,\n "feature_task_accept": false,\n "feature_task_created_sound": false,\n "feature_task_reject": false,\n "feature_tracker_reviews_allowed": false,\n "id": "",\n "language": "",\n "managers": "",\n "name": "",\n "notification_emails": [],\n "optimization_objective": "",\n "optimize_after_create": false,\n "owner": "",\n "reference_autogenerate": false,\n "reference_length": 0,\n "reference_offset": 0,\n "reference_prefix": "",\n "registry_code": "",\n "review_emails": [],\n "route_end_address": "",\n "route_start_address": "",\n "slug": "",\n "state": "",\n "stripe_customer_id": "",\n "stripe_payment_method_id": "",\n "task_duration": {},\n "task_expiry_duration_from_complete_after": {},\n "task_expiry_duration_from_complete_before": {},\n "task_expiry_state": "",\n "time_format": "",\n "timezone": "",\n "type": "",\n "url": "",\n "vatin": "",\n "website": "",\n "workers": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/accounts/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":"","assignee_proximity_radius":0,"auto_assign_max_distance":0,"auto_assign_max_tasks":0,"auto_assign_optimize":false,"auto_assign_orders":false,"auto_assign_rotate":{},"auto_assign_time_before":"","billing_address":"","billing_company":"","billing_country":"","billing_email":"","billing_method":"","billing_name":"","billing_phone":"","billing_vatin":"","calendar_task_template":"","country_code":"","custom_integration_url":"","dashboard_task_template":"","dashboard_worker_limit":0,"date_format":"","distance_units":"","email":"","feature_address_autosuggest_provider":"","feature_app_task_search":false,"feature_change_task_account":false,"feature_document_signing":false,"feature_geocoding_country_code":"","feature_navigation_app_selection":false,"feature_navigation_use_address":false,"feature_show_tutorial":false,"feature_show_unassigned_to_workers":false,"feature_task_accept":false,"feature_task_created_sound":false,"feature_task_reject":false,"feature_tracker_reviews_allowed":false,"id":"","language":"","managers":"","name":"","notification_emails":[],"optimization_objective":"","optimize_after_create":false,"owner":"","reference_autogenerate":false,"reference_length":0,"reference_offset":0,"reference_prefix":"","registry_code":"","review_emails":[],"route_end_address":"","route_start_address":"","slug":"","state":"","stripe_customer_id":"","stripe_payment_method_id":"","task_duration":{},"task_expiry_duration_from_complete_after":{},"task_expiry_duration_from_complete_before":{},"task_expiry_state":"","time_format":"","timezone":"","type":"","url":"","vatin":"","website":"","workers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @"",
@"assignee_proximity_radius": @0,
@"auto_assign_max_distance": @0,
@"auto_assign_max_tasks": @0,
@"auto_assign_optimize": @NO,
@"auto_assign_orders": @NO,
@"auto_assign_rotate": @{ },
@"auto_assign_time_before": @"",
@"billing_address": @"",
@"billing_company": @"",
@"billing_country": @"",
@"billing_email": @"",
@"billing_method": @"",
@"billing_name": @"",
@"billing_phone": @"",
@"billing_vatin": @"",
@"calendar_task_template": @"",
@"country_code": @"",
@"custom_integration_url": @"",
@"dashboard_task_template": @"",
@"dashboard_worker_limit": @0,
@"date_format": @"",
@"distance_units": @"",
@"email": @"",
@"feature_address_autosuggest_provider": @"",
@"feature_app_task_search": @NO,
@"feature_change_task_account": @NO,
@"feature_document_signing": @NO,
@"feature_geocoding_country_code": @"",
@"feature_navigation_app_selection": @NO,
@"feature_navigation_use_address": @NO,
@"feature_show_tutorial": @NO,
@"feature_show_unassigned_to_workers": @NO,
@"feature_task_accept": @NO,
@"feature_task_created_sound": @NO,
@"feature_task_reject": @NO,
@"feature_tracker_reviews_allowed": @NO,
@"id": @"",
@"language": @"",
@"managers": @"",
@"name": @"",
@"notification_emails": @[ ],
@"optimization_objective": @"",
@"optimize_after_create": @NO,
@"owner": @"",
@"reference_autogenerate": @NO,
@"reference_length": @0,
@"reference_offset": @0,
@"reference_prefix": @"",
@"registry_code": @"",
@"review_emails": @[ ],
@"route_end_address": @"",
@"route_start_address": @"",
@"slug": @"",
@"state": @"",
@"stripe_customer_id": @"",
@"stripe_payment_method_id": @"",
@"task_duration": @{ },
@"task_expiry_duration_from_complete_after": @{ },
@"task_expiry_duration_from_complete_before": @{ },
@"task_expiry_state": @"",
@"time_format": @"",
@"timezone": @"",
@"type": @"",
@"url": @"",
@"vatin": @"",
@"website": @"",
@"workers": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/accounts/:id/', [
'body' => '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/accounts/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/"
payload = {
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": False,
"auto_assign_orders": False,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": False,
"feature_change_task_account": False,
"feature_document_signing": False,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": False,
"feature_navigation_use_address": False,
"feature_show_tutorial": False,
"feature_show_unassigned_to_workers": False,
"feature_task_accept": False,
"feature_task_created_sound": False,
"feature_task_reject": False,
"feature_tracker_reviews_allowed": False,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": False,
"owner": "",
"reference_autogenerate": False,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/"
payload <- "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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.patch('/baseUrl/accounts/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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}}/accounts/:id/";
let payload = json!({
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": json!({}),
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": (),
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": (),
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": json!({}),
"task_expiry_duration_from_complete_after": json!({}),
"task_expiry_duration_from_complete_before": json!({}),
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/accounts/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
echo '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}' | \
http PATCH {{baseUrl}}/accounts/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "address": "",\n "assignee_proximity_radius": 0,\n "auto_assign_max_distance": 0,\n "auto_assign_max_tasks": 0,\n "auto_assign_optimize": false,\n "auto_assign_orders": false,\n "auto_assign_rotate": {},\n "auto_assign_time_before": "",\n "billing_address": "",\n "billing_company": "",\n "billing_country": "",\n "billing_email": "",\n "billing_method": "",\n "billing_name": "",\n "billing_phone": "",\n "billing_vatin": "",\n "calendar_task_template": "",\n "country_code": "",\n "custom_integration_url": "",\n "dashboard_task_template": "",\n "dashboard_worker_limit": 0,\n "date_format": "",\n "distance_units": "",\n "email": "",\n "feature_address_autosuggest_provider": "",\n "feature_app_task_search": false,\n "feature_change_task_account": false,\n "feature_document_signing": false,\n "feature_geocoding_country_code": "",\n "feature_navigation_app_selection": false,\n "feature_navigation_use_address": false,\n "feature_show_tutorial": false,\n "feature_show_unassigned_to_workers": false,\n "feature_task_accept": false,\n "feature_task_created_sound": false,\n "feature_task_reject": false,\n "feature_tracker_reviews_allowed": false,\n "id": "",\n "language": "",\n "managers": "",\n "name": "",\n "notification_emails": [],\n "optimization_objective": "",\n "optimize_after_create": false,\n "owner": "",\n "reference_autogenerate": false,\n "reference_length": 0,\n "reference_offset": 0,\n "reference_prefix": "",\n "registry_code": "",\n "review_emails": [],\n "route_end_address": "",\n "route_start_address": "",\n "slug": "",\n "state": "",\n "stripe_customer_id": "",\n "stripe_payment_method_id": "",\n "task_duration": {},\n "task_expiry_duration_from_complete_after": {},\n "task_expiry_duration_from_complete_before": {},\n "task_expiry_state": "",\n "time_format": "",\n "timezone": "",\n "type": "",\n "url": "",\n "vatin": "",\n "website": "",\n "workers": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": [],
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": [],
"task_expiry_duration_from_complete_after": [],
"task_expiry_duration_from_complete_before": [],
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_retrieve
{{baseUrl}}/accounts/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
accounts_stripe_attach_payment_method_update
{{baseUrl}}/accounts/:id/stripe_attach_payment_method/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:set_default false
:stripe_customer_id ""
:stripe_payment_method_id ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_attach_payment_method/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"
payload := strings.NewReader("{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/stripe_attach_payment_method/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 88
{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
set_default: false,
stripe_customer_id: '',
stripe_payment_method_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {set_default: false, stripe_customer_id: '', stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"set_default":false,"stripe_customer_id":"","stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "set_default": false,\n "stripe_customer_id": "",\n "stripe_payment_method_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/stripe_attach_payment_method/',
headers: {
authorization: '{{apiKey}}',
'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({set_default: false, stripe_customer_id: '', stripe_payment_method_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {set_default: false, stripe_customer_id: '', stripe_payment_method_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
set_default: false,
stripe_customer_id: '',
stripe_payment_method_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: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {set_default: false, stripe_customer_id: '', stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"set_default":false,"stripe_customer_id":"","stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"set_default": @NO,
@"stripe_customer_id": @"",
@"stripe_payment_method_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"]
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}}/accounts/:id/stripe_attach_payment_method/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_attach_payment_method/",
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([
'set_default' => null,
'stripe_customer_id' => '',
'stripe_payment_method_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/stripe_attach_payment_method/', [
'body' => '{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_attach_payment_method/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'set_default' => null,
'stripe_customer_id' => '',
'stripe_payment_method_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'set_default' => null,
'stripe_customer_id' => '',
'stripe_payment_method_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/stripe_attach_payment_method/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_attach_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/accounts/:id/stripe_attach_payment_method/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"
payload = {
"set_default": False,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/"
payload <- "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/accounts/:id/stripe_attach_payment_method/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"set_default\": false,\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_attach_payment_method/";
let payload = json!({
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/accounts/:id/stripe_attach_payment_method/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}'
echo '{
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
}' | \
http PUT {{baseUrl}}/accounts/:id/stripe_attach_payment_method/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "set_default": false,\n "stripe_customer_id": "",\n "stripe_payment_method_id": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_attach_payment_method/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"set_default": false,
"stripe_customer_id": "",
"stripe_payment_method_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_attach_payment_method/")! 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
accounts_stripe_create_setup_intent_create
{{baseUrl}}/accounts/:id/stripe_create_setup_intent/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"payment_method_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"payment_method_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:payment_method_id ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"payment_method_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"payment_method_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"payment_method_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload := strings.NewReader("{\n \"payment_method_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/stripe_create_setup_intent/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 29
{
"payment_method_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"payment_method_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"payment_method_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"payment_method_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"payment_method_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
payment_method_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "payment_method_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"payment_method_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/stripe_create_setup_intent/',
headers: {
authorization: '{{apiKey}}',
'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({payment_method_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {payment_method_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
payment_method_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"payment_method_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"]
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}}/accounts/:id/stripe_create_setup_intent/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"payment_method_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_create_setup_intent/",
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([
'payment_method_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/stripe_create_setup_intent/', [
'body' => '{
"payment_method_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'payment_method_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'payment_method_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"payment_method_id": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"payment_method_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"payment_method_id\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/accounts/:id/stripe_create_setup_intent/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload = { "payment_method_id": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload <- "{\n \"payment_method_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"payment_method_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/accounts/:id/stripe_create_setup_intent/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"payment_method_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/";
let payload = json!({"payment_method_id": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/:id/stripe_create_setup_intent/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"payment_method_id": ""
}'
echo '{
"payment_method_id": ""
}' | \
http POST {{baseUrl}}/accounts/:id/stripe_create_setup_intent/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "payment_method_id": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_create_setup_intent/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["payment_method_id": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")! 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
accounts_stripe_create_setup_intent_update
{{baseUrl}}/accounts/:id/stripe_create_setup_intent/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"payment_method_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"payment_method_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:payment_method_id ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"payment_method_id\": \"\"\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}}/accounts/:id/stripe_create_setup_intent/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"payment_method_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"payment_method_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload := strings.NewReader("{\n \"payment_method_id\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/stripe_create_setup_intent/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 29
{
"payment_method_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"payment_method_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"payment_method_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"payment_method_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"payment_method_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
payment_method_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "payment_method_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"payment_method_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/stripe_create_setup_intent/',
headers: {
authorization: '{{apiKey}}',
'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({payment_method_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {payment_method_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
payment_method_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: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"payment_method_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"]
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}}/accounts/:id/stripe_create_setup_intent/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"payment_method_id\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_create_setup_intent/",
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([
'payment_method_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/stripe_create_setup_intent/', [
'body' => '{
"payment_method_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'payment_method_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'payment_method_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/stripe_create_setup_intent/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"payment_method_id": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_create_setup_intent/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"payment_method_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"payment_method_id\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/accounts/:id/stripe_create_setup_intent/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload = { "payment_method_id": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/"
payload <- "{\n \"payment_method_id\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"payment_method_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/accounts/:id/stripe_create_setup_intent/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"payment_method_id\": \"\"\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}}/accounts/:id/stripe_create_setup_intent/";
let payload = json!({"payment_method_id": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/accounts/:id/stripe_create_setup_intent/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"payment_method_id": ""
}'
echo '{
"payment_method_id": ""
}' | \
http PUT {{baseUrl}}/accounts/:id/stripe_create_setup_intent/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "payment_method_id": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_create_setup_intent/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["payment_method_id": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_create_setup_intent/")! 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
accounts_stripe_detach_payment_method_update
{{baseUrl}}/accounts/:id/stripe_detach_payment_method/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"stripe_payment_method_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"stripe_payment_method_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:stripe_payment_method_id ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_detach_payment_method/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"stripe_payment_method_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"stripe_payment_method_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"
payload := strings.NewReader("{\n \"stripe_payment_method_id\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/stripe_detach_payment_method/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 36
{
"stripe_payment_method_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"stripe_payment_method_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"stripe_payment_method_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"stripe_payment_method_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"stripe_payment_method_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
stripe_payment_method_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "stripe_payment_method_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"stripe_payment_method_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/stripe_detach_payment_method/',
headers: {
authorization: '{{apiKey}}',
'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({stripe_payment_method_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {stripe_payment_method_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
stripe_payment_method_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: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"stripe_payment_method_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"]
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}}/accounts/:id/stripe_detach_payment_method/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"stripe_payment_method_id\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_detach_payment_method/",
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([
'stripe_payment_method_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/stripe_detach_payment_method/', [
'body' => '{
"stripe_payment_method_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_detach_payment_method/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'stripe_payment_method_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'stripe_payment_method_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/stripe_detach_payment_method/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"stripe_payment_method_id": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_detach_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"stripe_payment_method_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"stripe_payment_method_id\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/accounts/:id/stripe_detach_payment_method/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"
payload = { "stripe_payment_method_id": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/"
payload <- "{\n \"stripe_payment_method_id\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"stripe_payment_method_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/accounts/:id/stripe_detach_payment_method/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_detach_payment_method/";
let payload = json!({"stripe_payment_method_id": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/accounts/:id/stripe_detach_payment_method/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"stripe_payment_method_id": ""
}'
echo '{
"stripe_payment_method_id": ""
}' | \
http PUT {{baseUrl}}/accounts/:id/stripe_detach_payment_method/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "stripe_payment_method_id": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_detach_payment_method/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["stripe_payment_method_id": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_detach_payment_method/")! 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
accounts_stripe_get_payment_method_retrieve
{{baseUrl}}/accounts/:id/stripe_get_payment_method/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_get_payment_method/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/stripe_get_payment_method/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_get_payment_method/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_get_payment_method/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_get_payment_method/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_get_payment_method/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/stripe_get_payment_method/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/stripe_get_payment_method/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_get_payment_method/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/stripe_get_payment_method/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/stripe_get_payment_method/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/stripe_get_payment_method/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/stripe_get_payment_method/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_get_payment_method/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_get_payment_method/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_get_payment_method/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/stripe_get_payment_method/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/stripe_get_payment_method/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/stripe_get_payment_method/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/stripe_get_payment_method/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_get_payment_method/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_get_payment_method/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/stripe_get_payment_method/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_get_payment_method/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/stripe_get_payment_method/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_get_payment_method/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/stripe_get_payment_method/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_get_payment_method/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_get_payment_method/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/stripe_get_payment_method/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_get_payment_method/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_get_payment_method/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_get_payment_method/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/stripe_get_payment_method/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_get_payment_method/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/stripe_get_payment_method/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/stripe_get_payment_method/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_get_payment_method/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_get_payment_method/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_stripe_get_setup_attempt_retrieve
{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/stripe_get_setup_attempt/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/stripe_get_setup_attempt/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/stripe_get_setup_attempt/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/stripe_get_setup_attempt/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/stripe_get_setup_attempt/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/stripe_get_setup_attempt/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/stripe_get_setup_attempt/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/stripe_get_setup_attempt/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/stripe_get_setup_attempt/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/stripe_get_setup_attempt/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_get_setup_attempt/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_get_setup_attempt/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_stripe_get_setup_intent_retrieve
{{baseUrl}}/accounts/:id/stripe_get_setup_intent/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/stripe_get_setup_intent/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/stripe_get_setup_intent/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/stripe_get_setup_intent/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/stripe_get_setup_intent/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/stripe_get_setup_intent/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/stripe_get_setup_intent/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_get_setup_intent/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_get_setup_intent/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/stripe_get_setup_intent/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_get_setup_intent/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/stripe_get_setup_intent/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_get_setup_intent/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/stripe_get_setup_intent/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/stripe_get_setup_intent/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/stripe_get_setup_intent/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_get_setup_intent/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_get_setup_intent/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_stripe_payment_methods_retrieve
{{baseUrl}}/accounts/:id/stripe_payment_methods/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_payment_methods/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/stripe_payment_methods/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_payment_methods/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_payment_methods/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_payment_methods/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_payment_methods/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/stripe_payment_methods/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/stripe_payment_methods/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_payment_methods/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/stripe_payment_methods/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/stripe_payment_methods/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/stripe_payment_methods/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/stripe_payment_methods/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_payment_methods/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_payment_methods/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_payment_methods/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/stripe_payment_methods/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/stripe_payment_methods/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/stripe_payment_methods/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/stripe_payment_methods/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_payment_methods/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_payment_methods/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/stripe_payment_methods/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_payment_methods/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/stripe_payment_methods/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_payment_methods/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/stripe_payment_methods/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_payment_methods/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_payment_methods/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/stripe_payment_methods/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_payment_methods/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_payment_methods/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_payment_methods/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/stripe_payment_methods/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_payment_methods/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/stripe_payment_methods/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/stripe_payment_methods/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_payment_methods/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_payment_methods/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
accounts_stripe_set_default_payment_method_update
{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"stripe_payment_method_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"stripe_payment_method_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:stripe_payment_method_id ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_set_default_payment_method/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"stripe_payment_method_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"stripe_payment_method_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"
payload := strings.NewReader("{\n \"stripe_payment_method_id\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/stripe_set_default_payment_method/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 36
{
"stripe_payment_method_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"stripe_payment_method_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"stripe_payment_method_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"stripe_payment_method_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"stripe_payment_method_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
stripe_payment_method_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "stripe_payment_method_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"stripe_payment_method_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/stripe_set_default_payment_method/',
headers: {
authorization: '{{apiKey}}',
'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({stripe_payment_method_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {stripe_payment_method_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
stripe_payment_method_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: 'PUT',
url: '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {stripe_payment_method_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"stripe_payment_method_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"stripe_payment_method_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"]
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}}/accounts/:id/stripe_set_default_payment_method/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"stripe_payment_method_id\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/",
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([
'stripe_payment_method_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/stripe_set_default_payment_method/', [
'body' => '{
"stripe_payment_method_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'stripe_payment_method_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'stripe_payment_method_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"stripe_payment_method_id": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"stripe_payment_method_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"stripe_payment_method_id\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/accounts/:id/stripe_set_default_payment_method/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"
payload = { "stripe_payment_method_id": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/"
payload <- "{\n \"stripe_payment_method_id\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"stripe_payment_method_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/accounts/:id/stripe_set_default_payment_method/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"stripe_payment_method_id\": \"\"\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}}/accounts/:id/stripe_set_default_payment_method/";
let payload = json!({"stripe_payment_method_id": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/accounts/:id/stripe_set_default_payment_method/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"stripe_payment_method_id": ""
}'
echo '{
"stripe_payment_method_id": ""
}' | \
http PUT {{baseUrl}}/accounts/:id/stripe_set_default_payment_method/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "stripe_payment_method_id": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_set_default_payment_method/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["stripe_payment_method_id": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_set_default_payment_method/")! 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
accounts_stripe_setup_intents_retrieve
{{baseUrl}}/accounts/:id/stripe_setup_intents/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/stripe_setup_intents/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/stripe_setup_intents/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/stripe_setup_intents/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/stripe_setup_intents/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/stripe_setup_intents/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/stripe_setup_intents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/stripe_setup_intents/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/stripe_setup_intents/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/stripe_setup_intents/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/stripe_setup_intents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/stripe_setup_intents/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/stripe_setup_intents/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/stripe_setup_intents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/stripe_setup_intents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/stripe_setup_intents/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/stripe_setup_intents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/stripe_setup_intents/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/stripe_setup_intents/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/stripe_setup_intents/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/stripe_setup_intents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/stripe_setup_intents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/stripe_setup_intents/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/stripe_setup_intents/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/stripe_setup_intents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/stripe_setup_intents/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/stripe_setup_intents/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/stripe_setup_intents/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/stripe_setup_intents/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/stripe_setup_intents/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/stripe_setup_intents/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/stripe_setup_intents/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/stripe_setup_intents/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/stripe_setup_intents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/stripe_setup_intents/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/stripe_setup_intents/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/stripe_setup_intents/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/stripe_setup_intents/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/stripe_setup_intents/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/stripe_setup_intents/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
accounts_update
{{baseUrl}}/accounts/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/accounts/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:address ""
:assignee_proximity_radius 0
:auto_assign_max_distance 0
:auto_assign_max_tasks 0
:auto_assign_optimize false
:auto_assign_orders false
:auto_assign_rotate {}
:auto_assign_time_before ""
:billing_address ""
:billing_company ""
:billing_country ""
:billing_email ""
:billing_method ""
:billing_name ""
:billing_phone ""
:billing_vatin ""
:calendar_task_template ""
:country_code ""
:custom_integration_url ""
:dashboard_task_template ""
:dashboard_worker_limit 0
:date_format ""
:distance_units ""
:email ""
:feature_address_autosuggest_provider ""
:feature_app_task_search false
:feature_change_task_account false
:feature_document_signing false
:feature_geocoding_country_code ""
:feature_navigation_app_selection false
:feature_navigation_use_address false
:feature_show_tutorial false
:feature_show_unassigned_to_workers false
:feature_task_accept false
:feature_task_created_sound false
:feature_task_reject false
:feature_tracker_reviews_allowed false
:id ""
:language ""
:managers ""
:name ""
:notification_emails []
:optimization_objective ""
:optimize_after_create false
:owner ""
:reference_autogenerate false
:reference_length 0
:reference_offset 0
:reference_prefix ""
:registry_code ""
:review_emails []
:route_end_address ""
:route_start_address ""
:slug ""
:state ""
:stripe_customer_id ""
:stripe_payment_method_id ""
:task_duration {}
:task_expiry_duration_from_complete_after {}
:task_expiry_duration_from_complete_before {}
:task_expiry_state ""
:time_format ""
:timezone ""
:type ""
:url ""
:vatin ""
:website ""
:workers ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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}}/accounts/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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}}/accounts/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/"
payload := strings.NewReader("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1898
{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/accounts/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/accounts/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/accounts/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":"","assignee_proximity_radius":0,"auto_assign_max_distance":0,"auto_assign_max_tasks":0,"auto_assign_optimize":false,"auto_assign_orders":false,"auto_assign_rotate":{},"auto_assign_time_before":"","billing_address":"","billing_company":"","billing_country":"","billing_email":"","billing_method":"","billing_name":"","billing_phone":"","billing_vatin":"","calendar_task_template":"","country_code":"","custom_integration_url":"","dashboard_task_template":"","dashboard_worker_limit":0,"date_format":"","distance_units":"","email":"","feature_address_autosuggest_provider":"","feature_app_task_search":false,"feature_change_task_account":false,"feature_document_signing":false,"feature_geocoding_country_code":"","feature_navigation_app_selection":false,"feature_navigation_use_address":false,"feature_show_tutorial":false,"feature_show_unassigned_to_workers":false,"feature_task_accept":false,"feature_task_created_sound":false,"feature_task_reject":false,"feature_tracker_reviews_allowed":false,"id":"","language":"","managers":"","name":"","notification_emails":[],"optimization_objective":"","optimize_after_create":false,"owner":"","reference_autogenerate":false,"reference_length":0,"reference_offset":0,"reference_prefix":"","registry_code":"","review_emails":[],"route_end_address":"","route_start_address":"","slug":"","state":"","stripe_customer_id":"","stripe_payment_method_id":"","task_duration":{},"task_expiry_duration_from_complete_after":{},"task_expiry_duration_from_complete_before":{},"task_expiry_state":"","time_format":"","timezone":"","type":"","url":"","vatin":"","website":"","workers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": "",\n "assignee_proximity_radius": 0,\n "auto_assign_max_distance": 0,\n "auto_assign_max_tasks": 0,\n "auto_assign_optimize": false,\n "auto_assign_orders": false,\n "auto_assign_rotate": {},\n "auto_assign_time_before": "",\n "billing_address": "",\n "billing_company": "",\n "billing_country": "",\n "billing_email": "",\n "billing_method": "",\n "billing_name": "",\n "billing_phone": "",\n "billing_vatin": "",\n "calendar_task_template": "",\n "country_code": "",\n "custom_integration_url": "",\n "dashboard_task_template": "",\n "dashboard_worker_limit": 0,\n "date_format": "",\n "distance_units": "",\n "email": "",\n "feature_address_autosuggest_provider": "",\n "feature_app_task_search": false,\n "feature_change_task_account": false,\n "feature_document_signing": false,\n "feature_geocoding_country_code": "",\n "feature_navigation_app_selection": false,\n "feature_navigation_use_address": false,\n "feature_show_tutorial": false,\n "feature_show_unassigned_to_workers": false,\n "feature_task_accept": false,\n "feature_task_created_sound": false,\n "feature_task_reject": false,\n "feature_tracker_reviews_allowed": false,\n "id": "",\n "language": "",\n "managers": "",\n "name": "",\n "notification_emails": [],\n "optimization_objective": "",\n "optimize_after_create": false,\n "owner": "",\n "reference_autogenerate": false,\n "reference_length": 0,\n "reference_offset": 0,\n "reference_prefix": "",\n "registry_code": "",\n "review_emails": [],\n "route_end_address": "",\n "route_start_address": "",\n "slug": "",\n "state": "",\n "stripe_customer_id": "",\n "stripe_payment_method_id": "",\n "task_duration": {},\n "task_expiry_duration_from_complete_after": {},\n "task_expiry_duration_from_complete_before": {},\n "task_expiry_state": "",\n "time_format": "",\n "timezone": "",\n "type": "",\n "url": "",\n "vatin": "",\n "website": "",\n "workers": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
},
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}}/accounts/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
});
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}}/accounts/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: '',
assignee_proximity_radius: 0,
auto_assign_max_distance: 0,
auto_assign_max_tasks: 0,
auto_assign_optimize: false,
auto_assign_orders: false,
auto_assign_rotate: {},
auto_assign_time_before: '',
billing_address: '',
billing_company: '',
billing_country: '',
billing_email: '',
billing_method: '',
billing_name: '',
billing_phone: '',
billing_vatin: '',
calendar_task_template: '',
country_code: '',
custom_integration_url: '',
dashboard_task_template: '',
dashboard_worker_limit: 0,
date_format: '',
distance_units: '',
email: '',
feature_address_autosuggest_provider: '',
feature_app_task_search: false,
feature_change_task_account: false,
feature_document_signing: false,
feature_geocoding_country_code: '',
feature_navigation_app_selection: false,
feature_navigation_use_address: false,
feature_show_tutorial: false,
feature_show_unassigned_to_workers: false,
feature_task_accept: false,
feature_task_created_sound: false,
feature_task_reject: false,
feature_tracker_reviews_allowed: false,
id: '',
language: '',
managers: '',
name: '',
notification_emails: [],
optimization_objective: '',
optimize_after_create: false,
owner: '',
reference_autogenerate: false,
reference_length: 0,
reference_offset: 0,
reference_prefix: '',
registry_code: '',
review_emails: [],
route_end_address: '',
route_start_address: '',
slug: '',
state: '',
stripe_customer_id: '',
stripe_payment_method_id: '',
task_duration: {},
task_expiry_duration_from_complete_after: {},
task_expiry_duration_from_complete_before: {},
task_expiry_state: '',
time_format: '',
timezone: '',
type: '',
url: '',
vatin: '',
website: '',
workers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":"","assignee_proximity_radius":0,"auto_assign_max_distance":0,"auto_assign_max_tasks":0,"auto_assign_optimize":false,"auto_assign_orders":false,"auto_assign_rotate":{},"auto_assign_time_before":"","billing_address":"","billing_company":"","billing_country":"","billing_email":"","billing_method":"","billing_name":"","billing_phone":"","billing_vatin":"","calendar_task_template":"","country_code":"","custom_integration_url":"","dashboard_task_template":"","dashboard_worker_limit":0,"date_format":"","distance_units":"","email":"","feature_address_autosuggest_provider":"","feature_app_task_search":false,"feature_change_task_account":false,"feature_document_signing":false,"feature_geocoding_country_code":"","feature_navigation_app_selection":false,"feature_navigation_use_address":false,"feature_show_tutorial":false,"feature_show_unassigned_to_workers":false,"feature_task_accept":false,"feature_task_created_sound":false,"feature_task_reject":false,"feature_tracker_reviews_allowed":false,"id":"","language":"","managers":"","name":"","notification_emails":[],"optimization_objective":"","optimize_after_create":false,"owner":"","reference_autogenerate":false,"reference_length":0,"reference_offset":0,"reference_prefix":"","registry_code":"","review_emails":[],"route_end_address":"","route_start_address":"","slug":"","state":"","stripe_customer_id":"","stripe_payment_method_id":"","task_duration":{},"task_expiry_duration_from_complete_after":{},"task_expiry_duration_from_complete_before":{},"task_expiry_state":"","time_format":"","timezone":"","type":"","url":"","vatin":"","website":"","workers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @"",
@"assignee_proximity_radius": @0,
@"auto_assign_max_distance": @0,
@"auto_assign_max_tasks": @0,
@"auto_assign_optimize": @NO,
@"auto_assign_orders": @NO,
@"auto_assign_rotate": @{ },
@"auto_assign_time_before": @"",
@"billing_address": @"",
@"billing_company": @"",
@"billing_country": @"",
@"billing_email": @"",
@"billing_method": @"",
@"billing_name": @"",
@"billing_phone": @"",
@"billing_vatin": @"",
@"calendar_task_template": @"",
@"country_code": @"",
@"custom_integration_url": @"",
@"dashboard_task_template": @"",
@"dashboard_worker_limit": @0,
@"date_format": @"",
@"distance_units": @"",
@"email": @"",
@"feature_address_autosuggest_provider": @"",
@"feature_app_task_search": @NO,
@"feature_change_task_account": @NO,
@"feature_document_signing": @NO,
@"feature_geocoding_country_code": @"",
@"feature_navigation_app_selection": @NO,
@"feature_navigation_use_address": @NO,
@"feature_show_tutorial": @NO,
@"feature_show_unassigned_to_workers": @NO,
@"feature_task_accept": @NO,
@"feature_task_created_sound": @NO,
@"feature_task_reject": @NO,
@"feature_tracker_reviews_allowed": @NO,
@"id": @"",
@"language": @"",
@"managers": @"",
@"name": @"",
@"notification_emails": @[ ],
@"optimization_objective": @"",
@"optimize_after_create": @NO,
@"owner": @"",
@"reference_autogenerate": @NO,
@"reference_length": @0,
@"reference_offset": @0,
@"reference_prefix": @"",
@"registry_code": @"",
@"review_emails": @[ ],
@"route_end_address": @"",
@"route_start_address": @"",
@"slug": @"",
@"state": @"",
@"stripe_customer_id": @"",
@"stripe_payment_method_id": @"",
@"task_duration": @{ },
@"task_expiry_duration_from_complete_after": @{ },
@"task_expiry_duration_from_complete_before": @{ },
@"task_expiry_state": @"",
@"time_format": @"",
@"timezone": @"",
@"type": @"",
@"url": @"",
@"vatin": @"",
@"website": @"",
@"workers": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/', [
'body' => '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => '',
'assignee_proximity_radius' => 0,
'auto_assign_max_distance' => 0,
'auto_assign_max_tasks' => 0,
'auto_assign_optimize' => null,
'auto_assign_orders' => null,
'auto_assign_rotate' => [
],
'auto_assign_time_before' => '',
'billing_address' => '',
'billing_company' => '',
'billing_country' => '',
'billing_email' => '',
'billing_method' => '',
'billing_name' => '',
'billing_phone' => '',
'billing_vatin' => '',
'calendar_task_template' => '',
'country_code' => '',
'custom_integration_url' => '',
'dashboard_task_template' => '',
'dashboard_worker_limit' => 0,
'date_format' => '',
'distance_units' => '',
'email' => '',
'feature_address_autosuggest_provider' => '',
'feature_app_task_search' => null,
'feature_change_task_account' => null,
'feature_document_signing' => null,
'feature_geocoding_country_code' => '',
'feature_navigation_app_selection' => null,
'feature_navigation_use_address' => null,
'feature_show_tutorial' => null,
'feature_show_unassigned_to_workers' => null,
'feature_task_accept' => null,
'feature_task_created_sound' => null,
'feature_task_reject' => null,
'feature_tracker_reviews_allowed' => null,
'id' => '',
'language' => '',
'managers' => '',
'name' => '',
'notification_emails' => [
],
'optimization_objective' => '',
'optimize_after_create' => null,
'owner' => '',
'reference_autogenerate' => null,
'reference_length' => 0,
'reference_offset' => 0,
'reference_prefix' => '',
'registry_code' => '',
'review_emails' => [
],
'route_end_address' => '',
'route_start_address' => '',
'slug' => '',
'state' => '',
'stripe_customer_id' => '',
'stripe_payment_method_id' => '',
'task_duration' => [
],
'task_expiry_duration_from_complete_after' => [
],
'task_expiry_duration_from_complete_before' => [
],
'task_expiry_state' => '',
'time_format' => '',
'timezone' => '',
'type' => '',
'url' => '',
'vatin' => '',
'website' => '',
'workers' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/accounts/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/"
payload = {
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": False,
"auto_assign_orders": False,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": False,
"feature_change_task_account": False,
"feature_document_signing": False,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": False,
"feature_navigation_use_address": False,
"feature_show_tutorial": False,
"feature_show_unassigned_to_workers": False,
"feature_task_accept": False,
"feature_task_created_sound": False,
"feature_task_reject": False,
"feature_tracker_reviews_allowed": False,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": False,
"owner": "",
"reference_autogenerate": False,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/"
payload <- "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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/accounts/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"address\": \"\",\n \"assignee_proximity_radius\": 0,\n \"auto_assign_max_distance\": 0,\n \"auto_assign_max_tasks\": 0,\n \"auto_assign_optimize\": false,\n \"auto_assign_orders\": false,\n \"auto_assign_rotate\": {},\n \"auto_assign_time_before\": \"\",\n \"billing_address\": \"\",\n \"billing_company\": \"\",\n \"billing_country\": \"\",\n \"billing_email\": \"\",\n \"billing_method\": \"\",\n \"billing_name\": \"\",\n \"billing_phone\": \"\",\n \"billing_vatin\": \"\",\n \"calendar_task_template\": \"\",\n \"country_code\": \"\",\n \"custom_integration_url\": \"\",\n \"dashboard_task_template\": \"\",\n \"dashboard_worker_limit\": 0,\n \"date_format\": \"\",\n \"distance_units\": \"\",\n \"email\": \"\",\n \"feature_address_autosuggest_provider\": \"\",\n \"feature_app_task_search\": false,\n \"feature_change_task_account\": false,\n \"feature_document_signing\": false,\n \"feature_geocoding_country_code\": \"\",\n \"feature_navigation_app_selection\": false,\n \"feature_navigation_use_address\": false,\n \"feature_show_tutorial\": false,\n \"feature_show_unassigned_to_workers\": false,\n \"feature_task_accept\": false,\n \"feature_task_created_sound\": false,\n \"feature_task_reject\": false,\n \"feature_tracker_reviews_allowed\": false,\n \"id\": \"\",\n \"language\": \"\",\n \"managers\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"optimization_objective\": \"\",\n \"optimize_after_create\": false,\n \"owner\": \"\",\n \"reference_autogenerate\": false,\n \"reference_length\": 0,\n \"reference_offset\": 0,\n \"reference_prefix\": \"\",\n \"registry_code\": \"\",\n \"review_emails\": [],\n \"route_end_address\": \"\",\n \"route_start_address\": \"\",\n \"slug\": \"\",\n \"state\": \"\",\n \"stripe_customer_id\": \"\",\n \"stripe_payment_method_id\": \"\",\n \"task_duration\": {},\n \"task_expiry_duration_from_complete_after\": {},\n \"task_expiry_duration_from_complete_before\": {},\n \"task_expiry_state\": \"\",\n \"time_format\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"vatin\": \"\",\n \"website\": \"\",\n \"workers\": \"\"\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}}/accounts/:id/";
let payload = json!({
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": json!({}),
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": (),
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": (),
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": json!({}),
"task_expiry_duration_from_complete_after": json!({}),
"task_expiry_duration_from_complete_before": json!({}),
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/accounts/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}'
echo '{
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": {},
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": {},
"task_expiry_duration_from_complete_after": {},
"task_expiry_duration_from_complete_before": {},
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
}' | \
http PUT {{baseUrl}}/accounts/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "address": "",\n "assignee_proximity_radius": 0,\n "auto_assign_max_distance": 0,\n "auto_assign_max_tasks": 0,\n "auto_assign_optimize": false,\n "auto_assign_orders": false,\n "auto_assign_rotate": {},\n "auto_assign_time_before": "",\n "billing_address": "",\n "billing_company": "",\n "billing_country": "",\n "billing_email": "",\n "billing_method": "",\n "billing_name": "",\n "billing_phone": "",\n "billing_vatin": "",\n "calendar_task_template": "",\n "country_code": "",\n "custom_integration_url": "",\n "dashboard_task_template": "",\n "dashboard_worker_limit": 0,\n "date_format": "",\n "distance_units": "",\n "email": "",\n "feature_address_autosuggest_provider": "",\n "feature_app_task_search": false,\n "feature_change_task_account": false,\n "feature_document_signing": false,\n "feature_geocoding_country_code": "",\n "feature_navigation_app_selection": false,\n "feature_navigation_use_address": false,\n "feature_show_tutorial": false,\n "feature_show_unassigned_to_workers": false,\n "feature_task_accept": false,\n "feature_task_created_sound": false,\n "feature_task_reject": false,\n "feature_tracker_reviews_allowed": false,\n "id": "",\n "language": "",\n "managers": "",\n "name": "",\n "notification_emails": [],\n "optimization_objective": "",\n "optimize_after_create": false,\n "owner": "",\n "reference_autogenerate": false,\n "reference_length": 0,\n "reference_offset": 0,\n "reference_prefix": "",\n "registry_code": "",\n "review_emails": [],\n "route_end_address": "",\n "route_start_address": "",\n "slug": "",\n "state": "",\n "stripe_customer_id": "",\n "stripe_payment_method_id": "",\n "task_duration": {},\n "task_expiry_duration_from_complete_after": {},\n "task_expiry_duration_from_complete_before": {},\n "task_expiry_state": "",\n "time_format": "",\n "timezone": "",\n "type": "",\n "url": "",\n "vatin": "",\n "website": "",\n "workers": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"address": "",
"assignee_proximity_radius": 0,
"auto_assign_max_distance": 0,
"auto_assign_max_tasks": 0,
"auto_assign_optimize": false,
"auto_assign_orders": false,
"auto_assign_rotate": [],
"auto_assign_time_before": "",
"billing_address": "",
"billing_company": "",
"billing_country": "",
"billing_email": "",
"billing_method": "",
"billing_name": "",
"billing_phone": "",
"billing_vatin": "",
"calendar_task_template": "",
"country_code": "",
"custom_integration_url": "",
"dashboard_task_template": "",
"dashboard_worker_limit": 0,
"date_format": "",
"distance_units": "",
"email": "",
"feature_address_autosuggest_provider": "",
"feature_app_task_search": false,
"feature_change_task_account": false,
"feature_document_signing": false,
"feature_geocoding_country_code": "",
"feature_navigation_app_selection": false,
"feature_navigation_use_address": false,
"feature_show_tutorial": false,
"feature_show_unassigned_to_workers": false,
"feature_task_accept": false,
"feature_task_created_sound": false,
"feature_task_reject": false,
"feature_tracker_reviews_allowed": false,
"id": "",
"language": "",
"managers": "",
"name": "",
"notification_emails": [],
"optimization_objective": "",
"optimize_after_create": false,
"owner": "",
"reference_autogenerate": false,
"reference_length": 0,
"reference_offset": 0,
"reference_prefix": "",
"registry_code": "",
"review_emails": [],
"route_end_address": "",
"route_start_address": "",
"slug": "",
"state": "",
"stripe_customer_id": "",
"stripe_payment_method_id": "",
"task_duration": [],
"task_expiry_duration_from_complete_after": [],
"task_expiry_duration_from_complete_before": [],
"task_expiry_state": "",
"time_format": "",
"timezone": "",
"type": "",
"url": "",
"vatin": "",
"website": "",
"workers": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
accounts_workers_create
{{baseUrl}}/accounts/:id/workers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/workers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/:id/workers/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:display_name ""
:email ""
:first_name ""
:id ""
:is_on_duty false
:last_name ""
:phone ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/workers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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}}/accounts/:id/workers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/workers/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/workers/"
payload := strings.NewReader("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/accounts/:id/workers/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 141
{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/:id/workers/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/workers/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/:id/workers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/:id/workers/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/workers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"display_name":"","email":"","first_name":"","id":"","is_on_duty":false,"last_name":"","phone":"","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}}/accounts/:id/workers/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "is_on_duty": false,\n "last_name": "",\n "phone": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/workers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/accounts/:id/workers/',
headers: {
authorization: '{{apiKey}}',
'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({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/workers/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
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}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
display_name: '',
email: '',
first_name: '',
id: '',
is_on_duty: false,
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"display_name":"","email":"","first_name":"","id":"","is_on_duty":false,"last_name":"","phone":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"display_name": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"is_on_duty": @NO,
@"last_name": @"",
@"phone": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/workers/"]
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}}/accounts/:id/workers/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/workers/",
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([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/accounts/:id/workers/', [
'body' => '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'is_on_duty' => null,
'last_name' => '',
'phone' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/workers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/workers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/accounts/:id/workers/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/workers/"
payload = {
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": False,
"last_name": "",
"phone": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/workers/"
payload <- "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/workers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/accounts/:id/workers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"is_on_duty\": false,\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/workers/";
let payload = json!({
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/:id/workers/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}'
echo '{
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
}' | \
http POST {{baseUrl}}/accounts/:id/workers/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "is_on_duty": false,\n "last_name": "",\n "phone": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/:id/workers/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"is_on_duty": false,
"last_name": "",
"phone": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/workers/")! 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
accounts_workers_destroy
{{baseUrl}}/accounts/:id/workers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/workers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/accounts/:id/workers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/workers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/workers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/workers/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/workers/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/accounts/:id/workers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/accounts/:id/workers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/workers/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/workers/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/accounts/:id/workers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/workers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/workers/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/workers/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/workers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/accounts/:id/workers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/workers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/workers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/workers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/accounts/:id/workers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/workers/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/workers/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/accounts/:id/workers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/workers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/workers/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/workers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/accounts/:id/workers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/workers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/accounts/:id/workers/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/accounts/:id/workers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/workers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/workers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
accounts_workers_retrieve
{{baseUrl}}/accounts/:id/workers/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/:id/workers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accounts/:id/workers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/accounts/:id/workers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accounts/:id/workers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/:id/workers/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/:id/workers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accounts/:id/workers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accounts/:id/workers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/:id/workers/"))
.header("authorization", "{{apiKey}}")
.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}}/accounts/:id/workers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accounts/:id/workers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/accounts/:id/workers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/:id/workers/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accounts/:id/workers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/:id/workers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accounts/:id/workers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/accounts/:id/workers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/:id/workers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/:id/workers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/:id/workers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/:id/workers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accounts/:id/workers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accounts/:id/workers/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/:id/workers/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/:id/workers/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/accounts/:id/workers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/:id/workers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/:id/workers/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/:id/workers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accounts/:id/workers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/:id/workers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accounts/:id/workers/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/accounts/:id/workers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/accounts/:id/workers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/:id/workers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
addons_list
{{baseUrl}}/addons/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/addons/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/addons/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/addons/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/addons/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/addons/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/addons/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/addons/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/addons/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/addons/"))
.header("authorization", "{{apiKey}}")
.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}}/addons/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/addons/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/addons/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/addons/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/addons/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/addons/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/addons/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/addons/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/addons/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/addons/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/addons/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/addons/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/addons/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/addons/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/addons/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/addons/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/addons/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/addons/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/addons/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/addons/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/addons/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/addons/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/addons/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/addons/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/addons/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/addons/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/addons/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/addons/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/addons/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/addons/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
addons_retrieve
{{baseUrl}}/addons/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/addons/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/addons/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/addons/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/addons/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/addons/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/addons/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/addons/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/addons/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/addons/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/addons/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/addons/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/addons/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/addons/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/addons/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/addons/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/addons/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/addons/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/addons/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/addons/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/addons/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/addons/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/addons/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/addons/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/addons/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/addons/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/addons/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/addons/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/addons/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/addons/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/addons/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/addons/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/addons/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/addons/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/addons/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/addons/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/addons/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/addons/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/addons/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/addons/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authenticate_create
{{baseUrl}}/authenticate/
BODY json
{
"password": "",
"token": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/authenticate/");
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 \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/authenticate/" {:content-type :json
:form-params {:password ""
:token ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/authenticate/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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}}/authenticate/"),
Content = new StringContent("{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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}}/authenticate/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/authenticate/"
payload := strings.NewReader("{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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/authenticate/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"password": "",
"token": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/authenticate/")
.setHeader("content-type", "application/json")
.setBody("{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/authenticate/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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 \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/authenticate/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/authenticate/")
.header("content-type", "application/json")
.body("{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
password: '',
token: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/authenticate/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/authenticate/',
headers: {'content-type': 'application/json'},
data: {password: '', token: '', username: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/authenticate/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"password":"","token":"","username":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/authenticate/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "password": "",\n "token": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/authenticate/")
.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/authenticate/',
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({password: '', token: '', username: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/authenticate/',
headers: {'content-type': 'application/json'},
body: {password: '', token: '', username: ''},
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}}/authenticate/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
password: '',
token: '',
username: ''
});
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}}/authenticate/',
headers: {'content-type': 'application/json'},
data: {password: '', token: '', username: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/authenticate/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"password":"","token":"","username":""}'
};
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 = @{ @"password": @"",
@"token": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/authenticate/"]
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}}/authenticate/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/authenticate/",
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([
'password' => '',
'token' => '',
'username' => ''
]),
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}}/authenticate/', [
'body' => '{
"password": "",
"token": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/authenticate/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'password' => '',
'token' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'password' => '',
'token' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/authenticate/');
$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}}/authenticate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"password": "",
"token": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/authenticate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"password": "",
"token": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/authenticate/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/authenticate/"
payload = {
"password": "",
"token": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/authenticate/"
payload <- "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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}}/authenticate/")
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 \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\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/authenticate/') do |req|
req.body = "{\n \"password\": \"\",\n \"token\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/authenticate/";
let payload = json!({
"password": "",
"token": "",
"username": ""
});
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}}/authenticate/ \
--header 'content-type: application/json' \
--data '{
"password": "",
"token": "",
"username": ""
}'
echo '{
"password": "",
"token": "",
"username": ""
}' | \
http POST {{baseUrl}}/authenticate/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "password": "",\n "token": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/authenticate/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"password": "",
"token": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/authenticate/")! 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
billing_customers_client_token_retrieve
{{baseUrl}}/billing/customers/:id/client_token/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/:id/client_token/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/customers/:id/client_token/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/customers/:id/client_token/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/customers/:id/client_token/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/customers/:id/client_token/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/:id/client_token/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/customers/:id/client_token/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/customers/:id/client_token/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/:id/client_token/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/customers/:id/client_token/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/customers/:id/client_token/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/customers/:id/client_token/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/customers/:id/client_token/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/:id/client_token/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/:id/client_token/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/client_token/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/customers/:id/client_token/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/customers/:id/client_token/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/customers/:id/client_token/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/customers/:id/client_token/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/:id/client_token/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/customers/:id/client_token/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/customers/:id/client_token/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/customers/:id/client_token/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/customers/:id/client_token/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/:id/client_token/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/customers/:id/client_token/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/:id/client_token/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/:id/client_token/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/customers/:id/client_token/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/:id/client_token/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/:id/client_token/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/:id/client_token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/customers/:id/client_token/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/customers/:id/client_token/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/customers/:id/client_token/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/customers/:id/client_token/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/customers/:id/client_token/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/:id/client_token/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
billing_customers_create
{{baseUrl}}/billing/customers/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/billing/customers/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:braintree_id ""
:company ""
:created_at ""
:email ""
:first_name ""
:id ""
:last_name ""
:payment_method_nonce ""
:phone ""
:updated_at ""
:url ""
:vat ""
:website ""}})
require "http/client"
url = "{{baseUrl}}/billing/customers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/billing/customers/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 252
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/billing/customers/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/customers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/billing/customers/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/billing/customers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/billing/customers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/billing/customers/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/billing/customers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
},
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}}/billing/customers/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
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}}/billing/customers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"braintree_id": @"",
@"company": @"",
@"created_at": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"payment_method_nonce": @"",
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @"",
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/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}}/billing/customers/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/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([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/billing/customers/', [
'body' => '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/billing/customers/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/billing/customers/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/"
payload = {
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/"
payload <- "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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/billing/customers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/customers/";
let payload = json!({
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/billing/customers/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
echo '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}' | \
http POST {{baseUrl}}/billing/customers/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/billing/customers/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_customers_list
{{baseUrl}}/billing/customers/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/customers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/customers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/customers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/customers/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/customers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/customers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/customers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/customers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/customers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/customers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/customers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/customers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/customers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/customers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/customers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/customers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/customers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/customers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/customers/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/customers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/customers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/customers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/customers/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/customers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/customers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
billing_customers_partial_update
{{baseUrl}}/billing/customers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/billing/customers/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:braintree_id ""
:company ""
:created_at ""
:email ""
:first_name ""
:id ""
:last_name ""
:payment_method_nonce ""
:phone ""
:updated_at ""
:url ""
:vat ""
:website ""}})
require "http/client"
url = "{{baseUrl}}/billing/customers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/billing/customers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/billing/customers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 252
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/billing/customers/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/billing/customers/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/billing/customers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/customers/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/billing/customers/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"braintree_id": @"",
@"company": @"",
@"created_at": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"payment_method_nonce": @"",
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @"",
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/customers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/customers/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/customers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/billing/customers/:id/', [
'body' => '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/billing/customers/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/billing/customers/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/:id/"
payload = {
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/:id/"
payload <- "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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.patch('/baseUrl/billing/customers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/:id/";
let payload = json!({
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/billing/customers/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
echo '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}' | \
http PATCH {{baseUrl}}/billing/customers/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/billing/customers/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_customers_retrieve
{{baseUrl}}/billing/customers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/customers/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/customers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/customers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/customers/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/customers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/customers/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/customers/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/customers/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/customers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/customers/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/customers/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/customers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/customers/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/customers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/customers/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/customers/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/customers/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/customers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/customers/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/customers/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/customers/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/customers/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
billing_customers_update
{{baseUrl}}/billing/customers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/customers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/billing/customers/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:braintree_id ""
:company ""
:created_at ""
:email ""
:first_name ""
:id ""
:last_name ""
:payment_method_nonce ""
:phone ""
:updated_at ""
:url ""
:vat ""
:website ""}})
require "http/client"
url = "{{baseUrl}}/billing/customers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/customers/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/billing/customers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 252
{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/billing/customers/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/customers/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/billing/customers/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/billing/customers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/customers/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/customers/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/billing/customers/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
},
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}}/billing/customers/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
});
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}}/billing/customers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
braintree_id: '',
company: '',
created_at: '',
email: '',
first_name: '',
id: '',
last_name: '',
payment_method_nonce: '',
phone: '',
updated_at: '',
url: '',
vat: '',
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/customers/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","braintree_id":"","company":"","created_at":"","email":"","first_name":"","id":"","last_name":"","payment_method_nonce":"","phone":"","updated_at":"","url":"","vat":"","website":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"braintree_id": @"",
@"company": @"",
@"created_at": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"payment_method_nonce": @"",
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @"",
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/customers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/customers/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/customers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/billing/customers/:id/', [
'body' => '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/customers/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'braintree_id' => '',
'company' => '',
'created_at' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'payment_method_nonce' => '',
'phone' => '',
'updated_at' => '',
'url' => '',
'vat' => '',
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/billing/customers/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/customers/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/customers/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/billing/customers/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/customers/:id/"
payload = {
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/customers/:id/"
payload <- "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/customers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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/billing/customers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"braintree_id\": \"\",\n \"company\": \"\",\n \"created_at\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"payment_method_nonce\": \"\",\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": \"\",\n \"website\": \"\"\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}}/billing/customers/:id/";
let payload = json!({
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/billing/customers/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}'
echo '{
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
}' | \
http PUT {{baseUrl}}/billing/customers/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "braintree_id": "",\n "company": "",\n "created_at": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "payment_method_nonce": "",\n "phone": "",\n "updated_at": "",\n "url": "",\n "vat": "",\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/billing/customers/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"braintree_id": "",
"company": "",
"created_at": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"payment_method_nonce": "",
"phone": "",
"updated_at": "",
"url": "",
"vat": "",
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/customers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_invoices_list
{{baseUrl}}/billing/invoices/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/invoices/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/invoices/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/invoices/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/invoices/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/invoices/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/invoices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/invoices/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/invoices/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/invoices/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/invoices/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/invoices/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/invoices/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/invoices/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/invoices/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/invoices/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/invoices/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/invoices/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/invoices/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/invoices/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/invoices/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/invoices/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/invoices/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/invoices/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/invoices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/invoices/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/invoices/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/invoices/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/invoices/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/invoices/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/invoices/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/invoices/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/invoices/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/invoices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/invoices/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/invoices/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/invoices/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/invoices/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/invoices/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/invoices/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
billing_invoices_mark_as_paid_create
{{baseUrl}}/billing/invoices/:id/mark_as_paid/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/invoices/:id/mark_as_paid/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/billing/invoices/:id/mark_as_paid/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:billing_method ""
:confirmed_at ""
:confirmed_by ""
:created_at ""
:currency ""
:due_date ""
:id ""
:items [{:created_at ""
:id ""
:invoice ""
:name ""
:quantity ""
:total ""
:unit ""
:unit_price ""
:updated_at ""}]
:paid_at ""
:period []
:pricing ""
:state ""
:total_no_vat ""
:total_vat ""
:total_with_vat ""
:updated_at ""
:url ""
:vat false}})
require "http/client"
url = "{{baseUrl}}/billing/invoices/:id/mark_as_paid/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/billing/invoices/:id/mark_as_paid/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/mark_as_paid/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/invoices/:id/mark_as_paid/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/billing/invoices/:id/mark_as_paid/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 549
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/billing/invoices/:id/mark_as_paid/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/invoices/:id/mark_as_paid/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/mark_as_paid/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/billing/invoices/:id/mark_as_paid/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/billing/invoices/:id/mark_as_paid/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/billing/invoices/:id/mark_as_paid/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/invoices/:id/mark_as_paid/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":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}}/billing/invoices/:id/mark_as_paid/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/mark_as_paid/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/billing/invoices/:id/mark_as_paid/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/billing/invoices/:id/mark_as_paid/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/billing/invoices/:id/mark_as_paid/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/billing/invoices/:id/mark_as_paid/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/invoices/:id/mark_as_paid/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"billing_method": @"",
@"confirmed_at": @"",
@"confirmed_by": @"",
@"created_at": @"",
@"currency": @"",
@"due_date": @"",
@"id": @"",
@"items": @[ @{ @"created_at": @"", @"id": @"", @"invoice": @"", @"name": @"", @"quantity": @"", @"total": @"", @"unit": @"", @"unit_price": @"", @"updated_at": @"" } ],
@"paid_at": @"",
@"period": @[ ],
@"pricing": @"",
@"state": @"",
@"total_no_vat": @"",
@"total_vat": @"",
@"total_with_vat": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/invoices/:id/mark_as_paid/"]
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}}/billing/invoices/:id/mark_as_paid/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/invoices/:id/mark_as_paid/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/billing/invoices/:id/mark_as_paid/', [
'body' => '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/invoices/:id/mark_as_paid/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
$request->setRequestUrl('{{baseUrl}}/billing/invoices/:id/mark_as_paid/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/invoices/:id/mark_as_paid/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/invoices/:id/mark_as_paid/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/billing/invoices/:id/mark_as_paid/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/invoices/:id/mark_as_paid/"
payload = {
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/invoices/:id/mark_as_paid/"
payload <- "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/invoices/:id/mark_as_paid/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/billing/invoices/:id/mark_as_paid/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/invoices/:id/mark_as_paid/";
let payload = json!({
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": (
json!({
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
})
),
"paid_at": "",
"period": (),
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/billing/invoices/:id/mark_as_paid/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
echo '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}' | \
http POST {{baseUrl}}/billing/invoices/:id/mark_as_paid/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": false\n}' \
--output-document \
- {{baseUrl}}/billing/invoices/:id/mark_as_paid/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
[
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
]
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/invoices/:id/mark_as_paid/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
billing_invoices_partial_update
{{baseUrl}}/billing/invoices/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/invoices/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/billing/invoices/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:billing_method ""
:confirmed_at ""
:confirmed_by ""
:created_at ""
:currency ""
:due_date ""
:id ""
:items [{:created_at ""
:id ""
:invoice ""
:name ""
:quantity ""
:total ""
:unit ""
:unit_price ""
:updated_at ""}]
:paid_at ""
:period []
:pricing ""
:state ""
:total_no_vat ""
:total_vat ""
:total_with_vat ""
:updated_at ""
:url ""
:vat false}})
require "http/client"
url = "{{baseUrl}}/billing/invoices/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/billing/invoices/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/invoices/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/billing/invoices/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 549
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/billing/invoices/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/invoices/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/billing/invoices/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/billing/invoices/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":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}}/billing/invoices/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/invoices/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: 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('PATCH', '{{baseUrl}}/billing/invoices/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: 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: 'PATCH',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"billing_method": @"",
@"confirmed_at": @"",
@"confirmed_by": @"",
@"created_at": @"",
@"currency": @"",
@"due_date": @"",
@"id": @"",
@"items": @[ @{ @"created_at": @"", @"id": @"", @"invoice": @"", @"name": @"", @"quantity": @"", @"total": @"", @"unit": @"", @"unit_price": @"", @"updated_at": @"" } ],
@"paid_at": @"",
@"period": @[ ],
@"pricing": @"",
@"state": @"",
@"total_no_vat": @"",
@"total_vat": @"",
@"total_with_vat": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/invoices/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/invoices/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/invoices/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/billing/invoices/:id/', [
'body' => '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
$request->setRequestUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/invoices/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/invoices/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/billing/invoices/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/invoices/:id/"
payload = {
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/invoices/:id/"
payload <- "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/invoices/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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.patch('/baseUrl/billing/invoices/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/";
let payload = json!({
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": (
json!({
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
})
),
"paid_at": "",
"period": (),
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/billing/invoices/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
echo '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}' | \
http PATCH {{baseUrl}}/billing/invoices/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": false\n}' \
--output-document \
- {{baseUrl}}/billing/invoices/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
[
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
]
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/invoices/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_invoices_retrieve
{{baseUrl}}/billing/invoices/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/invoices/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/invoices/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/invoices/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/invoices/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/invoices/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/invoices/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/invoices/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/invoices/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/invoices/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/invoices/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/invoices/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/invoices/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/invoices/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/invoices/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/invoices/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/invoices/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/invoices/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/invoices/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/invoices/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/invoices/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/invoices/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/invoices/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/invoices/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/invoices/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/invoices/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/invoices/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/invoices/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/invoices/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/invoices/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/invoices/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/invoices/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
billing_invoices_update
{{baseUrl}}/billing/invoices/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/invoices/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/billing/invoices/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:billing_method ""
:confirmed_at ""
:confirmed_by ""
:created_at ""
:currency ""
:due_date ""
:id ""
:items [{:created_at ""
:id ""
:invoice ""
:name ""
:quantity ""
:total ""
:unit ""
:unit_price ""
:updated_at ""}]
:paid_at ""
:period []
:pricing ""
:state ""
:total_no_vat ""
:total_vat ""
:total_with_vat ""
:updated_at ""
:url ""
:vat false}})
require "http/client"
url = "{{baseUrl}}/billing/invoices/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/invoices/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/billing/invoices/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 549
{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/billing/invoices/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/invoices/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/billing/invoices/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: 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}}/billing/invoices/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":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}}/billing/invoices/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": 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 \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/billing/invoices/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/billing/invoices/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: 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}}/billing/invoices/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: 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}}/billing/invoices/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
billing_method: '',
confirmed_at: '',
confirmed_by: '',
created_at: '',
currency: '',
due_date: '',
id: '',
items: [
{
created_at: '',
id: '',
invoice: '',
name: '',
quantity: '',
total: '',
unit: '',
unit_price: '',
updated_at: ''
}
],
paid_at: '',
period: [],
pricing: '',
state: '',
total_no_vat: '',
total_vat: '',
total_with_vat: '',
updated_at: '',
url: '',
vat: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/invoices/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","billing_method":"","confirmed_at":"","confirmed_by":"","created_at":"","currency":"","due_date":"","id":"","items":[{"created_at":"","id":"","invoice":"","name":"","quantity":"","total":"","unit":"","unit_price":"","updated_at":""}],"paid_at":"","period":[],"pricing":"","state":"","total_no_vat":"","total_vat":"","total_with_vat":"","updated_at":"","url":"","vat":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"billing_method": @"",
@"confirmed_at": @"",
@"confirmed_by": @"",
@"created_at": @"",
@"currency": @"",
@"due_date": @"",
@"id": @"",
@"items": @[ @{ @"created_at": @"", @"id": @"", @"invoice": @"", @"name": @"", @"quantity": @"", @"total": @"", @"unit": @"", @"unit_price": @"", @"updated_at": @"" } ],
@"paid_at": @"",
@"period": @[ ],
@"pricing": @"",
@"state": @"",
@"total_no_vat": @"",
@"total_vat": @"",
@"total_with_vat": @"",
@"updated_at": @"",
@"url": @"",
@"vat": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/invoices/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/invoices/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/invoices/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/billing/invoices/:id/', [
'body' => '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'billing_method' => '',
'confirmed_at' => '',
'confirmed_by' => '',
'created_at' => '',
'currency' => '',
'due_date' => '',
'id' => '',
'items' => [
[
'created_at' => '',
'id' => '',
'invoice' => '',
'name' => '',
'quantity' => '',
'total' => '',
'unit' => '',
'unit_price' => '',
'updated_at' => ''
]
],
'paid_at' => '',
'period' => [
],
'pricing' => '',
'state' => '',
'total_no_vat' => '',
'total_vat' => '',
'total_with_vat' => '',
'updated_at' => '',
'url' => '',
'vat' => null
]));
$request->setRequestUrl('{{baseUrl}}/billing/invoices/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/invoices/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/invoices/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/billing/invoices/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/invoices/:id/"
payload = {
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/invoices/:id/"
payload <- "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/invoices/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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/billing/invoices/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"billing_method\": \"\",\n \"confirmed_at\": \"\",\n \"confirmed_by\": \"\",\n \"created_at\": \"\",\n \"currency\": \"\",\n \"due_date\": \"\",\n \"id\": \"\",\n \"items\": [\n {\n \"created_at\": \"\",\n \"id\": \"\",\n \"invoice\": \"\",\n \"name\": \"\",\n \"quantity\": \"\",\n \"total\": \"\",\n \"unit\": \"\",\n \"unit_price\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"paid_at\": \"\",\n \"period\": [],\n \"pricing\": \"\",\n \"state\": \"\",\n \"total_no_vat\": \"\",\n \"total_vat\": \"\",\n \"total_with_vat\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"vat\": 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}}/billing/invoices/:id/";
let payload = json!({
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": (
json!({
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
})
),
"paid_at": "",
"period": (),
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/billing/invoices/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}'
echo '{
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
{
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
}
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
}' | \
http PUT {{baseUrl}}/billing/invoices/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "billing_method": "",\n "confirmed_at": "",\n "confirmed_by": "",\n "created_at": "",\n "currency": "",\n "due_date": "",\n "id": "",\n "items": [\n {\n "created_at": "",\n "id": "",\n "invoice": "",\n "name": "",\n "quantity": "",\n "total": "",\n "unit": "",\n "unit_price": "",\n "updated_at": ""\n }\n ],\n "paid_at": "",\n "period": [],\n "pricing": "",\n "state": "",\n "total_no_vat": "",\n "total_vat": "",\n "total_with_vat": "",\n "updated_at": "",\n "url": "",\n "vat": false\n}' \
--output-document \
- {{baseUrl}}/billing/invoices/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"billing_method": "",
"confirmed_at": "",
"confirmed_by": "",
"created_at": "",
"currency": "",
"due_date": "",
"id": "",
"items": [
[
"created_at": "",
"id": "",
"invoice": "",
"name": "",
"quantity": "",
"total": "",
"unit": "",
"unit_price": "",
"updated_at": ""
]
],
"paid_at": "",
"period": [],
"pricing": "",
"state": "",
"total_no_vat": "",
"total_vat": "",
"total_with_vat": "",
"updated_at": "",
"url": "",
"vat": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/invoices/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_stripe_payments_list
{{baseUrl}}/billing/stripe_payments/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/stripe_payments/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/stripe_payments/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/stripe_payments/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/stripe_payments/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/stripe_payments/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/stripe_payments/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/stripe_payments/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/stripe_payments/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/stripe_payments/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/stripe_payments/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/stripe_payments/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/stripe_payments/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/stripe_payments/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/stripe_payments/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/stripe_payments/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/stripe_payments/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/stripe_payments/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/stripe_payments/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/stripe_payments/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/stripe_payments/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/stripe_payments/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/stripe_payments/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/stripe_payments/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/stripe_payments/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/stripe_payments/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/stripe_payments/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/stripe_payments/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/stripe_payments/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/stripe_payments/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/stripe_payments/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/stripe_payments/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/stripe_payments/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/stripe_payments/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/stripe_payments/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/stripe_payments/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/stripe_payments/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/stripe_payments/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/stripe_payments/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/stripe_payments/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_stripe_payments_retrieve
{{baseUrl}}/billing/stripe_payments/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/stripe_payments/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/stripe_payments/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/stripe_payments/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/stripe_payments/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/stripe_payments/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/stripe_payments/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/stripe_payments/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/stripe_payments/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/stripe_payments/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/stripe_payments/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/stripe_payments/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/stripe_payments/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/stripe_payments/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/stripe_payments/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/stripe_payments/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/stripe_payments/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/stripe_payments/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/stripe_payments/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/stripe_payments/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/stripe_payments/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/stripe_payments/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/stripe_payments/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/stripe_payments/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/stripe_payments/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/stripe_payments/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/stripe_payments/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/stripe_payments/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/stripe_payments/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/stripe_payments/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/stripe_payments/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/stripe_payments/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/stripe_payments/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/stripe_payments/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/stripe_payments/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/stripe_payments/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/stripe_payments/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/stripe_payments/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/stripe_payments/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/stripe_payments/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_transactions_list
{{baseUrl}}/billing/transactions/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/transactions/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/transactions/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/transactions/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/transactions/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/transactions/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/transactions/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/transactions/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/transactions/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/transactions/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/transactions/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/transactions/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/transactions/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/transactions/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/transactions/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/transactions/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/transactions/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/transactions/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/transactions/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/transactions/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/transactions/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/transactions/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/transactions/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/transactions/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/transactions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/transactions/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/transactions/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/transactions/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/transactions/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/transactions/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/transactions/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/transactions/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/transactions/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/transactions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/transactions/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/transactions/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/transactions/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/transactions/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/transactions/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/transactions/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
billing_transactions_retrieve
{{baseUrl}}/billing/transactions/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/billing/transactions/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/billing/transactions/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/billing/transactions/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/billing/transactions/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/billing/transactions/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/billing/transactions/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/billing/transactions/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/billing/transactions/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/billing/transactions/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/billing/transactions/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/billing/transactions/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/billing/transactions/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/billing/transactions/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/billing/transactions/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/billing/transactions/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/billing/transactions/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/billing/transactions/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/billing/transactions/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/billing/transactions/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/billing/transactions/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/billing/transactions/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/billing/transactions/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/billing/transactions/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/billing/transactions/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/billing/transactions/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/billing/transactions/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/billing/transactions/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/billing/transactions/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/billing/transactions/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/billing/transactions/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/billing/transactions/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/billing/transactions/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/billing/transactions/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/billing/transactions/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/billing/transactions/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/billing/transactions/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/billing/transactions/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/billing/transactions/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/billing/transactions/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
client_roles_create
{{baseUrl}}/client_roles/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/client_roles/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:client ""
:created_at ""
:id ""
:is_active false
:is_manager false
:phone ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/client_roles/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/client_roles/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 174
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/client_roles/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/client_roles/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/client_roles/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/client_roles/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/client_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/client_roles/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/client_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
},
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}}/client_roles/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
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}}/client_roles/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"client": @"",
@"created_at": @"",
@"id": @"",
@"is_active": @NO,
@"is_manager": @NO,
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/"]
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}}/client_roles/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/client_roles/', [
'body' => '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/client_roles/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/client_roles/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/"
payload = {
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": False,
"is_manager": False,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/"
payload <- "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/client_roles/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/client_roles/";
let payload = json!({
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/client_roles/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http POST {{baseUrl}}/client_roles/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/client_roles/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/")! 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
client_roles_list
{{baseUrl}}/client_roles/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/client_roles/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/client_roles/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/client_roles/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/client_roles/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/client_roles/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/client_roles/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/"))
.header("authorization", "{{apiKey}}")
.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}}/client_roles/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/client_roles/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/client_roles/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/client_roles/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/client_roles/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/client_roles/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/client_roles/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/client_roles/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/client_roles/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/client_roles/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/client_roles/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/client_roles/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/client_roles/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/client_roles/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/client_roles/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/client_roles/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/client_roles/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
client_roles_notify_create
{{baseUrl}}/client_roles/:id/notify/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/:id/notify/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/client_roles/:id/notify/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:client ""
:created_at ""
:id ""
:is_active false
:is_manager false
:phone ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/client_roles/:id/notify/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/notify/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/notify/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/:id/notify/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/client_roles/:id/notify/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 174
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/client_roles/:id/notify/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/:id/notify/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/client_roles/:id/notify/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/client_roles/:id/notify/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/client_roles/:id/notify/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/client_roles/:id/notify/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/:id/notify/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/:id/notify/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/:id/notify/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/client_roles/:id/notify/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/client_roles/:id/notify/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
},
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}}/client_roles/:id/notify/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
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}}/client_roles/:id/notify/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/:id/notify/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"client": @"",
@"created_at": @"",
@"id": @"",
@"is_active": @NO,
@"is_manager": @NO,
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/:id/notify/"]
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}}/client_roles/:id/notify/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/:id/notify/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/client_roles/:id/notify/', [
'body' => '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/:id/notify/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/client_roles/:id/notify/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/:id/notify/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/:id/notify/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/client_roles/:id/notify/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/:id/notify/"
payload = {
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": False,
"is_manager": False,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/:id/notify/"
payload <- "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/:id/notify/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/client_roles/:id/notify/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/client_roles/:id/notify/";
let payload = json!({
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/client_roles/:id/notify/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http POST {{baseUrl}}/client_roles/:id/notify/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/client_roles/:id/notify/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/:id/notify/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
client_roles_partial_update
{{baseUrl}}/client_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/client_roles/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:client ""
:created_at ""
:id ""
:is_active false
:is_manager false
:phone ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/client_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/client_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/client_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 174
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/client_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/client_roles/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/client_roles/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/client_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/client_roles/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/client_roles/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"client": @"",
@"created_at": @"",
@"id": @"",
@"is_active": @NO,
@"is_manager": @NO,
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/client_roles/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/client_roles/:id/', [
'body' => '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/client_roles/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/client_roles/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/:id/"
payload = {
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": False,
"is_manager": False,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/:id/"
payload <- "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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.patch('/baseUrl/client_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/";
let payload = json!({
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/client_roles/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http PATCH {{baseUrl}}/client_roles/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/client_roles/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
client_roles_retrieve
{{baseUrl}}/client_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/client_roles/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/client_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/client_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/client_roles/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/client_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/client_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/client_roles/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/client_roles/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/client_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/client_roles/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/client_roles/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/client_roles/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/client_roles/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/client_roles/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/client_roles/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/client_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/client_roles/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/client_roles/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/client_roles/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/client_roles/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
client_roles_update
{{baseUrl}}/client_roles/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/client_roles/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/client_roles/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:client ""
:created_at ""
:id ""
:is_active false
:is_manager false
:phone ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/client_roles/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/client_roles/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/client_roles/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 174
{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/client_roles/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/client_roles/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/client_roles/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/client_roles/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/client_roles/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/client_roles/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/client_roles/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/client_roles/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/client_roles/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
},
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}}/client_roles/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
});
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}}/client_roles/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
client: '',
created_at: '',
id: '',
is_active: false,
is_manager: false,
phone: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/client_roles/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","client":"","created_at":"","id":"","is_active":false,"is_manager":false,"phone":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"client": @"",
@"created_at": @"",
@"id": @"",
@"is_active": @NO,
@"is_manager": @NO,
@"phone": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/client_roles/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/client_roles/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/client_roles/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/client_roles/:id/', [
'body' => '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/client_roles/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'client' => '',
'created_at' => '',
'id' => '',
'is_active' => null,
'is_manager' => null,
'phone' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/client_roles/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/client_roles/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/client_roles/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/client_roles/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/client_roles/:id/"
payload = {
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": False,
"is_manager": False,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/client_roles/:id/"
payload <- "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/client_roles/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/client_roles/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"client\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"is_manager\": false,\n \"phone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/client_roles/:id/";
let payload = json!({
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/client_roles/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http PUT {{baseUrl}}/client_roles/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "client": "",\n "created_at": "",\n "id": "",\n "is_active": false,\n "is_manager": false,\n "phone": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/client_roles/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"client": "",
"created_at": "",
"id": "",
"is_active": false,
"is_manager": false,
"phone": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/client_roles/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
clients_create
{{baseUrl}}/clients/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clients/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/clients/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:archived false
:contact_addresses [{}]
:created_at ""
:id ""
:name ""
:slug ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/clients/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/clients/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clients/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clients/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/clients/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 170
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/clients/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clients/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/clients/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/clients/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
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}}/clients/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/clients/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clients/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","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}}/clients/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/clients/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/clients/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/clients/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
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}}/clients/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
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}}/clients/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clients/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"archived": @NO,
@"contact_addresses": @[ @{ } ],
@"created_at": @"",
@"id": @"",
@"name": @"",
@"slug": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clients/"]
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}}/clients/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clients/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/clients/', [
'body' => '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clients/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/clients/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clients/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clients/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/clients/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clients/"
payload = {
"account": "",
"archived": False,
"contact_addresses": [{}],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clients/"
payload <- "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clients/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/clients/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clients/";
let payload = json!({
"account": "",
"archived": false,
"contact_addresses": (json!({})),
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/clients/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/clients/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/clients/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"archived": false,
"contact_addresses": [[]],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clients/")! 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
clients_list
{{baseUrl}}/clients/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clients/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/clients/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/clients/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/clients/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clients/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clients/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/clients/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/clients/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clients/"))
.header("authorization", "{{apiKey}}")
.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}}/clients/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/clients/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/clients/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/clients/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clients/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/clients/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/clients/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/clients/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/clients/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/clients/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/clients/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clients/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clients/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/clients/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clients/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/clients/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clients/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/clients/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clients/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clients/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/clients/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clients/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clients/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clients/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/clients/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clients/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/clients/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/clients/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/clients/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clients/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
clients_partial_update
{{baseUrl}}/clients/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clients/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/clients/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:archived false
:contact_addresses [{}]
:created_at ""
:id ""
:name ""
:slug ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/clients/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/clients/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clients/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clients/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/clients/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 170
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/clients/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clients/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/clients/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/clients/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/clients/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clients/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","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}}/clients/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/clients/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/clients/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
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('PATCH', '{{baseUrl}}/clients/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clients/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"archived": @NO,
@"contact_addresses": @[ @{ } ],
@"created_at": @"",
@"id": @"",
@"name": @"",
@"slug": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clients/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/clients/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clients/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/clients/:id/', [
'body' => '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clients/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/clients/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clients/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clients/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/clients/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clients/:id/"
payload = {
"account": "",
"archived": False,
"contact_addresses": [{}],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clients/:id/"
payload <- "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clients/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/clients/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clients/:id/";
let payload = json!({
"account": "",
"archived": false,
"contact_addresses": (json!({})),
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/clients/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/clients/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/clients/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"archived": false,
"contact_addresses": [[]],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clients/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
clients_retrieve
{{baseUrl}}/clients/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clients/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/clients/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/clients/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/clients/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clients/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clients/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/clients/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/clients/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clients/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/clients/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/clients/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/clients/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clients/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/clients/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/clients/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/clients/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/clients/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/clients/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/clients/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clients/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clients/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/clients/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clients/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/clients/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clients/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/clients/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clients/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clients/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/clients/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clients/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clients/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clients/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/clients/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clients/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/clients/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/clients/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/clients/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clients/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
clients_update
{{baseUrl}}/clients/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clients/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/clients/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:archived false
:contact_addresses [{}]
:created_at ""
:id ""
:name ""
:slug ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/clients/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/clients/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clients/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clients/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/clients/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 170
{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/clients/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clients/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/clients/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/clients/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/clients/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clients/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","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}}/clients/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/clients/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/clients/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/clients/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
archived: false,
contact_addresses: [
{}
],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/clients/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
archived: false,
contact_addresses: [{}],
created_at: '',
id: '',
name: '',
slug: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clients/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","archived":false,"contact_addresses":[{}],"created_at":"","id":"","name":"","slug":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"archived": @NO,
@"contact_addresses": @[ @{ } ],
@"created_at": @"",
@"id": @"",
@"name": @"",
@"slug": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clients/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/clients/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clients/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/clients/:id/', [
'body' => '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/clients/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'archived' => null,
'contact_addresses' => [
[
]
],
'created_at' => '',
'id' => '',
'name' => '',
'slug' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/clients/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clients/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clients/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/clients/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clients/:id/"
payload = {
"account": "",
"archived": False,
"contact_addresses": [{}],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clients/:id/"
payload <- "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clients/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/clients/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"archived\": false,\n \"contact_addresses\": [\n {}\n ],\n \"created_at\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"slug\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clients/:id/";
let payload = json!({
"account": "",
"archived": false,
"contact_addresses": (json!({})),
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/clients/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"archived": false,
"contact_addresses": [
{}
],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/clients/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "archived": false,\n "contact_addresses": [\n {}\n ],\n "created_at": "",\n "id": "",\n "name": "",\n "slug": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/clients/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"archived": false,
"contact_addresses": [[]],
"created_at": "",
"id": "",
"name": "",
"slug": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clients/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
configurations_list
{{baseUrl}}/configurations/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/configurations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/configurations/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/configurations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/configurations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/configurations/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/configurations/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/configurations/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/configurations/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/configurations/"))
.header("authorization", "{{apiKey}}")
.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}}/configurations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/configurations/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/configurations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/configurations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/configurations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/configurations/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/configurations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/configurations/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/configurations/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/configurations/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/configurations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/configurations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/configurations/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/configurations/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/configurations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/configurations/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/configurations/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/configurations/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/configurations/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/configurations/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/configurations/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/configurations/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/configurations/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/configurations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/configurations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/configurations/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/configurations/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/configurations/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/configurations/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/configurations/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
contact_address_exports_list
{{baseUrl}}/contact_address_exports/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_address_exports/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/contact_address_exports/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/contact_address_exports/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/contact_address_exports/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_address_exports/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_address_exports/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/contact_address_exports/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/contact_address_exports/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_address_exports/"))
.header("authorization", "{{apiKey}}")
.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}}/contact_address_exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/contact_address_exports/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/contact_address_exports/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/contact_address_exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_address_exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact_address_exports/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/contact_address_exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_address_exports/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/contact_address_exports/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/contact_address_exports/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/contact_address_exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_address_exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_address_exports/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_address_exports/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_address_exports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/contact_address_exports/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_address_exports/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/contact_address_exports/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_address_exports/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_address_exports/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/contact_address_exports/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_address_exports/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_address_exports/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_address_exports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/contact_address_exports/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_address_exports/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/contact_address_exports/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/contact_address_exports/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/contact_address_exports/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_address_exports/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
contact_address_import_create
{{baseUrl}}/contact_address_import/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_address_import/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/contact_address_import/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:celery_task_id ""
:completed_at ""
:contact_addresses_created []
:contact_addresses_data [{}]
:created_at ""
:created_by ""
:errors {}
:failed_at ""
:id ""
:started_at ""
:state ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/contact_address_import/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/contact_address_import/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_address_import/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_address_import/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/contact_address_import/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/contact_address_import/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_address_import/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/contact_address_import/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/contact_address_import/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [
{}
],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
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}}/contact_address_import/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/contact_address_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [{}],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_address_import/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","celery_task_id":"","completed_at":"","contact_addresses_created":[],"contact_addresses_data":[{}],"created_at":"","created_by":"","errors":{},"failed_at":"","id":"","started_at":"","state":"","updated_at":"","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}}/contact_address_import/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "celery_task_id": "",\n "completed_at": "",\n "contact_addresses_created": [],\n "contact_addresses_data": [\n {}\n ],\n "created_at": "",\n "created_by": "",\n "errors": {},\n "failed_at": "",\n "id": "",\n "started_at": "",\n "state": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/contact_address_import/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/contact_address_import/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [{}],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/contact_address_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [{}],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
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}}/contact_address_import/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [
{}
],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
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}}/contact_address_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
celery_task_id: '',
completed_at: '',
contact_addresses_created: [],
contact_addresses_data: [{}],
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
started_at: '',
state: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_address_import/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","celery_task_id":"","completed_at":"","contact_addresses_created":[],"contact_addresses_data":[{}],"created_at":"","created_by":"","errors":{},"failed_at":"","id":"","started_at":"","state":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"celery_task_id": @"",
@"completed_at": @"",
@"contact_addresses_created": @[ ],
@"contact_addresses_data": @[ @{ } ],
@"created_at": @"",
@"created_by": @"",
@"errors": @{ },
@"failed_at": @"",
@"id": @"",
@"started_at": @"",
@"state": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_address_import/"]
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}}/contact_address_import/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_address_import/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'celery_task_id' => '',
'completed_at' => '',
'contact_addresses_created' => [
],
'contact_addresses_data' => [
[
]
],
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'started_at' => '',
'state' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/contact_address_import/', [
'body' => '{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_address_import/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'celery_task_id' => '',
'completed_at' => '',
'contact_addresses_created' => [
],
'contact_addresses_data' => [
[
]
],
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'started_at' => '',
'state' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'celery_task_id' => '',
'completed_at' => '',
'contact_addresses_created' => [
],
'contact_addresses_data' => [
[
]
],
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'started_at' => '',
'state' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/contact_address_import/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_address_import/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_address_import/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/contact_address_import/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_address_import/"
payload = {
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [{}],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_address_import/"
payload <- "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_address_import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/contact_address_import/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"contact_addresses_created\": [],\n \"contact_addresses_data\": [\n {}\n ],\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_address_import/";
let payload = json!({
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": (),
"contact_addresses_data": (json!({})),
"created_at": "",
"created_by": "",
"errors": json!({}),
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/contact_address_import/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [
{}
],
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/contact_address_import/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "celery_task_id": "",\n "completed_at": "",\n "contact_addresses_created": [],\n "contact_addresses_data": [\n {}\n ],\n "created_at": "",\n "created_by": "",\n "errors": {},\n "failed_at": "",\n "id": "",\n "started_at": "",\n "state": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/contact_address_import/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"celery_task_id": "",
"completed_at": "",
"contact_addresses_created": [],
"contact_addresses_data": [[]],
"created_at": "",
"created_by": "",
"errors": [],
"failed_at": "",
"id": "",
"started_at": "",
"state": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_address_import/")! 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
contact_address_import_list
{{baseUrl}}/contact_address_import/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_address_import/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/contact_address_import/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/contact_address_import/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/contact_address_import/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_address_import/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_address_import/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/contact_address_import/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/contact_address_import/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_address_import/"))
.header("authorization", "{{apiKey}}")
.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}}/contact_address_import/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/contact_address_import/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/contact_address_import/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/contact_address_import/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_address_import/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact_address_import/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/contact_address_import/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_address_import/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/contact_address_import/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/contact_address_import/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/contact_address_import/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_address_import/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_address_import/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_address_import/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_address_import/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/contact_address_import/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_address_import/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/contact_address_import/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_address_import/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_address_import/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/contact_address_import/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_address_import/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_address_import/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_address_import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/contact_address_import/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_address_import/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/contact_address_import/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/contact_address_import/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/contact_address_import/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_address_import/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
contact_address_import_retrieve
{{baseUrl}}/contact_address_import/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_address_import/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/contact_address_import/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/contact_address_import/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/contact_address_import/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_address_import/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_address_import/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/contact_address_import/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/contact_address_import/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_address_import/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/contact_address_import/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/contact_address_import/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/contact_address_import/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/contact_address_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_address_import/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact_address_import/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/contact_address_import/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_address_import/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/contact_address_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/contact_address_import/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/contact_address_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_address_import/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_address_import/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_address_import/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_address_import/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/contact_address_import/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_address_import/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/contact_address_import/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_address_import/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_address_import/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/contact_address_import/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_address_import/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_address_import/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_address_import/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/contact_address_import/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_address_import/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/contact_address_import/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/contact_address_import/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/contact_address_import/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_address_import/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
contact_addresses_create
{{baseUrl}}/contact_addresses/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_addresses/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/contact_addresses/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:client ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:created_at ""
:external_id ""
:id ""
:is_orderer false
:is_receiver false
:source ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/contact_addresses/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/contact_addresses/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_addresses/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_addresses/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/contact_addresses/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 659
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/contact_addresses/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_addresses/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/contact_addresses/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/contact_addresses/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
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}}/contact_addresses/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/contact_addresses/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_addresses/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","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}}/contact_addresses/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/contact_addresses/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/contact_addresses/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/contact_addresses/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
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}}/contact_addresses/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
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}}/contact_addresses/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_addresses/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"client": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"created_at": @"",
@"external_id": @"",
@"id": @"",
@"is_orderer": @NO,
@"is_receiver": @NO,
@"source": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_addresses/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_addresses/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_addresses/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/contact_addresses/', [
'body' => '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_addresses/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/contact_addresses/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_addresses/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_addresses/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/contact_addresses/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_addresses/"
payload = {
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": False,
"is_receiver": False,
"source": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_addresses/"
payload <- "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_addresses/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/contact_addresses/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_addresses/";
let payload = json!({
"account": "",
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"client": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/contact_addresses/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/contact_addresses/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/contact_addresses/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"client": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_addresses/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
contact_addresses_list
{{baseUrl}}/contact_addresses/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_addresses/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/contact_addresses/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/contact_addresses/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/contact_addresses/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_addresses/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_addresses/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/contact_addresses/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/contact_addresses/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_addresses/"))
.header("authorization", "{{apiKey}}")
.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}}/contact_addresses/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/contact_addresses/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/contact_addresses/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/contact_addresses/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_addresses/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact_addresses/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/contact_addresses/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_addresses/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/contact_addresses/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/contact_addresses/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/contact_addresses/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_addresses/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_addresses/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_addresses/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_addresses/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/contact_addresses/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_addresses/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/contact_addresses/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_addresses/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_addresses/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/contact_addresses/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_addresses/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_addresses/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_addresses/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/contact_addresses/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_addresses/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/contact_addresses/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/contact_addresses/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/contact_addresses/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_addresses/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
contact_addresses_partial_update
{{baseUrl}}/contact_addresses/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_addresses/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/contact_addresses/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:client ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:created_at ""
:external_id ""
:id ""
:is_orderer false
:is_receiver false
:source ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/contact_addresses/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/contact_addresses/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_addresses/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_addresses/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/contact_addresses/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 659
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/contact_addresses/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_addresses/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/contact_addresses/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/contact_addresses/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/contact_addresses/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","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}}/contact_addresses/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/contact_addresses/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_addresses/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
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('PATCH', '{{baseUrl}}/contact_addresses/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"client": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"created_at": @"",
@"external_id": @"",
@"id": @"",
@"is_orderer": @NO,
@"is_receiver": @NO,
@"source": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_addresses/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_addresses/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_addresses/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/contact_addresses/:id/', [
'body' => '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_addresses/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_addresses/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/contact_addresses/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_addresses/:id/"
payload = {
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": False,
"is_receiver": False,
"source": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_addresses/:id/"
payload <- "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_addresses/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/contact_addresses/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_addresses/:id/";
let payload = json!({
"account": "",
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"client": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/contact_addresses/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/contact_addresses/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/contact_addresses/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"client": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_addresses/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
contact_addresses_retrieve
{{baseUrl}}/contact_addresses/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_addresses/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/contact_addresses/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/contact_addresses/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/contact_addresses/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_addresses/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_addresses/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/contact_addresses/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/contact_addresses/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_addresses/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/contact_addresses/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/contact_addresses/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/contact_addresses/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact_addresses/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/contact_addresses/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact_addresses/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/contact_addresses/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_addresses/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_addresses/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_addresses/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/contact_addresses/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_addresses/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_addresses/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/contact_addresses/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_addresses/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_addresses/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_addresses/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/contact_addresses/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_addresses/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/contact_addresses/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/contact_addresses/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/contact_addresses/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_addresses/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
contact_addresses_update
{{baseUrl}}/contact_addresses/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact_addresses/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/contact_addresses/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:client ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:created_at ""
:external_id ""
:id ""
:is_orderer false
:is_receiver false
:source ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/contact_addresses/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/contact_addresses/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact_addresses/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact_addresses/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/contact_addresses/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 659
{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/contact_addresses/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact_addresses/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/contact_addresses/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/contact_addresses/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/contact_addresses/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","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}}/contact_addresses/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/contact_addresses/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/contact_addresses/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/contact_addresses/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/contact_addresses/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
client: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
created_at: '',
external_id: '',
id: '',
is_orderer: false,
is_receiver: false,
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact_addresses/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"client":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"created_at":"","external_id":"","id":"","is_orderer":false,"is_receiver":false,"source":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"client": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"created_at": @"",
@"external_id": @"",
@"id": @"",
@"is_orderer": @NO,
@"is_receiver": @NO,
@"source": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact_addresses/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact_addresses/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact_addresses/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/contact_addresses/:id/', [
'body' => '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'client' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'created_at' => '',
'external_id' => '',
'id' => '',
'is_orderer' => null,
'is_receiver' => null,
'source' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/contact_addresses/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact_addresses/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact_addresses/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/contact_addresses/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact_addresses/:id/"
payload = {
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": False,
"is_receiver": False,
"source": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact_addresses/:id/"
payload <- "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact_addresses/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/contact_addresses/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"client\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"is_orderer\": false,\n \"is_receiver\": false,\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact_addresses/:id/";
let payload = json!({
"account": "",
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"client": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/contact_addresses/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"client": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/contact_addresses/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "client": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "created_at": "",\n "external_id": "",\n "id": "",\n "is_orderer": false,\n "is_receiver": false,\n "source": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/contact_addresses/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"client": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"created_at": "",
"external_id": "",
"id": "",
"is_orderer": false,
"is_receiver": false,
"source": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact_addresses/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
devices_create
{{baseUrl}}/devices/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/devices/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/devices/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:battery_level 0
:brand ""
:build_number ""
:created_at ""
:device_country ""
:device_id ""
:device_locale ""
:free_disk_storage 0
:id ""
:ios_app_tracking_permission ""
:is_charging false
:location_permission ""
:manufacturer ""
:model ""
:motion_permission ""
:notification_permission ""
:readable_version ""
:system_name ""
:system_version ""
:timezone ""
:url ""
:user ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/devices/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\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}}/devices/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\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}}/devices/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/devices/"
payload := strings.NewReader("{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/devices/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 505
{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/devices/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/devices/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\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 \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/devices/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/devices/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/devices/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/devices/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/devices/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"battery_level":0,"brand":"","build_number":"","created_at":"","device_country":"","device_id":"","device_locale":"","free_disk_storage":0,"id":"","ios_app_tracking_permission":"","is_charging":false,"location_permission":"","manufacturer":"","model":"","motion_permission":"","notification_permission":"","readable_version":"","system_name":"","system_version":"","timezone":"","url":"","user":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/devices/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "battery_level": 0,\n "brand": "",\n "build_number": "",\n "created_at": "",\n "device_country": "",\n "device_id": "",\n "device_locale": "",\n "free_disk_storage": 0,\n "id": "",\n "ios_app_tracking_permission": "",\n "is_charging": false,\n "location_permission": "",\n "manufacturer": "",\n "model": "",\n "motion_permission": "",\n "notification_permission": "",\n "readable_version": "",\n "system_name": "",\n "system_version": "",\n "timezone": "",\n "url": "",\n "user": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/devices/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/devices/',
headers: {
authorization: '{{apiKey}}',
'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({
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/devices/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
},
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}}/devices/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
});
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}}/devices/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
battery_level: 0,
brand: '',
build_number: '',
created_at: '',
device_country: '',
device_id: '',
device_locale: '',
free_disk_storage: 0,
id: '',
ios_app_tracking_permission: '',
is_charging: false,
location_permission: '',
manufacturer: '',
model: '',
motion_permission: '',
notification_permission: '',
readable_version: '',
system_name: '',
system_version: '',
timezone: '',
url: '',
user: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/devices/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"battery_level":0,"brand":"","build_number":"","created_at":"","device_country":"","device_id":"","device_locale":"","free_disk_storage":0,"id":"","ios_app_tracking_permission":"","is_charging":false,"location_permission":"","manufacturer":"","model":"","motion_permission":"","notification_permission":"","readable_version":"","system_name":"","system_version":"","timezone":"","url":"","user":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"battery_level": @0,
@"brand": @"",
@"build_number": @"",
@"created_at": @"",
@"device_country": @"",
@"device_id": @"",
@"device_locale": @"",
@"free_disk_storage": @0,
@"id": @"",
@"ios_app_tracking_permission": @"",
@"is_charging": @NO,
@"location_permission": @"",
@"manufacturer": @"",
@"model": @"",
@"motion_permission": @"",
@"notification_permission": @"",
@"readable_version": @"",
@"system_name": @"",
@"system_version": @"",
@"timezone": @"",
@"url": @"",
@"user": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/devices/"]
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}}/devices/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/devices/",
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([
'battery_level' => 0,
'brand' => '',
'build_number' => '',
'created_at' => '',
'device_country' => '',
'device_id' => '',
'device_locale' => '',
'free_disk_storage' => 0,
'id' => '',
'ios_app_tracking_permission' => '',
'is_charging' => null,
'location_permission' => '',
'manufacturer' => '',
'model' => '',
'motion_permission' => '',
'notification_permission' => '',
'readable_version' => '',
'system_name' => '',
'system_version' => '',
'timezone' => '',
'url' => '',
'user' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/devices/', [
'body' => '{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/devices/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'battery_level' => 0,
'brand' => '',
'build_number' => '',
'created_at' => '',
'device_country' => '',
'device_id' => '',
'device_locale' => '',
'free_disk_storage' => 0,
'id' => '',
'ios_app_tracking_permission' => '',
'is_charging' => null,
'location_permission' => '',
'manufacturer' => '',
'model' => '',
'motion_permission' => '',
'notification_permission' => '',
'readable_version' => '',
'system_name' => '',
'system_version' => '',
'timezone' => '',
'url' => '',
'user' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'battery_level' => 0,
'brand' => '',
'build_number' => '',
'created_at' => '',
'device_country' => '',
'device_id' => '',
'device_locale' => '',
'free_disk_storage' => 0,
'id' => '',
'ios_app_tracking_permission' => '',
'is_charging' => null,
'location_permission' => '',
'manufacturer' => '',
'model' => '',
'motion_permission' => '',
'notification_permission' => '',
'readable_version' => '',
'system_name' => '',
'system_version' => '',
'timezone' => '',
'url' => '',
'user' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/devices/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/devices/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/devices/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/devices/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/devices/"
payload = {
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": False,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/devices/"
payload <- "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/devices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\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/devices/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"battery_level\": 0,\n \"brand\": \"\",\n \"build_number\": \"\",\n \"created_at\": \"\",\n \"device_country\": \"\",\n \"device_id\": \"\",\n \"device_locale\": \"\",\n \"free_disk_storage\": 0,\n \"id\": \"\",\n \"ios_app_tracking_permission\": \"\",\n \"is_charging\": false,\n \"location_permission\": \"\",\n \"manufacturer\": \"\",\n \"model\": \"\",\n \"motion_permission\": \"\",\n \"notification_permission\": \"\",\n \"readable_version\": \"\",\n \"system_name\": \"\",\n \"system_version\": \"\",\n \"timezone\": \"\",\n \"url\": \"\",\n \"user\": \"\",\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/devices/";
let payload = json!({
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/devices/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}'
echo '{
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
}' | \
http POST {{baseUrl}}/devices/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "battery_level": 0,\n "brand": "",\n "build_number": "",\n "created_at": "",\n "device_country": "",\n "device_id": "",\n "device_locale": "",\n "free_disk_storage": 0,\n "id": "",\n "ios_app_tracking_permission": "",\n "is_charging": false,\n "location_permission": "",\n "manufacturer": "",\n "model": "",\n "motion_permission": "",\n "notification_permission": "",\n "readable_version": "",\n "system_name": "",\n "system_version": "",\n "timezone": "",\n "url": "",\n "user": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/devices/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"battery_level": 0,
"brand": "",
"build_number": "",
"created_at": "",
"device_country": "",
"device_id": "",
"device_locale": "",
"free_disk_storage": 0,
"id": "",
"ios_app_tracking_permission": "",
"is_charging": false,
"location_permission": "",
"manufacturer": "",
"model": "",
"motion_permission": "",
"notification_permission": "",
"readable_version": "",
"system_name": "",
"system_version": "",
"timezone": "",
"url": "",
"user": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/devices/")! 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
devices_list
{{baseUrl}}/devices/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/devices/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/devices/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/devices/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/devices/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/devices/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/devices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/devices/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/devices/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/devices/"))
.header("authorization", "{{apiKey}}")
.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}}/devices/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/devices/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/devices/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/devices/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/devices/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/devices/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/devices/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/devices/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/devices/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/devices/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/devices/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/devices/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/devices/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/devices/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/devices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/devices/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/devices/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/devices/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/devices/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/devices/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/devices/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/devices/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/devices/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/devices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/devices/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/devices/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/devices/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/devices/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/devices/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/devices/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
devices_retrieve
{{baseUrl}}/devices/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/devices/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/devices/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/devices/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/devices/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/devices/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/devices/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/devices/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/devices/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/devices/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/devices/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/devices/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/devices/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/devices/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/devices/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/devices/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/devices/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/devices/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/devices/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/devices/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/devices/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/devices/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/devices/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/devices/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/devices/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/devices/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/devices/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/devices/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/devices/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/devices/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/devices/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/devices/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/devices/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/devices/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/devices/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/devices/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/devices/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/devices/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/devices/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/devices/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
docs_schema_retrieve
{{baseUrl}}/docs/schema/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/docs/schema/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/docs/schema/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/docs/schema/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/docs/schema/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/docs/schema/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/docs/schema/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/docs/schema/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/docs/schema/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/docs/schema/"))
.header("authorization", "{{apiKey}}")
.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}}/docs/schema/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/docs/schema/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/docs/schema/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/docs/schema/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/docs/schema/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/docs/schema/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/docs/schema/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/docs/schema/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/docs/schema/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/docs/schema/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/docs/schema/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/docs/schema/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/docs/schema/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/docs/schema/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/docs/schema/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/docs/schema/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/docs/schema/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/docs/schema/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/docs/schema/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/docs/schema/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/docs/schema/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/docs/schema/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/docs/schema/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/docs/schema/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/docs/schema/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/docs/schema/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/docs/schema/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/docs/schema/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/docs/schema/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/docs/schema/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
documents_batch_delete_create
{{baseUrl}}/documents/batch_delete/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"documents": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/batch_delete/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"documents\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/documents/batch_delete/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:documents []}})
require "http/client"
url = "{{baseUrl}}/documents/batch_delete/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"documents\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/documents/batch_delete/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"documents\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/batch_delete/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"documents\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/documents/batch_delete/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"documents\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/documents/batch_delete/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"account": "",
"documents": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents/batch_delete/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"documents\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/documents/batch_delete/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"documents\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"documents\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/documents/batch_delete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents/batch_delete/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"documents\": []\n}")
.asString();
const data = JSON.stringify({
account: '',
documents: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/documents/batch_delete/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/documents/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', documents: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/documents/batch_delete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","documents":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/documents/batch_delete/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "documents": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"documents\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/documents/batch_delete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/documents/batch_delete/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: '', documents: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/documents/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: '', documents: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/documents/batch_delete/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
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}}/documents/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', documents: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/documents/batch_delete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","documents":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"documents": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/batch_delete/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/documents/batch_delete/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"documents\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/documents/batch_delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'documents' => [
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/documents/batch_delete/', [
'body' => '{
"account": "",
"documents": []
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/documents/batch_delete/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'documents' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'documents' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/documents/batch_delete/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/batch_delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"documents": []
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/batch_delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"documents": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"documents\": []\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/documents/batch_delete/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/documents/batch_delete/"
payload = {
"account": "",
"documents": []
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/documents/batch_delete/"
payload <- "{\n \"account\": \"\",\n \"documents\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/documents/batch_delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"documents\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/documents/batch_delete/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"documents\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/documents/batch_delete/";
let payload = json!({
"account": "",
"documents": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/documents/batch_delete/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"documents": []
}'
echo '{
"account": "",
"documents": []
}' | \
http POST {{baseUrl}}/documents/batch_delete/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "documents": []\n}' \
--output-document \
- {{baseUrl}}/documents/batch_delete/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"documents": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/batch_delete/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
documents_create
{{baseUrl}}/documents/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/documents/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:created_by ""
:description ""
:external_id ""
:file ""
:file_name ""
:file_upload ""
:id ""
:mimetype ""
:order ""
:source ""
:task ""
:thumbnail ""
:updated_at ""
:url ""
:visible_to_client false
:visible_to_worker false}})
require "http/client"
url = "{{baseUrl}}/documents/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/documents/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": 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}}/documents/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/documents/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/documents/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/documents/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/documents/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/documents/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/documents/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","created_by":"","description":"","external_id":"","file":"","file_name":"","file_upload":"","id":"","mimetype":"","order":"","source":"","task":"","thumbnail":"","updated_at":"","url":"","visible_to_client":false,"visible_to_worker":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}}/documents/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "external_id": "",\n "file": "",\n "file_name": "",\n "file_upload": "",\n "id": "",\n "mimetype": "",\n "order": "",\n "source": "",\n "task": "",\n "thumbnail": "",\n "updated_at": "",\n "url": "",\n "visible_to_client": false,\n "visible_to_worker": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/documents/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/documents/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/documents/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
created_by: '',
description: '',
external_id: '',
file: '',
file_name: '',
file_upload: '',
id: '',
mimetype: '',
order: '',
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: '',
visible_to_client: false,
visible_to_worker: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/documents/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","created_by":"","description":"","external_id":"","file":"","file_name":"","file_upload":"","id":"","mimetype":"","order":"","source":"","task":"","thumbnail":"","updated_at":"","url":"","visible_to_client":false,"visible_to_worker":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"external_id": @"",
@"file": @"",
@"file_name": @"",
@"file_upload": @"",
@"id": @"",
@"mimetype": @"",
@"order": @"",
@"source": @"",
@"task": @"",
@"thumbnail": @"",
@"updated_at": @"",
@"url": @"",
@"visible_to_client": @NO,
@"visible_to_worker": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/documents/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'external_id' => '',
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'mimetype' => '',
'order' => '',
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => '',
'visible_to_client' => null,
'visible_to_worker' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/documents/', [
'body' => '{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/documents/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'external_id' => '',
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'mimetype' => '',
'order' => '',
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => '',
'visible_to_client' => null,
'visible_to_worker' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'external_id' => '',
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'mimetype' => '',
'order' => '',
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => '',
'visible_to_client' => null,
'visible_to_worker' => null
]));
$request->setRequestUrl('{{baseUrl}}/documents/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/documents/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/documents/"
payload = {
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": False,
"visible_to_worker": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/documents/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/documents/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"external_id\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"mimetype\": \"\",\n \"order\": \"\",\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"visible_to_client\": false,\n \"visible_to_worker\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/documents/";
let payload = json!({
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/documents/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}'
echo '{
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
}' | \
http POST {{baseUrl}}/documents/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "external_id": "",\n "file": "",\n "file_name": "",\n "file_upload": "",\n "id": "",\n "mimetype": "",\n "order": "",\n "source": "",\n "task": "",\n "thumbnail": "",\n "updated_at": "",\n "url": "",\n "visible_to_client": false,\n "visible_to_worker": false\n}' \
--output-document \
- {{baseUrl}}/documents/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"created_by": "",
"description": "",
"external_id": "",
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"mimetype": "",
"order": "",
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": "",
"visible_to_client": false,
"visible_to_worker": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
documents_destroy
{{baseUrl}}/documents/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/documents/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/documents/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/documents/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/documents/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/documents/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/documents/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/documents/:id/"))
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/documents/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/documents/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/documents/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/documents/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/documents/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/documents/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/documents/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/documents/:id/');
req.headers({
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/documents/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/documents/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/documents/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/documents/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/documents/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/documents/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/documents/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/documents/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/documents/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/documents/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/documents/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/documents/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/documents/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
documents_list
{{baseUrl}}/documents/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/documents/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/documents/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/documents/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/documents/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/documents/"))
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/documents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/documents/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/documents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/documents/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/documents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/documents/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/documents/');
req.headers({
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/documents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/documents/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/documents/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/documents/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/documents/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/documents/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/documents/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/documents/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/documents/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/documents/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/documents/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/documents/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
documents_retrieve
{{baseUrl}}/documents/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/documents/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/documents/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/documents/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/documents/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/documents/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/documents/:id/"))
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/documents/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/documents/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/documents/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/documents/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/documents/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/documents/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/documents/:id/');
req.headers({
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/documents/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/documents/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/documents/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/documents/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/documents/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/documents/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/documents/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/documents/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/documents/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/documents/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/documents/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/documents/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/documents/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/documents/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
emails_create
{{baseUrl}}/emails/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/emails/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:external_id ""
:failed_at ""
:from_email ""
:id ""
:message ""
:notification ""
:received_at ""
:reply_to_email ""
:sender ""
:sent_at ""
:state ""
:subject ""
:to_emails []
:url ""}})
require "http/client"
url = "{{baseUrl}}/emails/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\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}}/emails/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/emails/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/emails/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/emails/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/emails/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/emails/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"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}}/emails/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/emails/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/emails/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/emails/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"external_id": @"",
@"failed_at": @"",
@"from_email": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"received_at": @"",
@"reply_to_email": @"",
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"to_emails": @[ ],
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/"]
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}}/emails/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/emails/', [
'body' => '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/emails/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/emails/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/"
payload = {
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/emails/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/";
let payload = json!({
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": (),
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/emails/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}' | \
http POST {{baseUrl}}/emails/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/emails/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/")! 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
emails_destroy
{{baseUrl}}/emails/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/emails/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/emails/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/emails/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/emails/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/emails/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/emails/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/emails/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/emails/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/emails/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/emails/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/emails/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/emails/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/emails/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/emails/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/emails/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/emails/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/emails/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/emails/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/emails/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
emails_list
{{baseUrl}}/emails/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/emails/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/emails/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/emails/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/emails/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/emails/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/"))
.header("authorization", "{{apiKey}}")
.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}}/emails/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/emails/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/emails/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/emails/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/emails/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/emails/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/emails/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/emails/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/emails/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/emails/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/emails/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/emails/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/emails/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/emails/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/emails/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/emails/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/emails/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/emails/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
emails_partial_update
{{baseUrl}}/emails/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/emails/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:external_id ""
:failed_at ""
:from_email ""
:id ""
:message ""
:notification ""
:received_at ""
:reply_to_email ""
:sender ""
:sent_at ""
:state ""
:subject ""
:to_emails []
:url ""}})
require "http/client"
url = "{{baseUrl}}/emails/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/emails/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/emails/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/emails/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/emails/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/emails/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"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}}/emails/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/emails/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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('PATCH', '{{baseUrl}}/emails/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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: 'PATCH',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"external_id": @"",
@"failed_at": @"",
@"from_email": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"received_at": @"",
@"reply_to_email": @"",
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"to_emails": @[ ],
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/emails/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/emails/:id/', [
'body' => '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/emails/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/emails/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/:id/"
payload = {
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/emails/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/:id/";
let payload = json!({
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": (),
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/emails/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}' | \
http PATCH {{baseUrl}}/emails/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/emails/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
emails_resend_create
{{baseUrl}}/emails/:id/resend/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/:id/resend/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/emails/:id/resend/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:external_id ""
:failed_at ""
:from_email ""
:id ""
:message ""
:notification ""
:received_at ""
:reply_to_email ""
:sender ""
:sent_at ""
:state ""
:subject ""
:to_emails []
:url ""}})
require "http/client"
url = "{{baseUrl}}/emails/:id/resend/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\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}}/emails/:id/resend/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/:id/resend/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/:id/resend/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/emails/:id/resend/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/emails/:id/resend/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/:id/resend/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/emails/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/emails/:id/resend/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/:id/resend/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/emails/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"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}}/emails/:id/resend/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/emails/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/emails/:id/resend/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/emails/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/:id/resend/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
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}}/emails/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"external_id": @"",
@"failed_at": @"",
@"from_email": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"received_at": @"",
@"reply_to_email": @"",
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"to_emails": @[ ],
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/:id/resend/"]
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}}/emails/:id/resend/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/:id/resend/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/emails/:id/resend/', [
'body' => '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/:id/resend/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/emails/:id/resend/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/emails/:id/resend/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/:id/resend/"
payload = {
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/:id/resend/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/:id/resend/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/emails/:id/resend/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/:id/resend/";
let payload = json!({
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": (),
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/emails/:id/resend/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}' | \
http POST {{baseUrl}}/emails/:id/resend/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/emails/:id/resend/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/:id/resend/")! 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
emails_retrieve
{{baseUrl}}/emails/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/emails/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/emails/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/emails/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/emails/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/emails/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/emails/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/emails/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/emails/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/emails/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/emails/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/emails/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/emails/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/emails/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/emails/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/emails/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/emails/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/emails/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/emails/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/emails/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/emails/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
emails_update
{{baseUrl}}/emails/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/emails/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/emails/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:external_id ""
:failed_at ""
:from_email ""
:id ""
:message ""
:notification ""
:received_at ""
:reply_to_email ""
:sender ""
:sent_at ""
:state ""
:subject ""
:to_emails []
:url ""}})
require "http/client"
url = "{{baseUrl}}/emails/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/emails/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/emails/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/emails/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/emails/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/emails/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/emails/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/emails/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/emails/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/emails/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"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}}/emails/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/emails/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/emails/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/emails/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/emails/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
external_id: '',
failed_at: '',
from_email: '',
id: '',
message: '',
notification: '',
received_at: '',
reply_to_email: '',
sender: '',
sent_at: '',
state: '',
subject: '',
to_emails: [],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/emails/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","external_id":"","failed_at":"","from_email":"","id":"","message":"","notification":"","received_at":"","reply_to_email":"","sender":"","sent_at":"","state":"","subject":"","to_emails":[],"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"external_id": @"",
@"failed_at": @"",
@"from_email": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"received_at": @"",
@"reply_to_email": @"",
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"to_emails": @[ ],
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/emails/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/emails/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/emails/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/emails/:id/', [
'body' => '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/emails/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'external_id' => '',
'failed_at' => '',
'from_email' => '',
'id' => '',
'message' => '',
'notification' => '',
'received_at' => '',
'reply_to_email' => '',
'sender' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'to_emails' => [
],
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/emails/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/emails/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/emails/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/emails/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/emails/:id/"
payload = {
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/emails/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/emails/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/emails/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"from_email\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"received_at\": \"\",\n \"reply_to_email\": \"\",\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"to_emails\": [],\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/emails/:id/";
let payload = json!({
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": (),
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/emails/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
}' | \
http PUT {{baseUrl}}/emails/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "external_id": "",\n "failed_at": "",\n "from_email": "",\n "id": "",\n "message": "",\n "notification": "",\n "received_at": "",\n "reply_to_email": "",\n "sender": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "to_emails": [],\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/emails/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"external_id": "",
"failed_at": "",
"from_email": "",
"id": "",
"message": "",
"notification": "",
"received_at": "",
"reply_to_email": "",
"sender": "",
"sent_at": "",
"state": "",
"subject": "",
"to_emails": [],
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/emails/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
exports_create
{{baseUrl}}/exports/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/exports/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:export_model ""
:field_names []
:format ""
:id ""
:link ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/exports/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/exports/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/exports/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 157
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/exports/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/exports/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/exports/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
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}}/exports/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/exports/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","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}}/exports/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/exports/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/exports/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/exports/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
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}}/exports/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
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}}/exports/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"export_model": @"",
@"field_names": @[ ],
@"format": @"",
@"id": @"",
@"link": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/"]
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}}/exports/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/exports/', [
'body' => '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/exports/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/exports/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/"
payload = {
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/exports/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/";
let payload = json!({
"account": "",
"created_at": "",
"export_model": "",
"field_names": (),
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/exports/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/exports/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/exports/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/")! 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
exports_destroy
{{baseUrl}}/exports/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/exports/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/exports/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/exports/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/exports/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/exports/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/exports/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/exports/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/exports/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/exports/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/exports/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/exports/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/exports/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/exports/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/exports/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/exports/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/exports/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/exports/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/exports/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/exports/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
exports_list
{{baseUrl}}/exports/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/exports/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/exports/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/exports/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/exports/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/exports/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/"))
.header("authorization", "{{apiKey}}")
.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}}/exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/exports/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/exports/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/exports/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/exports/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/exports/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/exports/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/exports/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/exports/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/exports/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/exports/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/exports/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/exports/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/exports/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/exports/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
exports_partial_update
{{baseUrl}}/exports/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/exports/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:export_model ""
:field_names []
:format ""
:id ""
:link ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/exports/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/exports/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/exports/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 157
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/exports/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/exports/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/exports/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","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}}/exports/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/exports/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
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('PATCH', '{{baseUrl}}/exports/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"export_model": @"",
@"field_names": @[ ],
@"format": @"",
@"id": @"",
@"link": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/exports/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/exports/:id/', [
'body' => '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/exports/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/exports/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/:id/"
payload = {
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/exports/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/:id/";
let payload = json!({
"account": "",
"created_at": "",
"export_model": "",
"field_names": (),
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/exports/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/exports/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/exports/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
exports_retrieve
{{baseUrl}}/exports/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/exports/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/exports/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/exports/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/exports/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/exports/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/exports/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/exports/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/exports/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/exports/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/exports/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/exports/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/exports/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/exports/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/exports/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/exports/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/exports/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/exports/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/exports/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/exports/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/exports/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
exports_update
{{baseUrl}}/exports/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/exports/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/exports/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:export_model ""
:field_names []
:format ""
:id ""
:link ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/exports/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/exports/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/exports/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/exports/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/exports/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 157
{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/exports/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/exports/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/exports/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/exports/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/exports/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","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}}/exports/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/exports/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/exports/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/exports/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/exports/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
export_model: '',
field_names: [],
format: '',
id: '',
link: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/exports/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","export_model":"","field_names":[],"format":"","id":"","link":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"export_model": @"",
@"field_names": @[ ],
@"format": @"",
@"id": @"",
@"link": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/exports/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/exports/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/exports/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/exports/:id/', [
'body' => '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/exports/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'export_model' => '',
'field_names' => [
],
'format' => '',
'id' => '',
'link' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/exports/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/exports/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/exports/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/exports/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/exports/:id/"
payload = {
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/exports/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/exports/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/exports/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"export_model\": \"\",\n \"field_names\": [],\n \"format\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/exports/:id/";
let payload = json!({
"account": "",
"created_at": "",
"export_model": "",
"field_names": (),
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/exports/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/exports/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "export_model": "",\n "field_names": [],\n "format": "",\n "id": "",\n "link": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/exports/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"export_model": "",
"field_names": [],
"format": "",
"id": "",
"link": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/exports/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
file_uploads_create
{{baseUrl}}/file_uploads/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file_uploads/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file_uploads/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:created_by ""
:file ""
:file_name ""
:file_type ""
:id ""
:s3_signature {}
:source ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/file_uploads/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/file_uploads/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file_uploads/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file_uploads/"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/file_uploads/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 177
{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file_uploads/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file_uploads/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file_uploads/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file_uploads/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
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}}/file_uploads/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file_uploads/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file_uploads/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"created_at":"","created_by":"","file":"","file_name":"","file_type":"","id":"","s3_signature":{},"source":"","updated_at":"","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}}/file_uploads/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "created_by": "",\n "file": "",\n "file_name": "",\n "file_type": "",\n "id": "",\n "s3_signature": {},\n "source": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file_uploads/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/file_uploads/',
headers: {
authorization: '{{apiKey}}',
'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({
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file_uploads/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
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}}/file_uploads/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
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}}/file_uploads/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
created_at: '',
created_by: '',
file: '',
file_name: '',
file_type: '',
id: '',
s3_signature: {},
source: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file_uploads/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"created_at":"","created_by":"","file":"","file_name":"","file_type":"","id":"","s3_signature":{},"source":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"created_by": @"",
@"file": @"",
@"file_name": @"",
@"file_type": @"",
@"id": @"",
@"s3_signature": @{ },
@"source": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file_uploads/"]
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}}/file_uploads/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file_uploads/",
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([
'created_at' => '',
'created_by' => '',
'file' => '',
'file_name' => '',
'file_type' => '',
'id' => '',
's3_signature' => [
],
'source' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/file_uploads/', [
'body' => '{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file_uploads/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'created_by' => '',
'file' => '',
'file_name' => '',
'file_type' => '',
'id' => '',
's3_signature' => [
],
'source' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'created_by' => '',
'file' => '',
'file_name' => '',
'file_type' => '',
'id' => '',
's3_signature' => [
],
'source' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file_uploads/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file_uploads/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file_uploads/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file_uploads/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file_uploads/"
payload = {
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file_uploads/"
payload <- "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file_uploads/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file_uploads/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_type\": \"\",\n \"id\": \"\",\n \"s3_signature\": {},\n \"source\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file_uploads/";
let payload = json!({
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": json!({}),
"source": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file_uploads/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}'
echo '{
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": {},
"source": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/file_uploads/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "created_by": "",\n "file": "",\n "file_name": "",\n "file_type": "",\n "id": "",\n "s3_signature": {},\n "source": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/file_uploads/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"created_by": "",
"file": "",
"file_name": "",
"file_type": "",
"id": "",
"s3_signature": [],
"source": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file_uploads/")! 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
file_uploads_list
{{baseUrl}}/file_uploads/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file_uploads/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file_uploads/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file_uploads/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file_uploads/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file_uploads/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file_uploads/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file_uploads/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file_uploads/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file_uploads/"))
.header("authorization", "{{apiKey}}")
.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}}/file_uploads/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file_uploads/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/file_uploads/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file_uploads/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file_uploads/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file_uploads/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file_uploads/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file_uploads/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/file_uploads/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file_uploads/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/file_uploads/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file_uploads/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file_uploads/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file_uploads/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file_uploads/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file_uploads/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file_uploads/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file_uploads/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file_uploads/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file_uploads/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/file_uploads/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file_uploads/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file_uploads/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file_uploads/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file_uploads/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file_uploads/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file_uploads/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/file_uploads/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file_uploads/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file_uploads/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
file_uploads_retrieve
{{baseUrl}}/file_uploads/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file_uploads/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file_uploads/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file_uploads/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file_uploads/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file_uploads/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file_uploads/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file_uploads/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file_uploads/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file_uploads/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/file_uploads/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file_uploads/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/file_uploads/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file_uploads/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file_uploads/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file_uploads/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file_uploads/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file_uploads/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/file_uploads/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file_uploads/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/file_uploads/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file_uploads/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file_uploads/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file_uploads/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file_uploads/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file_uploads/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file_uploads/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file_uploads/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file_uploads/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file_uploads/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/file_uploads/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file_uploads/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file_uploads/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file_uploads/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file_uploads/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file_uploads/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file_uploads/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/file_uploads/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file_uploads/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file_uploads/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
formrules_create
{{baseUrl}}/formrules/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/formrules/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:edit_url ""
:id ""
:is_active false
:name ""
:pdf_url ""
:rules {}
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/formrules/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\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}}/formrules/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/formrules/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 148
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/formrules/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/formrules/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/formrules/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_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}}/formrules/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/formrules/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_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}}/formrules/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/formrules/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/formrules/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/formrules/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_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}}/formrules/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_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}}/formrules/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"edit_url": @"",
@"id": @"",
@"is_active": @NO,
@"name": @"",
@"pdf_url": @"",
@"rules": @{ },
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/"]
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}}/formrules/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/formrules/', [
'body' => '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/formrules/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/formrules/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/"
payload = {
"account": "",
"edit_url": "",
"id": "",
"is_active": False,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/"
payload <- "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/formrules/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/";
let payload = json!({
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": json!({}),
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/formrules/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
echo '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}' | \
http POST {{baseUrl}}/formrules/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/formrules/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": [],
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/")! 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
formrules_destroy
{{baseUrl}}/formrules/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/formrules/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/formrules/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/formrules/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/formrules/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/formrules/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/formrules/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/formrules/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/formrules/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/formrules/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/formrules/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/formrules/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/formrules/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/formrules/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/formrules/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/formrules/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/formrules/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/formrules/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/formrules/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/formrules/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
formrules_list
{{baseUrl}}/formrules/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/formrules/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/formrules/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/formrules/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/formrules/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/formrules/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/"))
.header("authorization", "{{apiKey}}")
.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}}/formrules/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/formrules/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/formrules/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/formrules/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/formrules/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/formrules/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/formrules/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/formrules/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/formrules/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/formrules/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/formrules/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/formrules/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/formrules/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/formrules/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/formrules/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/formrules/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/formrules/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/formrules/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
formrules_partial_update
{{baseUrl}}/formrules/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/formrules/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:edit_url ""
:id ""
:is_active false
:name ""
:pdf_url ""
:rules {}
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/formrules/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/formrules/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/formrules/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 148
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/formrules/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/formrules/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/formrules/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_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}}/formrules/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/formrules/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_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('PATCH', '{{baseUrl}}/formrules/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_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: 'PATCH',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"edit_url": @"",
@"id": @"",
@"is_active": @NO,
@"name": @"",
@"pdf_url": @"",
@"rules": @{ },
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/formrules/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/formrules/:id/', [
'body' => '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/formrules/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/formrules/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/:id/"
payload = {
"account": "",
"edit_url": "",
"id": "",
"is_active": False,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/:id/"
payload <- "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/formrules/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/:id/";
let payload = json!({
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": json!({}),
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/formrules/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
echo '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}' | \
http PATCH {{baseUrl}}/formrules/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/formrules/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": [],
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
formrules_retrieve
{{baseUrl}}/formrules/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/formrules/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/formrules/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/formrules/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/formrules/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/formrules/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/formrules/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/formrules/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/formrules/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/formrules/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/formrules/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/formrules/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/formrules/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/formrules/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/formrules/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/formrules/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/formrules/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/formrules/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/formrules/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/formrules/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/formrules/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
formrules_update
{{baseUrl}}/formrules/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/formrules/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/formrules/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:edit_url ""
:id ""
:is_active false
:name ""
:pdf_url ""
:rules {}
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/formrules/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/formrules/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/formrules/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/formrules/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/formrules/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 148
{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/formrules/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/formrules/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/formrules/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/formrules/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/formrules/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_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}}/formrules/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/formrules/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/formrules/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/formrules/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/formrules/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
edit_url: '',
id: '',
is_active: false,
name: '',
pdf_url: '',
rules: {},
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/formrules/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","edit_url":"","id":"","is_active":false,"name":"","pdf_url":"","rules":{},"url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"edit_url": @"",
@"id": @"",
@"is_active": @NO,
@"name": @"",
@"pdf_url": @"",
@"rules": @{ },
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/formrules/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/formrules/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/formrules/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/formrules/:id/', [
'body' => '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/formrules/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'edit_url' => '',
'id' => '',
'is_active' => null,
'name' => '',
'pdf_url' => '',
'rules' => [
],
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/formrules/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/formrules/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/formrules/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/formrules/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/formrules/:id/"
payload = {
"account": "",
"edit_url": "",
"id": "",
"is_active": False,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/formrules/:id/"
payload <- "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/formrules/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/formrules/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"rules\": {},\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/formrules/:id/";
let payload = json!({
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": json!({}),
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/formrules/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}'
echo '{
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": {},
"url": "",
"view_url": ""
}' | \
http PUT {{baseUrl}}/formrules/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "edit_url": "",\n "id": "",\n "is_active": false,\n "name": "",\n "pdf_url": "",\n "rules": {},\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/formrules/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"edit_url": "",
"id": "",
"is_active": false,
"name": "",
"pdf_url": "",
"rules": [],
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/formrules/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
integrations_create
{{baseUrl}}/integrations/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/integrations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/integrations/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:id ""
:name ""
:notes ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/integrations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\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}}/integrations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\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}}/integrations/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/integrations/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/integrations/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 74
{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/integrations/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/integrations/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/integrations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/integrations/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
id: '',
name: '',
notes: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/integrations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/integrations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', id: '', name: '', notes: '', user: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/integrations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","id":"","name":"","notes":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/integrations/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "id": "",\n "name": "",\n "notes": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/integrations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/integrations/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: '', id: '', name: '', notes: '', user: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/integrations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: '', id: '', name: '', notes: '', user: ''},
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}}/integrations/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
id: '',
name: '',
notes: '',
user: ''
});
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}}/integrations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', id: '', name: '', notes: '', user: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/integrations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","id":"","name":"","notes":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"id": @"",
@"name": @"",
@"notes": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/integrations/"]
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}}/integrations/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/integrations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'id' => '',
'name' => '',
'notes' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/integrations/', [
'body' => '{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/integrations/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'id' => '',
'name' => '',
'notes' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'id' => '',
'name' => '',
'notes' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/integrations/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/integrations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/integrations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/integrations/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/integrations/"
payload = {
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/integrations/"
payload <- "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/integrations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\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/integrations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"notes\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/integrations/";
let payload = json!({
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/integrations/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}'
echo '{
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
}' | \
http POST {{baseUrl}}/integrations/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "id": "",\n "name": "",\n "notes": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/integrations/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"id": "",
"name": "",
"notes": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/integrations/")! 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
metafields_create
{{baseUrl}}/metafields/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/metafields/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:choices []
:choices_url ""
:created_at ""
:field_name ""
:id ""
:is_editable false
:is_editable_assignee false
:is_persistent false
:is_required false
:is_searchable false
:key ""
:label ""
:namespace ""
:ordering 0
:show_in_detail_view false
:show_in_list_view false
:show_in_mobile_app false
:show_in_pod false
:show_when_task_type_assignment false
:show_when_task_type_drop_off false
:show_when_task_type_pick_up false
:updated_at ""
:url ""
:value_type ""}})
require "http/client"
url = "{{baseUrl}}/metafields/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/metafields/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 600
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/metafields/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/metafields/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/metafields/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/metafields/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_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}}/metafields/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/metafields/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/metafields/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/metafields/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"choices": @[ ],
@"choices_url": @"",
@"created_at": @"",
@"field_name": @"",
@"id": @"",
@"is_editable": @NO,
@"is_editable_assignee": @NO,
@"is_persistent": @NO,
@"is_required": @NO,
@"is_searchable": @NO,
@"key": @"",
@"label": @"",
@"namespace": @"",
@"ordering": @0,
@"show_in_detail_view": @NO,
@"show_in_list_view": @NO,
@"show_in_mobile_app": @NO,
@"show_in_pod": @NO,
@"show_when_task_type_assignment": @NO,
@"show_when_task_type_drop_off": @NO,
@"show_when_task_type_pick_up": @NO,
@"updated_at": @"",
@"url": @"",
@"value_type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/"]
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}}/metafields/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/metafields/', [
'body' => '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/metafields/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/metafields/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/"
payload = {
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": False,
"is_editable_assignee": False,
"is_persistent": False,
"is_required": False,
"is_searchable": False,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": False,
"show_in_list_view": False,
"show_in_mobile_app": False,
"show_in_pod": False,
"show_when_task_type_assignment": False,
"show_when_task_type_drop_off": False,
"show_when_task_type_pick_up": False,
"updated_at": "",
"url": "",
"value_type": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/"
payload <- "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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/metafields/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metafields/";
let payload = json!({
"account": "",
"choices": (),
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/metafields/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
echo '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}' | \
http POST {{baseUrl}}/metafields/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_type": ""\n}' \
--output-document \
- {{baseUrl}}/metafields/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/")! 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
metafields_destroy
{{baseUrl}}/metafields/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/metafields/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/metafields/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/metafields/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/metafields/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/metafields/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/metafields/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/metafields/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/metafields/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/metafields/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/metafields/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/metafields/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/metafields/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metafields/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/metafields/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/metafields/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/metafields/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/metafields/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metafields/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/metafields/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/metafields/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/metafields/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
metafields_list
{{baseUrl}}/metafields/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/metafields/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/metafields/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/metafields/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/metafields/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/metafields/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/metafields/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/"))
.header("authorization", "{{apiKey}}")
.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}}/metafields/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/metafields/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/metafields/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/metafields/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/metafields/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/metafields/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/metafields/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/metafields/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/metafields/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/metafields/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metafields/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/metafields/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/metafields/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/metafields/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/metafields/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metafields/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/metafields/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/metafields/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/metafields/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
metafields_partial_update
{{baseUrl}}/metafields/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/metafields/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:choices []
:choices_url ""
:created_at ""
:field_name ""
:id ""
:is_editable false
:is_editable_assignee false
:is_persistent false
:is_required false
:is_searchable false
:key ""
:label ""
:namespace ""
:ordering 0
:show_in_detail_view false
:show_in_list_view false
:show_in_mobile_app false
:show_in_pod false
:show_when_task_type_assignment false
:show_when_task_type_drop_off false
:show_when_task_type_pick_up false
:updated_at ""
:url ""
:value_type ""}})
require "http/client"
url = "{{baseUrl}}/metafields/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/metafields/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/metafields/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 600
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/metafields/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/metafields/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/metafields/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_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}}/metafields/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/metafields/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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('PATCH', '{{baseUrl}}/metafields/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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: 'PATCH',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"choices": @[ ],
@"choices_url": @"",
@"created_at": @"",
@"field_name": @"",
@"id": @"",
@"is_editable": @NO,
@"is_editable_assignee": @NO,
@"is_persistent": @NO,
@"is_required": @NO,
@"is_searchable": @NO,
@"key": @"",
@"label": @"",
@"namespace": @"",
@"ordering": @0,
@"show_in_detail_view": @NO,
@"show_in_list_view": @NO,
@"show_in_mobile_app": @NO,
@"show_in_pod": @NO,
@"show_when_task_type_assignment": @NO,
@"show_when_task_type_drop_off": @NO,
@"show_when_task_type_pick_up": @NO,
@"updated_at": @"",
@"url": @"",
@"value_type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metafields/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/metafields/:id/', [
'body' => '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/metafields/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/metafields/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/:id/"
payload = {
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": False,
"is_editable_assignee": False,
"is_persistent": False,
"is_required": False,
"is_searchable": False,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": False,
"show_in_list_view": False,
"show_in_mobile_app": False,
"show_in_pod": False,
"show_when_task_type_assignment": False,
"show_when_task_type_drop_off": False,
"show_when_task_type_pick_up": False,
"updated_at": "",
"url": "",
"value_type": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/:id/"
payload <- "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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.patch('/baseUrl/metafields/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/:id/";
let payload = json!({
"account": "",
"choices": (),
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/metafields/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
echo '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}' | \
http PATCH {{baseUrl}}/metafields/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_type": ""\n}' \
--output-document \
- {{baseUrl}}/metafields/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
metafields_retrieve
{{baseUrl}}/metafields/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/metafields/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/metafields/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/metafields/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/metafields/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/metafields/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/metafields/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/metafields/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/metafields/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/metafields/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/metafields/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/metafields/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/metafields/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/metafields/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metafields/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/metafields/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/metafields/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/metafields/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/metafields/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metafields/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/metafields/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/metafields/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/metafields/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
metafields_update
{{baseUrl}}/metafields/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metafields/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/metafields/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:choices []
:choices_url ""
:created_at ""
:field_name ""
:id ""
:is_editable false
:is_editable_assignee false
:is_persistent false
:is_required false
:is_searchable false
:key ""
:label ""
:namespace ""
:ordering 0
:show_in_detail_view false
:show_in_list_view false
:show_in_mobile_app false
:show_in_pod false
:show_when_task_type_assignment false
:show_when_task_type_drop_off false
:show_when_task_type_pick_up false
:updated_at ""
:url ""
:value_type ""}})
require "http/client"
url = "{{baseUrl}}/metafields/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metafields/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/metafields/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 600
{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/metafields/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metafields/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/metafields/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metafields/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_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}}/metafields/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_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 \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/metafields/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/metafields/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_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}}/metafields/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
choices: [],
choices_url: '',
created_at: '',
field_name: '',
id: '',
is_editable: false,
is_editable_assignee: false,
is_persistent: false,
is_required: false,
is_searchable: false,
key: '',
label: '',
namespace: '',
ordering: 0,
show_in_detail_view: false,
show_in_list_view: false,
show_in_mobile_app: false,
show_in_pod: false,
show_when_task_type_assignment: false,
show_when_task_type_drop_off: false,
show_when_task_type_pick_up: false,
updated_at: '',
url: '',
value_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metafields/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","choices":[],"choices_url":"","created_at":"","field_name":"","id":"","is_editable":false,"is_editable_assignee":false,"is_persistent":false,"is_required":false,"is_searchable":false,"key":"","label":"","namespace":"","ordering":0,"show_in_detail_view":false,"show_in_list_view":false,"show_in_mobile_app":false,"show_in_pod":false,"show_when_task_type_assignment":false,"show_when_task_type_drop_off":false,"show_when_task_type_pick_up":false,"updated_at":"","url":"","value_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"choices": @[ ],
@"choices_url": @"",
@"created_at": @"",
@"field_name": @"",
@"id": @"",
@"is_editable": @NO,
@"is_editable_assignee": @NO,
@"is_persistent": @NO,
@"is_required": @NO,
@"is_searchable": @NO,
@"key": @"",
@"label": @"",
@"namespace": @"",
@"ordering": @0,
@"show_in_detail_view": @NO,
@"show_in_list_view": @NO,
@"show_in_mobile_app": @NO,
@"show_in_pod": @NO,
@"show_when_task_type_assignment": @NO,
@"show_when_task_type_drop_off": @NO,
@"show_when_task_type_pick_up": @NO,
@"updated_at": @"",
@"url": @"",
@"value_type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metafields/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metafields/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metafields/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/metafields/:id/', [
'body' => '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metafields/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'choices' => [
],
'choices_url' => '',
'created_at' => '',
'field_name' => '',
'id' => '',
'is_editable' => null,
'is_editable_assignee' => null,
'is_persistent' => null,
'is_required' => null,
'is_searchable' => null,
'key' => '',
'label' => '',
'namespace' => '',
'ordering' => 0,
'show_in_detail_view' => null,
'show_in_list_view' => null,
'show_in_mobile_app' => null,
'show_in_pod' => null,
'show_when_task_type_assignment' => null,
'show_when_task_type_drop_off' => null,
'show_when_task_type_pick_up' => null,
'updated_at' => '',
'url' => '',
'value_type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/metafields/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metafields/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metafields/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/metafields/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metafields/:id/"
payload = {
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": False,
"is_editable_assignee": False,
"is_persistent": False,
"is_required": False,
"is_searchable": False,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": False,
"show_in_list_view": False,
"show_in_mobile_app": False,
"show_in_pod": False,
"show_when_task_type_assignment": False,
"show_when_task_type_drop_off": False,
"show_when_task_type_pick_up": False,
"updated_at": "",
"url": "",
"value_type": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metafields/:id/"
payload <- "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_type\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metafields/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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/metafields/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"choices\": [],\n \"choices_url\": \"\",\n \"created_at\": \"\",\n \"field_name\": \"\",\n \"id\": \"\",\n \"is_editable\": false,\n \"is_editable_assignee\": false,\n \"is_persistent\": false,\n \"is_required\": false,\n \"is_searchable\": false,\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"ordering\": 0,\n \"show_in_detail_view\": false,\n \"show_in_list_view\": false,\n \"show_in_mobile_app\": false,\n \"show_in_pod\": false,\n \"show_when_task_type_assignment\": false,\n \"show_when_task_type_drop_off\": false,\n \"show_when_task_type_pick_up\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"value_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}}/metafields/:id/";
let payload = json!({
"account": "",
"choices": (),
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/metafields/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}'
echo '{
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
}' | \
http PUT {{baseUrl}}/metafields/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "choices": [],\n "choices_url": "",\n "created_at": "",\n "field_name": "",\n "id": "",\n "is_editable": false,\n "is_editable_assignee": false,\n "is_persistent": false,\n "is_required": false,\n "is_searchable": false,\n "key": "",\n "label": "",\n "namespace": "",\n "ordering": 0,\n "show_in_detail_view": false,\n "show_in_list_view": false,\n "show_in_mobile_app": false,\n "show_in_pod": false,\n "show_when_task_type_assignment": false,\n "show_when_task_type_drop_off": false,\n "show_when_task_type_pick_up": false,\n "updated_at": "",\n "url": "",\n "value_type": ""\n}' \
--output-document \
- {{baseUrl}}/metafields/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"choices": [],
"choices_url": "",
"created_at": "",
"field_name": "",
"id": "",
"is_editable": false,
"is_editable_assignee": false,
"is_persistent": false,
"is_required": false,
"is_searchable": false,
"key": "",
"label": "",
"namespace": "",
"ordering": 0,
"show_in_detail_view": false,
"show_in_list_view": false,
"show_in_mobile_app": false,
"show_in_pod": false,
"show_when_task_type_assignment": false,
"show_when_task_type_drop_off": false,
"show_when_task_type_pick_up": false,
"updated_at": "",
"url": "",
"value_type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metafields/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
notification_templates_create
{{baseUrl}}/notification_templates/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/notification_templates/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:email_reply_to ""
:emails []
:event ""
:id ""
:is_active false
:message ""
:name ""
:phones []
:recipient ""
:scheduled_time_change false
:state ""
:task_category ""
:updated_at ""
:url ""
:via_app false
:via_email false
:via_sms false}})
require "http/client"
url = "{{baseUrl}}/notification_templates/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/notification_templates/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/notification_templates/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 361
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/notification_templates/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/notification_templates/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/notification_templates/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/notification_templates/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/notification_templates/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":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}}/notification_templates/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/notification_templates/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/notification_templates/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/notification_templates/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/notification_templates/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"email_reply_to": @"",
@"emails": @[ ],
@"event": @"",
@"id": @"",
@"is_active": @NO,
@"message": @"",
@"name": @"",
@"phones": @[ ],
@"recipient": @"",
@"scheduled_time_change": @NO,
@"state": @"",
@"task_category": @"",
@"updated_at": @"",
@"url": @"",
@"via_app": @NO,
@"via_email": @NO,
@"via_sms": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/"]
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}}/notification_templates/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/notification_templates/', [
'body' => '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
$request->setRequestUrl('{{baseUrl}}/notification_templates/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/notification_templates/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/"
payload = {
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": False,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": False,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": False,
"via_email": False,
"via_sms": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/notification_templates/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notification_templates/";
let payload = json!({
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": (),
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": (),
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/notification_templates/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
echo '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}' | \
http POST {{baseUrl}}/notification_templates/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": false\n}' \
--output-document \
- {{baseUrl}}/notification_templates/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/")! 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
notification_templates_destroy
{{baseUrl}}/notification_templates/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/notification_templates/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/notification_templates/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/notification_templates/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/notification_templates/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/notification_templates/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/notification_templates/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/notification_templates/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/notification_templates/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/notification_templates/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notification_templates/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/notification_templates/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/notification_templates/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notification_templates/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/notification_templates/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/notification_templates/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/notification_templates/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/notification_templates/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notification_templates/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/notification_templates/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/notification_templates/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/notification_templates/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
notification_templates_list
{{baseUrl}}/notification_templates/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/notification_templates/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/notification_templates/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/notification_templates/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/notification_templates/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/notification_templates/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/notification_templates/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/"))
.header("authorization", "{{apiKey}}")
.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}}/notification_templates/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/notification_templates/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/notification_templates/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/notification_templates/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notification_templates/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/notification_templates/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/notification_templates/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/notification_templates/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/notification_templates/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notification_templates/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/notification_templates/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/notification_templates/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/notification_templates/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/notification_templates/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notification_templates/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/notification_templates/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/notification_templates/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/notification_templates/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
notification_templates_partial_update
{{baseUrl}}/notification_templates/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/notification_templates/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:email_reply_to ""
:emails []
:event ""
:id ""
:is_active false
:message ""
:name ""
:phones []
:recipient ""
:scheduled_time_change false
:state ""
:task_category ""
:updated_at ""
:url ""
:via_app false
:via_email false
:via_sms false}})
require "http/client"
url = "{{baseUrl}}/notification_templates/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/notification_templates/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/notification_templates/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 361
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/notification_templates/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/notification_templates/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/notification_templates/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":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}}/notification_templates/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/notification_templates/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: 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('PATCH', '{{baseUrl}}/notification_templates/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: 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: 'PATCH',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"email_reply_to": @"",
@"emails": @[ ],
@"event": @"",
@"id": @"",
@"is_active": @NO,
@"message": @"",
@"name": @"",
@"phones": @[ ],
@"recipient": @"",
@"scheduled_time_change": @NO,
@"state": @"",
@"task_category": @"",
@"updated_at": @"",
@"url": @"",
@"via_app": @NO,
@"via_email": @NO,
@"via_sms": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notification_templates/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/notification_templates/:id/', [
'body' => '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
$request->setRequestUrl('{{baseUrl}}/notification_templates/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/notification_templates/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/:id/"
payload = {
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": False,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": False,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": False,
"via_email": False,
"via_sms": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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.patch('/baseUrl/notification_templates/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/:id/";
let payload = json!({
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": (),
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": (),
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/notification_templates/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
echo '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}' | \
http PATCH {{baseUrl}}/notification_templates/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": false\n}' \
--output-document \
- {{baseUrl}}/notification_templates/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
notification_templates_render_create
{{baseUrl}}/notification_templates/:id/render/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"task": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/:id/render/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"task\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/notification_templates/:id/render/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:task ""}})
require "http/client"
url = "{{baseUrl}}/notification_templates/:id/render/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"task\": \"\"\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}}/notification_templates/:id/render/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"task\": \"\"\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}}/notification_templates/:id/render/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"task\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/:id/render/"
payload := strings.NewReader("{\n \"task\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/notification_templates/:id/render/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"task": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/notification_templates/:id/render/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"task\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/:id/render/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"task\": \"\"\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 \"task\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/render/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/notification_templates/:id/render/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"task\": \"\"\n}")
.asString();
const data = JSON.stringify({
task: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/notification_templates/:id/render/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/notification_templates/:id/render/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {task: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/:id/render/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"task":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notification_templates/:id/render/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "task": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"task\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/render/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/notification_templates/:id/render/',
headers: {
authorization: '{{apiKey}}',
'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({task: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/notification_templates/:id/render/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {task: ''},
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}}/notification_templates/:id/render/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
task: ''
});
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}}/notification_templates/:id/render/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {task: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/:id/render/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"task":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"task": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/:id/render/"]
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}}/notification_templates/:id/render/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"task\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/:id/render/",
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([
'task' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/notification_templates/:id/render/', [
'body' => '{
"task": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/:id/render/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'task' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'task' => ''
]));
$request->setRequestUrl('{{baseUrl}}/notification_templates/:id/render/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/:id/render/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"task": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/:id/render/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"task": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"task\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/notification_templates/:id/render/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/:id/render/"
payload = { "task": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/:id/render/"
payload <- "{\n \"task\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/:id/render/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"task\": \"\"\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/notification_templates/:id/render/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"task\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notification_templates/:id/render/";
let payload = json!({"task": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/notification_templates/:id/render/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"task": ""
}'
echo '{
"task": ""
}' | \
http POST {{baseUrl}}/notification_templates/:id/render/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "task": ""\n}' \
--output-document \
- {{baseUrl}}/notification_templates/:id/render/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["task": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/:id/render/")! 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
notification_templates_retrieve
{{baseUrl}}/notification_templates/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/notification_templates/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/notification_templates/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/notification_templates/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/notification_templates/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/notification_templates/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/notification_templates/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/notification_templates/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/notification_templates/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/notification_templates/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notification_templates/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/notification_templates/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/notification_templates/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notification_templates/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/notification_templates/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/notification_templates/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/notification_templates/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/notification_templates/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notification_templates/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/notification_templates/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/notification_templates/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/notification_templates/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
notification_templates_update
{{baseUrl}}/notification_templates/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notification_templates/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/notification_templates/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:email_reply_to ""
:emails []
:event ""
:id ""
:is_active false
:message ""
:name ""
:phones []
:recipient ""
:scheduled_time_change false
:state ""
:task_category ""
:updated_at ""
:url ""
:via_app false
:via_email false
:via_sms false}})
require "http/client"
url = "{{baseUrl}}/notification_templates/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notification_templates/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/notification_templates/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 361
{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/notification_templates/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notification_templates/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/notification_templates/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: 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}}/notification_templates/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":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}}/notification_templates/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": 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 \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/notification_templates/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/notification_templates/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: 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}}/notification_templates/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: 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}}/notification_templates/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
email_reply_to: '',
emails: [],
event: '',
id: '',
is_active: false,
message: '',
name: '',
phones: [],
recipient: '',
scheduled_time_change: false,
state: '',
task_category: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notification_templates/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","email_reply_to":"","emails":[],"event":"","id":"","is_active":false,"message":"","name":"","phones":[],"recipient":"","scheduled_time_change":false,"state":"","task_category":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"email_reply_to": @"",
@"emails": @[ ],
@"event": @"",
@"id": @"",
@"is_active": @NO,
@"message": @"",
@"name": @"",
@"phones": @[ ],
@"recipient": @"",
@"scheduled_time_change": @NO,
@"state": @"",
@"task_category": @"",
@"updated_at": @"",
@"url": @"",
@"via_app": @NO,
@"via_email": @NO,
@"via_sms": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notification_templates/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notification_templates/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notification_templates/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/notification_templates/:id/', [
'body' => '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notification_templates/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'email_reply_to' => '',
'emails' => [
],
'event' => '',
'id' => '',
'is_active' => null,
'message' => '',
'name' => '',
'phones' => [
],
'recipient' => '',
'scheduled_time_change' => null,
'state' => '',
'task_category' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
$request->setRequestUrl('{{baseUrl}}/notification_templates/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notification_templates/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notification_templates/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/notification_templates/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notification_templates/:id/"
payload = {
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": False,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": False,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": False,
"via_email": False,
"via_sms": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notification_templates/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notification_templates/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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/notification_templates/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"email_reply_to\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"message\": \"\",\n \"name\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"scheduled_time_change\": false,\n \"state\": \"\",\n \"task_category\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notification_templates/:id/";
let payload = json!({
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": (),
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": (),
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/notification_templates/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
echo '{
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}' | \
http PUT {{baseUrl}}/notification_templates/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "email_reply_to": "",\n "emails": [],\n "event": "",\n "id": "",\n "is_active": false,\n "message": "",\n "name": "",\n "phones": [],\n "recipient": "",\n "scheduled_time_change": false,\n "state": "",\n "task_category": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": false\n}' \
--output-document \
- {{baseUrl}}/notification_templates/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"email_reply_to": "",
"emails": [],
"event": "",
"id": "",
"is_active": false,
"message": "",
"name": "",
"phones": [],
"recipient": "",
"scheduled_time_change": false,
"state": "",
"task_category": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notification_templates/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
notifications_create
{{baseUrl}}/notifications/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notifications/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/notifications/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:add_tracking_link false
:assignee_proximity ""
:created_at ""
:emails []
:event ""
:id ""
:message ""
:method ""
:phones []
:recipient ""
:sent_at ""
:sms_count 0
:state ""
:task ""
:template ""
:updated_at ""
:url ""
:via_app false
:via_email false
:via_sms false}})
require "http/client"
url = "{{baseUrl}}/notifications/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/notifications/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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}}/notifications/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notifications/"
payload := strings.NewReader("{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/notifications/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 368
{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/notifications/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notifications/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": 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 \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/notifications/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/notifications/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
.asString();
const data = JSON.stringify({
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/notifications/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notifications/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"add_tracking_link":false,"assignee_proximity":"","created_at":"","emails":[],"event":"","id":"","message":"","method":"","phones":[],"recipient":"","sent_at":"","sms_count":0,"state":"","task":"","template":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":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}}/notifications/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "add_tracking_link": false,\n "assignee_proximity": "",\n "created_at": "",\n "emails": [],\n "event": "",\n "id": "",\n "message": "",\n "method": "",\n "phones": [],\n "recipient": "",\n "sent_at": "",\n "sms_count": 0,\n "state": "",\n "task": "",\n "template": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": 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 \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/notifications/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/notifications/',
headers: {
authorization: '{{apiKey}}',
'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({
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/notifications/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
add_tracking_link: false,
assignee_proximity: '',
created_at: '',
emails: [],
event: '',
id: '',
message: '',
method: '',
phones: [],
recipient: '',
sent_at: '',
sms_count: 0,
state: '',
task: '',
template: '',
updated_at: '',
url: '',
via_app: false,
via_email: false,
via_sms: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notifications/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"add_tracking_link":false,"assignee_proximity":"","created_at":"","emails":[],"event":"","id":"","message":"","method":"","phones":[],"recipient":"","sent_at":"","sms_count":0,"state":"","task":"","template":"","updated_at":"","url":"","via_app":false,"via_email":false,"via_sms":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"add_tracking_link": @NO,
@"assignee_proximity": @"",
@"created_at": @"",
@"emails": @[ ],
@"event": @"",
@"id": @"",
@"message": @"",
@"method": @"",
@"phones": @[ ],
@"recipient": @"",
@"sent_at": @"",
@"sms_count": @0,
@"state": @"",
@"task": @"",
@"template": @"",
@"updated_at": @"",
@"url": @"",
@"via_app": @NO,
@"via_email": @NO,
@"via_sms": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notifications/"]
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}}/notifications/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notifications/",
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([
'add_tracking_link' => null,
'assignee_proximity' => '',
'created_at' => '',
'emails' => [
],
'event' => '',
'id' => '',
'message' => '',
'method' => '',
'phones' => [
],
'recipient' => '',
'sent_at' => '',
'sms_count' => 0,
'state' => '',
'task' => '',
'template' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/notifications/', [
'body' => '{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notifications/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'add_tracking_link' => null,
'assignee_proximity' => '',
'created_at' => '',
'emails' => [
],
'event' => '',
'id' => '',
'message' => '',
'method' => '',
'phones' => [
],
'recipient' => '',
'sent_at' => '',
'sms_count' => 0,
'state' => '',
'task' => '',
'template' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'add_tracking_link' => null,
'assignee_proximity' => '',
'created_at' => '',
'emails' => [
],
'event' => '',
'id' => '',
'message' => '',
'method' => '',
'phones' => [
],
'recipient' => '',
'sent_at' => '',
'sms_count' => 0,
'state' => '',
'task' => '',
'template' => '',
'updated_at' => '',
'url' => '',
'via_app' => null,
'via_email' => null,
'via_sms' => null
]));
$request->setRequestUrl('{{baseUrl}}/notifications/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notifications/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notifications/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/notifications/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notifications/"
payload = {
"add_tracking_link": False,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": False,
"via_email": False,
"via_sms": False
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notifications/"
payload <- "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notifications/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/notifications/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"add_tracking_link\": false,\n \"assignee_proximity\": \"\",\n \"created_at\": \"\",\n \"emails\": [],\n \"event\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"method\": \"\",\n \"phones\": [],\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"sms_count\": 0,\n \"state\": \"\",\n \"task\": \"\",\n \"template\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"via_app\": false,\n \"via_email\": false,\n \"via_sms\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notifications/";
let payload = json!({
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": (),
"event": "",
"id": "",
"message": "",
"method": "",
"phones": (),
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/notifications/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}'
echo '{
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
}' | \
http POST {{baseUrl}}/notifications/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "add_tracking_link": false,\n "assignee_proximity": "",\n "created_at": "",\n "emails": [],\n "event": "",\n "id": "",\n "message": "",\n "method": "",\n "phones": [],\n "recipient": "",\n "sent_at": "",\n "sms_count": 0,\n "state": "",\n "task": "",\n "template": "",\n "updated_at": "",\n "url": "",\n "via_app": false,\n "via_email": false,\n "via_sms": false\n}' \
--output-document \
- {{baseUrl}}/notifications/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"add_tracking_link": false,
"assignee_proximity": "",
"created_at": "",
"emails": [],
"event": "",
"id": "",
"message": "",
"method": "",
"phones": [],
"recipient": "",
"sent_at": "",
"sms_count": 0,
"state": "",
"task": "",
"template": "",
"updated_at": "",
"url": "",
"via_app": false,
"via_email": false,
"via_sms": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notifications/")! 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
notifications_list
{{baseUrl}}/notifications/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notifications/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/notifications/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/notifications/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/notifications/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/notifications/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notifications/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/notifications/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/notifications/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notifications/"))
.header("authorization", "{{apiKey}}")
.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}}/notifications/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/notifications/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/notifications/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/notifications/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notifications/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notifications/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/notifications/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/notifications/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/notifications/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/notifications/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/notifications/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notifications/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notifications/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notifications/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notifications/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/notifications/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notifications/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/notifications/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notifications/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notifications/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/notifications/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notifications/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notifications/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notifications/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/notifications/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notifications/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/notifications/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/notifications/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/notifications/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notifications/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
notifications_retrieve
{{baseUrl}}/notifications/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/notifications/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/notifications/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/notifications/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/notifications/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/notifications/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/notifications/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/notifications/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/notifications/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/notifications/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/notifications/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/notifications/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/notifications/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/notifications/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/notifications/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/notifications/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/notifications/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/notifications/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/notifications/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/notifications/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/notifications/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/notifications/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/notifications/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/notifications/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/notifications/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/notifications/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/notifications/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/notifications/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/notifications/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/notifications/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/notifications/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/notifications/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/notifications/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/notifications/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/notifications/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/notifications/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/notifications/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
orders_create
{{baseUrl}}/orders/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/orders/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:auto_assign false
:client ""
:created_at ""
:created_by ""
:description ""
:documents []
:external_id ""
:id ""
:orderer {:company ""
:emails []
:name ""
:notes ""
:phones []}
:reference ""
:tasks []
:tasks_data [{:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}]
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/orders/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/orders/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/orders/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1705
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/orders/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/orders/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/orders/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
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}}/orders/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/orders/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","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}}/orders/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/orders/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/orders/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/orders/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
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}}/orders/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
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}}/orders/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"auto_assign": @NO,
@"client": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"documents": @[ ],
@"external_id": @"",
@"id": @"",
@"orderer": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"reference": @"",
@"tasks": @[ ],
@"tasks_data": @[ @{ @"account": @"", @"actions": @{ }, @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" }, @"assignee": @"", @"assignee_proximity": @"", @"auto_assign": @NO, @"barcodes": @[ ], @"cancelled_at": @"", @"category": @"", @"complete_after": @"", @"complete_before": @"", @"completed_at": @"", @"contact": @{ }, @"contact_address": @"", @"contact_address_external_id": @"", @"counts": @{ }, @"created_at": @"", @"description": @"", @"documents": @[ ], @"duration": @{ }, @"external_id": @"", @"forms": @{ }, @"id": @"", @"issues": @[ ], @"metafields": @{ }, @"order": @"", @"orderer": @"", @"orderer_name": @"", @"position": @"", @"priority": @0, @"reference": @"", @"route": @"", @"scheduled_time": @"", @"signatures": @[ ], @"size": @[ ], @"state": @"", @"trackers": @[ ], @"updated_at": @"", @"url": @"" } ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/orders/', [
'body' => '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/orders/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/orders/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/"
payload = {
"account": "",
"auto_assign": False,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/"
payload <- "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/orders/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/";
let payload = json!({
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": (),
"external_id": "",
"id": "",
"orderer": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"reference": "",
"tasks": (),
"tasks_data": (
json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
})
),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/orders/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/orders/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/orders/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"reference": "",
"tasks": [],
"tasks_data": [
[
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
]
],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
orders_list
{{baseUrl}}/orders/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/orders/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/orders/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/orders/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/orders/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/orders/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/"))
.header("authorization", "{{apiKey}}")
.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}}/orders/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/orders/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/orders/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/orders/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/orders/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/orders/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/orders/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/orders/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/orders/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/orders/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/orders/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/orders/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/orders/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/orders/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/orders/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/orders/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/orders/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
orders_partial_update
{{baseUrl}}/orders/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/orders/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:auto_assign false
:client ""
:created_at ""
:created_by ""
:description ""
:documents []
:external_id ""
:id ""
:orderer {:company ""
:emails []
:name ""
:notes ""
:phones []}
:reference ""
:tasks []
:tasks_data [{:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}]
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/orders/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/orders/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/orders/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1705
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/orders/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/orders/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/orders/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/orders/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","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}}/orders/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/orders/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/orders/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
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('PATCH', '{{baseUrl}}/orders/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"auto_assign": @NO,
@"client": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"documents": @[ ],
@"external_id": @"",
@"id": @"",
@"orderer": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"reference": @"",
@"tasks": @[ ],
@"tasks_data": @[ @{ @"account": @"", @"actions": @{ }, @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" }, @"assignee": @"", @"assignee_proximity": @"", @"auto_assign": @NO, @"barcodes": @[ ], @"cancelled_at": @"", @"category": @"", @"complete_after": @"", @"complete_before": @"", @"completed_at": @"", @"contact": @{ }, @"contact_address": @"", @"contact_address_external_id": @"", @"counts": @{ }, @"created_at": @"", @"description": @"", @"documents": @[ ], @"duration": @{ }, @"external_id": @"", @"forms": @{ }, @"id": @"", @"issues": @[ ], @"metafields": @{ }, @"order": @"", @"orderer": @"", @"orderer_name": @"", @"position": @"", @"priority": @0, @"reference": @"", @"route": @"", @"scheduled_time": @"", @"signatures": @[ ], @"size": @[ ], @"state": @"", @"trackers": @[ ], @"updated_at": @"", @"url": @"" } ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/orders/:id/', [
'body' => '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/orders/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/orders/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/:id/"
payload = {
"account": "",
"auto_assign": False,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/:id/"
payload <- "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/orders/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/:id/";
let payload = json!({
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": (),
"external_id": "",
"id": "",
"orderer": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"reference": "",
"tasks": (),
"tasks_data": (
json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
})
),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/orders/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/orders/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/orders/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"reference": "",
"tasks": [],
"tasks_data": [
[
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
]
],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
orders_retrieve
{{baseUrl}}/orders/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/orders/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/orders/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/orders/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/orders/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/orders/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/orders/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/orders/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/orders/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/orders/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/orders/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/orders/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/orders/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/orders/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/orders/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/orders/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/orders/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/orders/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/orders/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/orders/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/orders/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/orders/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
orders_update
{{baseUrl}}/orders/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/orders/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:auto_assign false
:client ""
:created_at ""
:created_by ""
:description ""
:documents []
:external_id ""
:id ""
:orderer {:company ""
:emails []
:name ""
:notes ""
:phones []}
:reference ""
:tasks []
:tasks_data [{:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}]
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/orders/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/orders/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/orders/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1705
{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/orders/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/orders/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/orders/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/orders/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","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}}/orders/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/orders/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/orders/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/orders/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/orders/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
auto_assign: false,
client: '',
created_at: '',
created_by: '',
description: '',
documents: [],
external_id: '',
id: '',
orderer: {company: '', emails: [], name: '', notes: '', phones: []},
reference: '',
tasks: [],
tasks_data: [
{
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","auto_assign":false,"client":"","created_at":"","created_by":"","description":"","documents":[],"external_id":"","id":"","orderer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"reference":"","tasks":[],"tasks_data":[{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"auto_assign": @NO,
@"client": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"documents": @[ ],
@"external_id": @"",
@"id": @"",
@"orderer": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"reference": @"",
@"tasks": @[ ],
@"tasks_data": @[ @{ @"account": @"", @"actions": @{ }, @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" }, @"assignee": @"", @"assignee_proximity": @"", @"auto_assign": @NO, @"barcodes": @[ ], @"cancelled_at": @"", @"category": @"", @"complete_after": @"", @"complete_before": @"", @"completed_at": @"", @"contact": @{ }, @"contact_address": @"", @"contact_address_external_id": @"", @"counts": @{ }, @"created_at": @"", @"description": @"", @"documents": @[ ], @"duration": @{ }, @"external_id": @"", @"forms": @{ }, @"id": @"", @"issues": @[ ], @"metafields": @{ }, @"order": @"", @"orderer": @"", @"orderer_name": @"", @"position": @"", @"priority": @0, @"reference": @"", @"route": @"", @"scheduled_time": @"", @"signatures": @[ ], @"size": @[ ], @"state": @"", @"trackers": @[ ], @"updated_at": @"", @"url": @"" } ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/orders/:id/', [
'body' => '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'auto_assign' => null,
'client' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'documents' => [
],
'external_id' => '',
'id' => '',
'orderer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'reference' => '',
'tasks' => [
],
'tasks_data' => [
[
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/orders/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/orders/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/:id/"
payload = {
"account": "",
"auto_assign": False,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/:id/"
payload <- "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/orders/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"auto_assign\": false,\n \"client\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"external_id\": \"\",\n \"id\": \"\",\n \"orderer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"reference\": \"\",\n \"tasks\": [],\n \"tasks_data\": [\n {\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {},\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n }\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/:id/";
let payload = json!({
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": (),
"external_id": "",
"id": "",
"orderer": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"reference": "",
"tasks": (),
"tasks_data": (
json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
})
),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/orders/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"reference": "",
"tasks": [],
"tasks_data": [
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
],
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/orders/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "auto_assign": false,\n "client": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "documents": [],\n "external_id": "",\n "id": "",\n "orderer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "reference": "",\n "tasks": [],\n "tasks_data": [\n {\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {},\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n }\n ],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/orders/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"auto_assign": false,
"client": "",
"created_at": "",
"created_by": "",
"description": "",
"documents": [],
"external_id": "",
"id": "",
"orderer": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"reference": "",
"tasks": [],
"tasks_data": [
[
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
]
],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
password_change_create
{{baseUrl}}/password_change/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"new_password1": "",
"new_password2": "",
"old_password": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/password_change/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/password_change/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:new_password1 ""
:new_password2 ""
:old_password ""}})
require "http/client"
url = "{{baseUrl}}/password_change/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\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}}/password_change/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\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}}/password_change/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/password_change/"
payload := strings.NewReader("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/password_change/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 70
{
"new_password1": "",
"new_password2": "",
"old_password": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/password_change/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/password_change/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\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 \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/password_change/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/password_change/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}")
.asString();
const data = JSON.stringify({
new_password1: '',
new_password2: '',
old_password: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/password_change/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/password_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {new_password1: '', new_password2: '', old_password: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/password_change/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"new_password1":"","new_password2":"","old_password":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/password_change/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "new_password1": "",\n "new_password2": "",\n "old_password": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/password_change/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/password_change/',
headers: {
authorization: '{{apiKey}}',
'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({new_password1: '', new_password2: '', old_password: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/password_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {new_password1: '', new_password2: '', old_password: ''},
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}}/password_change/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
new_password1: '',
new_password2: '',
old_password: ''
});
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}}/password_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {new_password1: '', new_password2: '', old_password: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/password_change/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"new_password1":"","new_password2":"","old_password":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"new_password1": @"",
@"new_password2": @"",
@"old_password": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/password_change/"]
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}}/password_change/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/password_change/",
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([
'new_password1' => '',
'new_password2' => '',
'old_password' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/password_change/', [
'body' => '{
"new_password1": "",
"new_password2": "",
"old_password": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/password_change/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'new_password1' => '',
'new_password2' => '',
'old_password' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'new_password1' => '',
'new_password2' => '',
'old_password' => ''
]));
$request->setRequestUrl('{{baseUrl}}/password_change/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/password_change/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"new_password1": "",
"new_password2": "",
"old_password": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/password_change/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"new_password1": "",
"new_password2": "",
"old_password": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/password_change/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/password_change/"
payload = {
"new_password1": "",
"new_password2": "",
"old_password": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/password_change/"
payload <- "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/password_change/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\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/password_change/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"old_password\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/password_change/";
let payload = json!({
"new_password1": "",
"new_password2": "",
"old_password": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/password_change/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"new_password1": "",
"new_password2": "",
"old_password": ""
}'
echo '{
"new_password1": "",
"new_password2": "",
"old_password": ""
}' | \
http POST {{baseUrl}}/password_change/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "new_password1": "",\n "new_password2": "",\n "old_password": ""\n}' \
--output-document \
- {{baseUrl}}/password_change/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"new_password1": "",
"new_password2": "",
"old_password": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/password_change/")! 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
password_reset_create
{{baseUrl}}/password_reset/
BODY json
{
"email": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/password_reset/");
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 \"email\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/password_reset/" {:content-type :json
:form-params {:email ""}})
require "http/client"
url = "{{baseUrl}}/password_reset/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"email\": \"\"\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}}/password_reset/"),
Content = new StringContent("{\n \"email\": \"\"\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}}/password_reset/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"email\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/password_reset/"
payload := strings.NewReader("{\n \"email\": \"\"\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/password_reset/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"email": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/password_reset/")
.setHeader("content-type", "application/json")
.setBody("{\n \"email\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/password_reset/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"email\": \"\"\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 \"email\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/password_reset/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/password_reset/")
.header("content-type", "application/json")
.body("{\n \"email\": \"\"\n}")
.asString();
const data = JSON.stringify({
email: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/password_reset/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/password_reset/',
headers: {'content-type': 'application/json'},
data: {email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/password_reset/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"email":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/password_reset/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "email": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"email\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/password_reset/")
.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/password_reset/',
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({email: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/password_reset/',
headers: {'content-type': 'application/json'},
body: {email: ''},
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}}/password_reset/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
email: ''
});
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}}/password_reset/',
headers: {'content-type': 'application/json'},
data: {email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/password_reset/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"email":""}'
};
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 = @{ @"email": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/password_reset/"]
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}}/password_reset/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"email\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/password_reset/",
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([
'email' => ''
]),
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}}/password_reset/', [
'body' => '{
"email": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/password_reset/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'email' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'email' => ''
]));
$request->setRequestUrl('{{baseUrl}}/password_reset/');
$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}}/password_reset/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"email": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/password_reset/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"email": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"email\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/password_reset/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/password_reset/"
payload = { "email": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/password_reset/"
payload <- "{\n \"email\": \"\"\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}}/password_reset/")
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 \"email\": \"\"\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/password_reset/') do |req|
req.body = "{\n \"email\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/password_reset/";
let payload = json!({"email": ""});
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}}/password_reset/ \
--header 'content-type: application/json' \
--data '{
"email": ""
}'
echo '{
"email": ""
}' | \
http POST {{baseUrl}}/password_reset/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "email": ""\n}' \
--output-document \
- {{baseUrl}}/password_reset/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["email": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/password_reset/")! 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
password_reset_confirm_create
{{baseUrl}}/password_reset_confirm/
BODY json
{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/password_reset_confirm/");
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 \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/password_reset_confirm/" {:content-type :json
:form-params {:new_password1 ""
:new_password2 ""
:token ""
:uidb64 ""}})
require "http/client"
url = "{{baseUrl}}/password_reset_confirm/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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}}/password_reset_confirm/"),
Content = new StringContent("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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}}/password_reset_confirm/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/password_reset_confirm/"
payload := strings.NewReader("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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/password_reset_confirm/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/password_reset_confirm/")
.setHeader("content-type", "application/json")
.setBody("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/password_reset_confirm/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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 \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/password_reset_confirm/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/password_reset_confirm/")
.header("content-type", "application/json")
.body("{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}")
.asString();
const data = JSON.stringify({
new_password1: '',
new_password2: '',
token: '',
uidb64: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/password_reset_confirm/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/password_reset_confirm/',
headers: {'content-type': 'application/json'},
data: {new_password1: '', new_password2: '', token: '', uidb64: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/password_reset_confirm/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"new_password1":"","new_password2":"","token":"","uidb64":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/password_reset_confirm/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "new_password1": "",\n "new_password2": "",\n "token": "",\n "uidb64": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/password_reset_confirm/")
.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/password_reset_confirm/',
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({new_password1: '', new_password2: '', token: '', uidb64: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/password_reset_confirm/',
headers: {'content-type': 'application/json'},
body: {new_password1: '', new_password2: '', token: '', uidb64: ''},
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}}/password_reset_confirm/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
new_password1: '',
new_password2: '',
token: '',
uidb64: ''
});
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}}/password_reset_confirm/',
headers: {'content-type': 'application/json'},
data: {new_password1: '', new_password2: '', token: '', uidb64: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/password_reset_confirm/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"new_password1":"","new_password2":"","token":"","uidb64":""}'
};
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 = @{ @"new_password1": @"",
@"new_password2": @"",
@"token": @"",
@"uidb64": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/password_reset_confirm/"]
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}}/password_reset_confirm/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/password_reset_confirm/",
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([
'new_password1' => '',
'new_password2' => '',
'token' => '',
'uidb64' => ''
]),
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}}/password_reset_confirm/', [
'body' => '{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/password_reset_confirm/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'new_password1' => '',
'new_password2' => '',
'token' => '',
'uidb64' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'new_password1' => '',
'new_password2' => '',
'token' => '',
'uidb64' => ''
]));
$request->setRequestUrl('{{baseUrl}}/password_reset_confirm/');
$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}}/password_reset_confirm/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/password_reset_confirm/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/password_reset_confirm/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/password_reset_confirm/"
payload = {
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/password_reset_confirm/"
payload <- "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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}}/password_reset_confirm/")
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 \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\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/password_reset_confirm/') do |req|
req.body = "{\n \"new_password1\": \"\",\n \"new_password2\": \"\",\n \"token\": \"\",\n \"uidb64\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/password_reset_confirm/";
let payload = json!({
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
});
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}}/password_reset_confirm/ \
--header 'content-type: application/json' \
--data '{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}'
echo '{
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
}' | \
http POST {{baseUrl}}/password_reset_confirm/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "new_password1": "",\n "new_password2": "",\n "token": "",\n "uidb64": ""\n}' \
--output-document \
- {{baseUrl}}/password_reset_confirm/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"new_password1": "",
"new_password2": "",
"token": "",
"uidb64": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/password_reset_confirm/")! 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
push_notifications_create
{{baseUrl}}/push_notifications/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/push_notifications/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:error ""
:event ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:pending_at ""
:recipient ""
:sent_at ""
:state ""
:subject ""
:task ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/push_notifications/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\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}}/push_notifications/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/push_notifications/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 275
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/push_notifications/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/push_notifications/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/push_notifications/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/push_notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","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}}/push_notifications/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/push_notifications/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/push_notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"error": @"",
@"event": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"pending_at": @"",
@"recipient": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"task": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/"]
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}}/push_notifications/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/push_notifications/', [
'body' => '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/push_notifications/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/push_notifications/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/"
payload = {
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/push_notifications/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/";
let payload = json!({
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/push_notifications/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}' | \
http POST {{baseUrl}}/push_notifications/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/push_notifications/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/")! 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
push_notifications_destroy
{{baseUrl}}/push_notifications/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/push_notifications/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/push_notifications/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/push_notifications/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/push_notifications/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/push_notifications/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/push_notifications/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/push_notifications/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/push_notifications/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/push_notifications/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/push_notifications/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/push_notifications/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/push_notifications/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/push_notifications/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/push_notifications/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/push_notifications/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/push_notifications/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/push_notifications/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/push_notifications/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/push_notifications/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
push_notifications_list
{{baseUrl}}/push_notifications/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/push_notifications/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/push_notifications/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/push_notifications/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/push_notifications/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/push_notifications/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/"))
.header("authorization", "{{apiKey}}")
.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}}/push_notifications/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/push_notifications/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/push_notifications/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/push_notifications/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/push_notifications/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/push_notifications/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/push_notifications/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/push_notifications/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/push_notifications/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/push_notifications/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/push_notifications/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/push_notifications/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/push_notifications/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/push_notifications/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/push_notifications/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/push_notifications/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/push_notifications/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
push_notifications_partial_update
{{baseUrl}}/push_notifications/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/push_notifications/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:error ""
:event ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:pending_at ""
:recipient ""
:sent_at ""
:state ""
:subject ""
:task ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/push_notifications/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/push_notifications/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/push_notifications/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 275
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/push_notifications/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/push_notifications/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/push_notifications/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","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}}/push_notifications/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/push_notifications/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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('PATCH', '{{baseUrl}}/push_notifications/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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: 'PATCH',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"error": @"",
@"event": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"pending_at": @"",
@"recipient": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"task": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/push_notifications/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/push_notifications/:id/', [
'body' => '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/push_notifications/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/push_notifications/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/:id/"
payload = {
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/push_notifications/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/:id/";
let payload = json!({
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/push_notifications/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/push_notifications/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/push_notifications/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
push_notifications_resend_create
{{baseUrl}}/push_notifications/:id/resend/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/:id/resend/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/push_notifications/:id/resend/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:error ""
:event ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:pending_at ""
:recipient ""
:sent_at ""
:state ""
:subject ""
:task ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/push_notifications/:id/resend/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\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}}/push_notifications/:id/resend/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/:id/resend/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/:id/resend/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/push_notifications/:id/resend/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 275
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/push_notifications/:id/resend/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/:id/resend/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/push_notifications/:id/resend/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/:id/resend/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/push_notifications/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","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}}/push_notifications/:id/resend/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/push_notifications/:id/resend/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/push_notifications/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/:id/resend/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
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}}/push_notifications/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"error": @"",
@"event": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"pending_at": @"",
@"recipient": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"task": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/:id/resend/"]
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}}/push_notifications/:id/resend/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/:id/resend/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/push_notifications/:id/resend/', [
'body' => '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/:id/resend/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/push_notifications/:id/resend/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/push_notifications/:id/resend/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/:id/resend/"
payload = {
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/:id/resend/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/:id/resend/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/push_notifications/:id/resend/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/:id/resend/";
let payload = json!({
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/push_notifications/:id/resend/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}' | \
http POST {{baseUrl}}/push_notifications/:id/resend/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/push_notifications/:id/resend/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/:id/resend/")! 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
push_notifications_retrieve
{{baseUrl}}/push_notifications/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/push_notifications/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/push_notifications/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/push_notifications/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/push_notifications/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/push_notifications/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/push_notifications/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/push_notifications/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/push_notifications/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/push_notifications/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/push_notifications/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/push_notifications/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/push_notifications/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/push_notifications/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/push_notifications/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/push_notifications/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/push_notifications/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/push_notifications/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/push_notifications/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/push_notifications/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
push_notifications_update
{{baseUrl}}/push_notifications/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/push_notifications/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/push_notifications/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:error ""
:event ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:pending_at ""
:recipient ""
:sent_at ""
:state ""
:subject ""
:task ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/push_notifications/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/push_notifications/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/push_notifications/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/push_notifications/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/push_notifications/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 275
{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/push_notifications/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/push_notifications/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/push_notifications/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/push_notifications/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","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}}/push_notifications/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/push_notifications/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/push_notifications/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/push_notifications/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/push_notifications/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
error: '',
event: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
pending_at: '',
recipient: '',
sent_at: '',
state: '',
subject: '',
task: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/push_notifications/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","error":"","event":"","external_id":"","failed_at":"","id":"","message":"","notification":"","pending_at":"","recipient":"","sent_at":"","state":"","subject":"","task":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"error": @"",
@"event": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"pending_at": @"",
@"recipient": @"",
@"sent_at": @"",
@"state": @"",
@"subject": @"",
@"task": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/push_notifications/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/push_notifications/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/push_notifications/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/push_notifications/:id/', [
'body' => '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/push_notifications/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'error' => '',
'event' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'pending_at' => '',
'recipient' => '',
'sent_at' => '',
'state' => '',
'subject' => '',
'task' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/push_notifications/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/push_notifications/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/push_notifications/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/push_notifications/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/push_notifications/:id/"
payload = {
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/push_notifications/:id/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/push_notifications/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/push_notifications/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"event\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"pending_at\": \"\",\n \"recipient\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"subject\": \"\",\n \"task\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/push_notifications/:id/";
let payload = json!({
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/push_notifications/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
}' | \
http PUT {{baseUrl}}/push_notifications/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "error": "",\n "event": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "pending_at": "",\n "recipient": "",\n "sent_at": "",\n "state": "",\n "subject": "",\n "task": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/push_notifications/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"error": "",
"event": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"pending_at": "",
"recipient": "",
"sent_at": "",
"state": "",
"subject": "",
"task": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/push_notifications/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
recurrences_create
{{baseUrl}}/recurrences/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/recurrences/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/recurrences/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:created_at ""
:created_by ""
:id ""
:is_active false
:last_recurred_at ""
:last_scheduled_at ""
:next_scheduled_at ""
:order ""
:rrule ""
:tasks_data {}
:timezone ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/recurrences/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/recurrences/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/recurrences/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/recurrences/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/recurrences/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/recurrences/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/recurrences/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/recurrences/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/recurrences/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
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}}/recurrences/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/recurrences/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/recurrences/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","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}}/recurrences/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/recurrences/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/recurrences/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/recurrences/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
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}}/recurrences/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
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}}/recurrences/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/recurrences/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"created_at": @"",
@"created_by": @"",
@"id": @"",
@"is_active": @NO,
@"last_recurred_at": @"",
@"last_scheduled_at": @"",
@"next_scheduled_at": @"",
@"order": @"",
@"rrule": @"",
@"tasks_data": @{ },
@"timezone": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/recurrences/"]
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}}/recurrences/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/recurrences/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/recurrences/', [
'body' => '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/recurrences/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/recurrences/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/recurrences/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/recurrences/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/recurrences/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/recurrences/"
payload = {
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": False,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/recurrences/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/recurrences/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/recurrences/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/recurrences/";
let payload = json!({
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": json!({}),
"timezone": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/recurrences/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/recurrences/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/recurrences/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": [],
"timezone": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/recurrences/")! 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
recurrences_list
{{baseUrl}}/recurrences/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/recurrences/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/recurrences/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/recurrences/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/recurrences/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/recurrences/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/recurrences/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/recurrences/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/recurrences/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/recurrences/"))
.header("authorization", "{{apiKey}}")
.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}}/recurrences/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/recurrences/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/recurrences/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/recurrences/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/recurrences/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/recurrences/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/recurrences/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/recurrences/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/recurrences/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/recurrences/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/recurrences/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/recurrences/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/recurrences/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/recurrences/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/recurrences/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/recurrences/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/recurrences/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/recurrences/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/recurrences/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/recurrences/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/recurrences/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/recurrences/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/recurrences/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/recurrences/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/recurrences/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/recurrences/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/recurrences/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/recurrences/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/recurrences/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/recurrences/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
recurrences_partial_update
{{baseUrl}}/recurrences/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/recurrences/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/recurrences/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:created_at ""
:created_by ""
:id ""
:is_active false
:last_recurred_at ""
:last_scheduled_at ""
:next_scheduled_at ""
:order ""
:rrule ""
:tasks_data {}
:timezone ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/recurrences/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/recurrences/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/recurrences/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/recurrences/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/recurrences/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/recurrences/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/recurrences/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/recurrences/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/recurrences/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/recurrences/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/recurrences/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","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}}/recurrences/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/recurrences/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/recurrences/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
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('PATCH', '{{baseUrl}}/recurrences/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/recurrences/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"created_at": @"",
@"created_by": @"",
@"id": @"",
@"is_active": @NO,
@"last_recurred_at": @"",
@"last_scheduled_at": @"",
@"next_scheduled_at": @"",
@"order": @"",
@"rrule": @"",
@"tasks_data": @{ },
@"timezone": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/recurrences/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/recurrences/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/recurrences/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/recurrences/:id/', [
'body' => '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/recurrences/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/recurrences/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/recurrences/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/recurrences/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/recurrences/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/recurrences/:id/"
payload = {
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": False,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/recurrences/:id/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/recurrences/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/recurrences/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/recurrences/:id/";
let payload = json!({
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": json!({}),
"timezone": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/recurrences/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/recurrences/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/recurrences/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": [],
"timezone": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/recurrences/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
recurrences_retrieve
{{baseUrl}}/recurrences/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/recurrences/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/recurrences/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/recurrences/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/recurrences/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/recurrences/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/recurrences/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/recurrences/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/recurrences/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/recurrences/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/recurrences/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/recurrences/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/recurrences/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/recurrences/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/recurrences/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/recurrences/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/recurrences/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/recurrences/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/recurrences/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/recurrences/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/recurrences/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/recurrences/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/recurrences/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/recurrences/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/recurrences/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/recurrences/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/recurrences/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/recurrences/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/recurrences/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/recurrences/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/recurrences/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/recurrences/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/recurrences/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/recurrences/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/recurrences/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/recurrences/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/recurrences/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
recurrences_update
{{baseUrl}}/recurrences/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/recurrences/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/recurrences/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:created_at ""
:created_by ""
:id ""
:is_active false
:last_recurred_at ""
:last_scheduled_at ""
:next_scheduled_at ""
:order ""
:rrule ""
:tasks_data {}
:timezone ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/recurrences/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/recurrences/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/recurrences/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/recurrences/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/recurrences/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 292
{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/recurrences/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/recurrences/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/recurrences/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/recurrences/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/recurrences/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/recurrences/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","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}}/recurrences/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/recurrences/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/recurrences/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/recurrences/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/recurrences/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
created_at: '',
created_by: '',
id: '',
is_active: false,
last_recurred_at: '',
last_scheduled_at: '',
next_scheduled_at: '',
order: '',
rrule: '',
tasks_data: {},
timezone: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/recurrences/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","created_at":"","created_by":"","id":"","is_active":false,"last_recurred_at":"","last_scheduled_at":"","next_scheduled_at":"","order":"","rrule":"","tasks_data":{},"timezone":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"created_at": @"",
@"created_by": @"",
@"id": @"",
@"is_active": @NO,
@"last_recurred_at": @"",
@"last_scheduled_at": @"",
@"next_scheduled_at": @"",
@"order": @"",
@"rrule": @"",
@"tasks_data": @{ },
@"timezone": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/recurrences/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/recurrences/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/recurrences/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/recurrences/:id/', [
'body' => '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/recurrences/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'created_at' => '',
'created_by' => '',
'id' => '',
'is_active' => null,
'last_recurred_at' => '',
'last_scheduled_at' => '',
'next_scheduled_at' => '',
'order' => '',
'rrule' => '',
'tasks_data' => [
],
'timezone' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/recurrences/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/recurrences/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/recurrences/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/recurrences/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/recurrences/:id/"
payload = {
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": False,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/recurrences/:id/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/recurrences/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/recurrences/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"id\": \"\",\n \"is_active\": false,\n \"last_recurred_at\": \"\",\n \"last_scheduled_at\": \"\",\n \"next_scheduled_at\": \"\",\n \"order\": \"\",\n \"rrule\": \"\",\n \"tasks_data\": {},\n \"timezone\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/recurrences/:id/";
let payload = json!({
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": json!({}),
"timezone": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/recurrences/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": {},
"timezone": "",
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/recurrences/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "created_at": "",\n "created_by": "",\n "id": "",\n "is_active": false,\n "last_recurred_at": "",\n "last_scheduled_at": "",\n "next_scheduled_at": "",\n "order": "",\n "rrule": "",\n "tasks_data": {},\n "timezone": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/recurrences/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"created_at": "",
"created_by": "",
"id": "",
"is_active": false,
"last_recurred_at": "",
"last_scheduled_at": "",
"next_scheduled_at": "",
"order": "",
"rrule": "",
"tasks_data": [],
"timezone": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/recurrences/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
register_create
{{baseUrl}}/register/
BODY json
{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/register/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/register/" {:content-type :json
:form-params {:account {:country_code ""
:id ""
:language ""
:name ""
:timezone ""
:type ""
:url ""
:website ""}
:token ""
:user {:email ""
:id ""
:name ""
:password ""
:phone ""
:url ""}}})
require "http/client"
url = "{{baseUrl}}/register/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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}}/register/"),
Content = new StringContent("{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/register/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/register/"
payload := strings.NewReader("{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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/register/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 295
{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/register/")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/register/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/register/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/register/")
.header("content-type", "application/json")
.body("{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {
email: '',
id: '',
name: '',
password: '',
phone: '',
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}}/register/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/register/',
headers: {'content-type': 'application/json'},
data: {
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {email: '', id: '', name: '', password: '', phone: '', url: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/register/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account":{"country_code":"","id":"","language":"","name":"","timezone":"","type":"","url":"","website":""},"token":"","user":{"email":"","id":"","name":"","password":"","phone":"","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}}/register/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": {\n "country_code": "",\n "id": "",\n "language": "",\n "name": "",\n "timezone": "",\n "type": "",\n "url": "",\n "website": ""\n },\n "token": "",\n "user": {\n "email": "",\n "id": "",\n "name": "",\n "password": "",\n "phone": "",\n "url": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/register/")
.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/register/',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {email: '', id: '', name: '', password: '', phone: '', url: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/register/',
headers: {'content-type': 'application/json'},
body: {
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {email: '', id: '', name: '', password: '', phone: '', 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}}/register/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {
email: '',
id: '',
name: '',
password: '',
phone: '',
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}}/register/',
headers: {'content-type': 'application/json'},
data: {
account: {
country_code: '',
id: '',
language: '',
name: '',
timezone: '',
type: '',
url: '',
website: ''
},
token: '',
user: {email: '', id: '', name: '', password: '', phone: '', url: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/register/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account":{"country_code":"","id":"","language":"","name":"","timezone":"","type":"","url":"","website":""},"token":"","user":{"email":"","id":"","name":"","password":"","phone":"","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 = @{ @"account": @{ @"country_code": @"", @"id": @"", @"language": @"", @"name": @"", @"timezone": @"", @"type": @"", @"url": @"", @"website": @"" },
@"token": @"",
@"user": @{ @"email": @"", @"id": @"", @"name": @"", @"password": @"", @"phone": @"", @"url": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/register/"]
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}}/register/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/register/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => [
'country_code' => '',
'id' => '',
'language' => '',
'name' => '',
'timezone' => '',
'type' => '',
'url' => '',
'website' => ''
],
'token' => '',
'user' => [
'email' => '',
'id' => '',
'name' => '',
'password' => '',
'phone' => '',
'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}}/register/', [
'body' => '{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/register/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => [
'country_code' => '',
'id' => '',
'language' => '',
'name' => '',
'timezone' => '',
'type' => '',
'url' => '',
'website' => ''
],
'token' => '',
'user' => [
'email' => '',
'id' => '',
'name' => '',
'password' => '',
'phone' => '',
'url' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => [
'country_code' => '',
'id' => '',
'language' => '',
'name' => '',
'timezone' => '',
'type' => '',
'url' => '',
'website' => ''
],
'token' => '',
'user' => [
'email' => '',
'id' => '',
'name' => '',
'password' => '',
'phone' => '',
'url' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/register/');
$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}}/register/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/register/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/register/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/register/"
payload = {
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/register/"
payload <- "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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}}/register/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/register/') do |req|
req.body = "{\n \"account\": {\n \"country_code\": \"\",\n \"id\": \"\",\n \"language\": \"\",\n \"name\": \"\",\n \"timezone\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"website\": \"\"\n },\n \"token\": \"\",\n \"user\": {\n \"email\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/register/";
let payload = json!({
"account": json!({
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
}),
"token": "",
"user": json!({
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"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}}/register/ \
--header 'content-type: application/json' \
--data '{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}'
echo '{
"account": {
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
},
"token": "",
"user": {
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
}
}' | \
http POST {{baseUrl}}/register/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account": {\n "country_code": "",\n "id": "",\n "language": "",\n "name": "",\n "timezone": "",\n "type": "",\n "url": "",\n "website": ""\n },\n "token": "",\n "user": {\n "email": "",\n "id": "",\n "name": "",\n "password": "",\n "phone": "",\n "url": ""\n }\n}' \
--output-document \
- {{baseUrl}}/register/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account": [
"country_code": "",
"id": "",
"language": "",
"name": "",
"timezone": "",
"type": "",
"url": "",
"website": ""
],
"token": "",
"user": [
"email": "",
"id": "",
"name": "",
"password": "",
"phone": "",
"url": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/register/")! 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
reports_tasks_states_count_retrieve
{{baseUrl}}/reports/tasks/states_count/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
account
date_from
date_until
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/reports/tasks/states_count/" {:headers {:authorization "{{apiKey}}"}
:query-params {:account ""
:date_from ""
:date_until ""}})
require "http/client"
url = "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until="
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until="),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/reports/tasks/states_count/?account=&date_from=&date_until= HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until="))
.header("authorization", "{{apiKey}}")
.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/tasks/states_count/?account=&date_from=&date_until=")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=")
.header("authorization", "{{apiKey}}")
.asString();
const 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/tasks/states_count/?account=&date_from=&date_until=');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/reports/tasks/states_count/',
params: {account: '', date_from: '', date_until: ''},
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/tasks/states_count/?account=&date_from=&date_until=',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/reports/tasks/states_count/?account=&date_from=&date_until=',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/tasks/states_count/',
qs: {account: '', date_from: '', date_until: ''},
headers: {authorization: '{{apiKey}}'}
};
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/tasks/states_count/');
req.query({
account: '',
date_from: '',
date_until: ''
});
req.headers({
authorization: '{{apiKey}}'
});
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/tasks/states_count/',
params: {account: '', date_from: '', date_until: ''},
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/reports/tasks/states_count/');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'account' => '',
'date_from' => '',
'date_until' => ''
]);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reports/tasks/states_count/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'account' => '',
'date_from' => '',
'date_until' => ''
]));
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/reports/tasks/states_count/?account=&date_from=&date_until=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reports/tasks/states_count/"
querystring = {"account":"","date_from":"","date_until":""}
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reports/tasks/states_count/"
queryString <- list(
account = "",
date_from = "",
date_until = ""
)
response <- VERB("GET", url, query = queryString, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/reports/tasks/states_count/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.params['account'] = ''
req.params['date_from'] = ''
req.params['date_until'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reports/tasks/states_count/";
let querystring = [
("account", ""),
("date_from", ""),
("date_until", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=' \
--header 'authorization: {{apiKey}}'
http GET '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=' \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until='
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reports/tasks/states_count/?account=&date_from=&date_until=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
reviews_create
{{baseUrl}}/reviews/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reviews/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/reviews/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:comment ""
:created_at ""
:id ""
:last_assignee ""
:last_task ""
:rating 0
:tracker ""}})
require "http/client"
url = "{{baseUrl}}/reviews/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\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}}/reviews/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\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}}/reviews/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reviews/"
payload := strings.NewReader("{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/reviews/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 125
{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/reviews/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reviews/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/reviews/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/reviews/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}")
.asString();
const data = JSON.stringify({
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/reviews/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/reviews/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reviews/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"comment":"","created_at":"","id":"","last_assignee":"","last_task":"","rating":0,"tracker":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/reviews/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "comment": "",\n "created_at": "",\n "id": "",\n "last_assignee": "",\n "last_task": "",\n "rating": 0,\n "tracker": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/reviews/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/reviews/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/reviews/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
},
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}}/reviews/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
});
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}}/reviews/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
comment: '',
created_at: '',
id: '',
last_assignee: '',
last_task: '',
rating: 0,
tracker: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reviews/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"comment":"","created_at":"","id":"","last_assignee":"","last_task":"","rating":0,"tracker":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"comment": @"",
@"created_at": @"",
@"id": @"",
@"last_assignee": @"",
@"last_task": @"",
@"rating": @0,
@"tracker": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/reviews/"]
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}}/reviews/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reviews/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'comment' => '',
'created_at' => '',
'id' => '',
'last_assignee' => '',
'last_task' => '',
'rating' => 0,
'tracker' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/reviews/', [
'body' => '{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/reviews/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'comment' => '',
'created_at' => '',
'id' => '',
'last_assignee' => '',
'last_task' => '',
'rating' => 0,
'tracker' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'comment' => '',
'created_at' => '',
'id' => '',
'last_assignee' => '',
'last_task' => '',
'rating' => 0,
'tracker' => ''
]));
$request->setRequestUrl('{{baseUrl}}/reviews/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reviews/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reviews/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/reviews/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reviews/"
payload = {
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reviews/"
payload <- "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reviews/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\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/reviews/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"comment\": \"\",\n \"created_at\": \"\",\n \"id\": \"\",\n \"last_assignee\": \"\",\n \"last_task\": \"\",\n \"rating\": 0,\n \"tracker\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reviews/";
let payload = json!({
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/reviews/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}'
echo '{
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
}' | \
http POST {{baseUrl}}/reviews/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "comment": "",\n "created_at": "",\n "id": "",\n "last_assignee": "",\n "last_task": "",\n "rating": 0,\n "tracker": ""\n}' \
--output-document \
- {{baseUrl}}/reviews/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"comment": "",
"created_at": "",
"id": "",
"last_assignee": "",
"last_task": "",
"rating": 0,
"tracker": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reviews/")! 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
reviews_list
{{baseUrl}}/reviews/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reviews/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/reviews/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/reviews/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/reviews/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reviews/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reviews/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/reviews/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/reviews/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reviews/"))
.header("authorization", "{{apiKey}}")
.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}}/reviews/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/reviews/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/reviews/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/reviews/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reviews/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/reviews/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reviews/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/reviews/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/reviews/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/reviews/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/reviews/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reviews/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/reviews/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/reviews/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reviews/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/reviews/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/reviews/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reviews/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reviews/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reviews/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/reviews/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reviews/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reviews/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reviews/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/reviews/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reviews/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/reviews/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/reviews/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/reviews/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reviews/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
reviews_retrieve
{{baseUrl}}/reviews/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/reviews/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/reviews/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/reviews/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/reviews/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/reviews/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/reviews/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/reviews/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/reviews/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/reviews/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/reviews/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/reviews/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/reviews/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/reviews/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/reviews/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/reviews/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/reviews/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/reviews/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/reviews/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/reviews/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/reviews/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/reviews/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/reviews/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/reviews/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/reviews/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/reviews/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/reviews/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/reviews/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/reviews/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/reviews/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/reviews/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/reviews/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/reviews/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/reviews/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/reviews/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/reviews/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/reviews/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/reviews/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/reviews/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/reviews/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
route_optimizations_commit_create
{{baseUrl}}/route_optimizations/:id/commit/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/commit/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/route_optimizations/:id/commit/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignees []
:commit false
:commited_at ""
:completed_at ""
:created_at ""
:created_by ""
:end_location ""
:errors ""
:failed_at ""
:id ""
:objective ""
:ready_at ""
:scheduled_at ""
:start_location ""
:start_time ""
:started_at ""
:state ""
:tasks []
:total_distance 0
:total_duration {}
:unassign_not_optimal false
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/commit/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/route_optimizations/:id/commit/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/commit/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/commit/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/route_optimizations/:id/commit/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 475
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/route_optimizations/:id/commit/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/commit/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/commit/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/route_optimizations/:id/commit/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/commit/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/commit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/commit/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","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}}/route_optimizations/:id/commit/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/commit/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/route_optimizations/:id/commit/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/commit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/commit/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/commit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/commit/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignees": @[ ],
@"commit": @NO,
@"commited_at": @"",
@"completed_at": @"",
@"created_at": @"",
@"created_by": @"",
@"end_location": @"",
@"errors": @"",
@"failed_at": @"",
@"id": @"",
@"objective": @"",
@"ready_at": @"",
@"scheduled_at": @"",
@"start_location": @"",
@"start_time": @"",
@"started_at": @"",
@"state": @"",
@"tasks": @[ ],
@"total_distance": @0,
@"total_duration": @{ },
@"unassign_not_optimal": @NO,
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/commit/"]
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}}/route_optimizations/:id/commit/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/commit/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/route_optimizations/:id/commit/', [
'body' => '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/commit/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/route_optimizations/:id/commit/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/commit/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/commit/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/route_optimizations/:id/commit/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/commit/"
payload = {
"account": "",
"assignees": [],
"commit": False,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": False,
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/commit/"
payload <- "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/commit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/route_optimizations/:id/commit/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/commit/";
let payload = json!({
"account": "",
"assignees": (),
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": (),
"total_distance": 0,
"total_duration": json!({}),
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/route_optimizations/:id/commit/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/route_optimizations/:id/commit/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/commit/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": [],
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/commit/")! 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
route_optimizations_create
{{baseUrl}}/route_optimizations/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/route_optimizations/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignees []
:commit false
:commited_at ""
:completed_at ""
:created_at ""
:created_by ""
:end_location ""
:errors ""
:failed_at ""
:id ""
:objective ""
:ready_at ""
:scheduled_at ""
:start_location ""
:start_time ""
:started_at ""
:state ""
:tasks []
:total_distance 0
:total_duration {}
:unassign_not_optimal false
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/route_optimizations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/route_optimizations/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 475
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/route_optimizations/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/route_optimizations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/route_optimizations/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","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}}/route_optimizations/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/route_optimizations/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignees": @[ ],
@"commit": @NO,
@"commited_at": @"",
@"completed_at": @"",
@"created_at": @"",
@"created_by": @"",
@"end_location": @"",
@"errors": @"",
@"failed_at": @"",
@"id": @"",
@"objective": @"",
@"ready_at": @"",
@"scheduled_at": @"",
@"start_location": @"",
@"start_time": @"",
@"started_at": @"",
@"state": @"",
@"tasks": @[ ],
@"total_distance": @0,
@"total_duration": @{ },
@"unassign_not_optimal": @NO,
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/"]
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}}/route_optimizations/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/route_optimizations/', [
'body' => '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/route_optimizations/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/route_optimizations/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/"
payload = {
"account": "",
"assignees": [],
"commit": False,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": False,
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/"
payload <- "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/route_optimizations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/";
let payload = json!({
"account": "",
"assignees": (),
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": (),
"total_distance": 0,
"total_duration": json!({}),
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/route_optimizations/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/route_optimizations/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/route_optimizations/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": [],
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/")! 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
route_optimizations_list
{{baseUrl}}/route_optimizations/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/route_optimizations/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/route_optimizations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/route_optimizations/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/route_optimizations/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/"))
.header("authorization", "{{apiKey}}")
.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}}/route_optimizations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/route_optimizations/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/route_optimizations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/route_optimizations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/route_optimizations/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/route_optimizations/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/route_optimizations/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/route_optimizations/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/route_optimizations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/route_optimizations/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/route_optimizations/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/route_optimizations/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/route_optimizations/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/route_optimizations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/route_optimizations/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/route_optimizations/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/route_optimizations/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
route_optimizations_results_retrieve
{{baseUrl}}/route_optimizations/:id/results/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/results/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/route_optimizations/:id/results/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/results/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/route_optimizations/:id/results/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/results/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/results/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/route_optimizations/:id/results/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/route_optimizations/:id/results/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/results/"))
.header("authorization", "{{apiKey}}")
.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}}/route_optimizations/:id/results/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/route_optimizations/:id/results/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/route_optimizations/:id/results/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/route_optimizations/:id/results/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/results/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/route_optimizations/:id/results/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/results/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/route_optimizations/:id/results/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/route_optimizations/:id/results/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/route_optimizations/:id/results/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/route_optimizations/:id/results/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/results/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/results/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/route_optimizations/:id/results/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/results/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/route_optimizations/:id/results/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/results/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/route_optimizations/:id/results/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/results/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/results/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/route_optimizations/:id/results/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/results/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/results/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/results/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/route_optimizations/:id/results/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/results/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/route_optimizations/:id/results/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/route_optimizations/:id/results/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/results/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/results/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
route_optimizations_retrieve
{{baseUrl}}/route_optimizations/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/route_optimizations/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/route_optimizations/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/route_optimizations/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/route_optimizations/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/route_optimizations/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/route_optimizations/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/route_optimizations/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/route_optimizations/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/route_optimizations/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/route_optimizations/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/route_optimizations/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/route_optimizations/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/route_optimizations/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/route_optimizations/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/route_optimizations/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/route_optimizations/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/route_optimizations/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/route_optimizations/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/route_optimizations/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/route_optimizations/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
route_optimizations_routes_create
{{baseUrl}}/route_optimizations/:id/routes/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/routes/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/route_optimizations/:id/routes/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignees []
:commit false
:commited_at ""
:completed_at ""
:created_at ""
:created_by ""
:end_location ""
:errors ""
:failed_at ""
:id ""
:objective ""
:ready_at ""
:scheduled_at ""
:start_location ""
:start_time ""
:started_at ""
:state ""
:tasks []
:total_distance 0
:total_duration {}
:unassign_not_optimal false
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/routes/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/route_optimizations/:id/routes/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/routes/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/routes/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/route_optimizations/:id/routes/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 475
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/route_optimizations/:id/routes/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/routes/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/routes/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/route_optimizations/:id/routes/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/routes/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/routes/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","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}}/route_optimizations/:id/routes/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/routes/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/route_optimizations/:id/routes/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/routes/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/routes/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignees": @[ ],
@"commit": @NO,
@"commited_at": @"",
@"completed_at": @"",
@"created_at": @"",
@"created_by": @"",
@"end_location": @"",
@"errors": @"",
@"failed_at": @"",
@"id": @"",
@"objective": @"",
@"ready_at": @"",
@"scheduled_at": @"",
@"start_location": @"",
@"start_time": @"",
@"started_at": @"",
@"state": @"",
@"tasks": @[ ],
@"total_distance": @0,
@"total_duration": @{ },
@"unassign_not_optimal": @NO,
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/routes/"]
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}}/route_optimizations/:id/routes/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/routes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/route_optimizations/:id/routes/', [
'body' => '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/routes/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/route_optimizations/:id/routes/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/routes/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/routes/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/route_optimizations/:id/routes/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/routes/"
payload = {
"account": "",
"assignees": [],
"commit": False,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": False,
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/routes/"
payload <- "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/routes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/route_optimizations/:id/routes/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/routes/";
let payload = json!({
"account": "",
"assignees": (),
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": (),
"total_distance": 0,
"total_duration": json!({}),
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/route_optimizations/:id/routes/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/route_optimizations/:id/routes/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/routes/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": [],
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/routes/")! 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
route_optimizations_routes_retrieve
{{baseUrl}}/route_optimizations/:id/routes/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/routes/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/route_optimizations/:id/routes/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/routes/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/route_optimizations/:id/routes/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/routes/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/routes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/route_optimizations/:id/routes/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/route_optimizations/:id/routes/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/routes/"))
.header("authorization", "{{apiKey}}")
.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}}/route_optimizations/:id/routes/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/route_optimizations/:id/routes/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/route_optimizations/:id/routes/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/routes/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/route_optimizations/:id/routes/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/routes/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/route_optimizations/:id/routes/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/route_optimizations/:id/routes/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/route_optimizations/:id/routes/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/routes/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/routes/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/route_optimizations/:id/routes/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/routes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/route_optimizations/:id/routes/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/routes/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/route_optimizations/:id/routes/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/routes/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/routes/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/route_optimizations/:id/routes/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/routes/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/routes/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/routes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/route_optimizations/:id/routes/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/routes/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/route_optimizations/:id/routes/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/route_optimizations/:id/routes/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/routes/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/routes/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
route_optimizations_schedule_create
{{baseUrl}}/route_optimizations/:id/schedule/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/route_optimizations/:id/schedule/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/route_optimizations/:id/schedule/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignees []
:commit false
:commited_at ""
:completed_at ""
:created_at ""
:created_by ""
:end_location ""
:errors ""
:failed_at ""
:id ""
:objective ""
:ready_at ""
:scheduled_at ""
:start_location ""
:start_time ""
:started_at ""
:state ""
:tasks []
:total_distance 0
:total_duration {}
:unassign_not_optimal false
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/route_optimizations/:id/schedule/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/route_optimizations/:id/schedule/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/route_optimizations/:id/schedule/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/route_optimizations/:id/schedule/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/route_optimizations/:id/schedule/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 475
{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/route_optimizations/:id/schedule/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/route_optimizations/:id/schedule/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/schedule/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/route_optimizations/:id/schedule/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/schedule/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/schedule/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/route_optimizations/:id/schedule/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","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}}/route_optimizations/:id/schedule/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/route_optimizations/:id/schedule/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/route_optimizations/:id/schedule/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/route_optimizations/:id/schedule/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/schedule/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
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}}/route_optimizations/:id/schedule/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
commit: false,
commited_at: '',
completed_at: '',
created_at: '',
created_by: '',
end_location: '',
errors: '',
failed_at: '',
id: '',
objective: '',
ready_at: '',
scheduled_at: '',
start_location: '',
start_time: '',
started_at: '',
state: '',
tasks: [],
total_distance: 0,
total_duration: {},
unassign_not_optimal: false,
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/route_optimizations/:id/schedule/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"commit":false,"commited_at":"","completed_at":"","created_at":"","created_by":"","end_location":"","errors":"","failed_at":"","id":"","objective":"","ready_at":"","scheduled_at":"","start_location":"","start_time":"","started_at":"","state":"","tasks":[],"total_distance":0,"total_duration":{},"unassign_not_optimal":false,"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignees": @[ ],
@"commit": @NO,
@"commited_at": @"",
@"completed_at": @"",
@"created_at": @"",
@"created_by": @"",
@"end_location": @"",
@"errors": @"",
@"failed_at": @"",
@"id": @"",
@"objective": @"",
@"ready_at": @"",
@"scheduled_at": @"",
@"start_location": @"",
@"start_time": @"",
@"started_at": @"",
@"state": @"",
@"tasks": @[ ],
@"total_distance": @0,
@"total_duration": @{ },
@"unassign_not_optimal": @NO,
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/route_optimizations/:id/schedule/"]
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}}/route_optimizations/:id/schedule/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/route_optimizations/:id/schedule/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/route_optimizations/:id/schedule/', [
'body' => '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/route_optimizations/:id/schedule/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignees' => [
],
'commit' => null,
'commited_at' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'end_location' => '',
'errors' => '',
'failed_at' => '',
'id' => '',
'objective' => '',
'ready_at' => '',
'scheduled_at' => '',
'start_location' => '',
'start_time' => '',
'started_at' => '',
'state' => '',
'tasks' => [
],
'total_distance' => 0,
'total_duration' => [
],
'unassign_not_optimal' => null,
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/route_optimizations/:id/schedule/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/route_optimizations/:id/schedule/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/route_optimizations/:id/schedule/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/route_optimizations/:id/schedule/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/route_optimizations/:id/schedule/"
payload = {
"account": "",
"assignees": [],
"commit": False,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": False,
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/route_optimizations/:id/schedule/"
payload <- "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/route_optimizations/:id/schedule/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/route_optimizations/:id/schedule/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"commit\": false,\n \"commited_at\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"end_location\": \"\",\n \"errors\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"objective\": \"\",\n \"ready_at\": \"\",\n \"scheduled_at\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks\": [],\n \"total_distance\": 0,\n \"total_duration\": {},\n \"unassign_not_optimal\": false,\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/route_optimizations/:id/schedule/";
let payload = json!({
"account": "",
"assignees": (),
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": (),
"total_distance": 0,
"total_duration": json!({}),
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/route_optimizations/:id/schedule/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": {},
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/route_optimizations/:id/schedule/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignees": [],\n "commit": false,\n "commited_at": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "end_location": "",\n "errors": "",\n "failed_at": "",\n "id": "",\n "objective": "",\n "ready_at": "",\n "scheduled_at": "",\n "start_location": "",\n "start_time": "",\n "started_at": "",\n "state": "",\n "tasks": [],\n "total_distance": 0,\n "total_duration": {},\n "unassign_not_optimal": false,\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/route_optimizations/:id/schedule/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignees": [],
"commit": false,
"commited_at": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"end_location": "",
"errors": "",
"failed_at": "",
"id": "",
"objective": "",
"ready_at": "",
"scheduled_at": "",
"start_location": "",
"start_time": "",
"started_at": "",
"state": "",
"tasks": [],
"total_distance": 0,
"total_duration": [],
"unassign_not_optimal": false,
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/route_optimizations/:id/schedule/")! 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
routes_create
{{baseUrl}}/routes/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/routes/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:code ""
:created_at ""
:description ""
:end_location ""
:end_time ""
:external_id ""
:id ""
:start_location ""
:start_time ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/routes/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/routes/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/routes/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 242
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/routes/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/routes/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/routes/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
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}}/routes/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","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}}/routes/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/routes/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/routes/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
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}}/routes/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
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}}/routes/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"code": @"",
@"created_at": @"",
@"description": @"",
@"end_location": @"",
@"end_time": @"",
@"external_id": @"",
@"id": @"",
@"start_location": @"",
@"start_time": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/"]
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}}/routes/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/routes/', [
'body' => '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/routes/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/routes/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/"
payload = {
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/routes/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/";
let payload = json!({
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/routes/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/routes/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/routes/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/")! 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
routes_destroy
{{baseUrl}}/routes/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/routes/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/routes/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/routes/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/routes/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/routes/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/routes/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/routes/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/routes/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/routes/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/routes/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/routes/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/routes/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/routes/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/routes/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/routes/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/routes/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/routes/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/routes/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/routes/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
routes_list
{{baseUrl}}/routes/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/routes/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/routes/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/routes/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/routes/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/routes/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/"))
.header("authorization", "{{apiKey}}")
.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}}/routes/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/routes/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/routes/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/routes/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/routes/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/routes/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/routes/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/routes/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/routes/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/routes/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/routes/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/routes/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/routes/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/routes/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/routes/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/routes/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/routes/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/routes/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
routes_partial_update
{{baseUrl}}/routes/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/routes/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:code ""
:created_at ""
:description ""
:end_location ""
:end_time ""
:external_id ""
:id ""
:start_location ""
:start_time ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/routes/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/routes/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/routes/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 242
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/routes/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/routes/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/routes/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","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}}/routes/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/routes/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
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('PATCH', '{{baseUrl}}/routes/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"code": @"",
@"created_at": @"",
@"description": @"",
@"end_location": @"",
@"end_time": @"",
@"external_id": @"",
@"id": @"",
@"start_location": @"",
@"start_time": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/routes/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/routes/:id/', [
'body' => '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/routes/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/routes/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/:id/"
payload = {
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/:id/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/routes/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/:id/";
let payload = json!({
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/routes/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/routes/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/routes/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
routes_retrieve
{{baseUrl}}/routes/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/routes/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/routes/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/routes/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/routes/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/routes/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/routes/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/routes/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/routes/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/routes/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/routes/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/routes/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/routes/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/routes/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/routes/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/routes/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/routes/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/routes/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/routes/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/routes/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/routes/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
routes_update
{{baseUrl}}/routes/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/routes/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/routes/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignee ""
:code ""
:created_at ""
:description ""
:end_location ""
:end_time ""
:external_id ""
:id ""
:start_location ""
:start_time ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/routes/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/routes/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/routes/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/routes/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/routes/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 242
{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/routes/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/routes/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/routes/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/routes/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/routes/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","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}}/routes/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/routes/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/routes/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/routes/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/routes/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignee: '',
code: '',
created_at: '',
description: '',
end_location: '',
end_time: '',
external_id: '',
id: '',
start_location: '',
start_time: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/routes/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignee":"","code":"","created_at":"","description":"","end_location":"","end_time":"","external_id":"","id":"","start_location":"","start_time":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignee": @"",
@"code": @"",
@"created_at": @"",
@"description": @"",
@"end_location": @"",
@"end_time": @"",
@"external_id": @"",
@"id": @"",
@"start_location": @"",
@"start_time": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/routes/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/routes/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/routes/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/routes/:id/', [
'body' => '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/routes/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignee' => '',
'code' => '',
'created_at' => '',
'description' => '',
'end_location' => '',
'end_time' => '',
'external_id' => '',
'id' => '',
'start_location' => '',
'start_time' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/routes/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/routes/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/routes/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/routes/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/routes/:id/"
payload = {
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/routes/:id/"
payload <- "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/routes/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/routes/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignee\": \"\",\n \"code\": \"\",\n \"created_at\": \"\",\n \"description\": \"\",\n \"end_location\": \"\",\n \"end_time\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"start_location\": \"\",\n \"start_time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/routes/:id/";
let payload = json!({
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/routes/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/routes/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignee": "",\n "code": "",\n "created_at": "",\n "description": "",\n "end_location": "",\n "end_time": "",\n "external_id": "",\n "id": "",\n "start_location": "",\n "start_time": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/routes/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignee": "",
"code": "",
"created_at": "",
"description": "",
"end_location": "",
"end_time": "",
"external_id": "",
"id": "",
"start_location": "",
"start_time": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/routes/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
scenes_dashboard_list
{{baseUrl}}/scenes/dashboard/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/scenes/dashboard/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/scenes/dashboard/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/scenes/dashboard/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/scenes/dashboard/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/scenes/dashboard/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/scenes/dashboard/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/scenes/dashboard/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/scenes/dashboard/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/scenes/dashboard/"))
.header("authorization", "{{apiKey}}")
.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}}/scenes/dashboard/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/scenes/dashboard/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/scenes/dashboard/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/scenes/dashboard/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/scenes/dashboard/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/scenes/dashboard/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/scenes/dashboard/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/scenes/dashboard/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/scenes/dashboard/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/scenes/dashboard/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/scenes/dashboard/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/scenes/dashboard/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/scenes/dashboard/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/scenes/dashboard/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/scenes/dashboard/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/scenes/dashboard/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/scenes/dashboard/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/scenes/dashboard/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/scenes/dashboard/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/scenes/dashboard/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/scenes/dashboard/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/scenes/dashboard/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/scenes/dashboard/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/scenes/dashboard/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/scenes/dashboard/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/scenes/dashboard/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/scenes/dashboard/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/scenes/dashboard/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/scenes/dashboard/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/scenes/dashboard/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
scenes_order_list_list
{{baseUrl}}/scenes/order_list/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/scenes/order_list/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/scenes/order_list/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/scenes/order_list/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/scenes/order_list/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/scenes/order_list/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/scenes/order_list/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/scenes/order_list/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/scenes/order_list/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/scenes/order_list/"))
.header("authorization", "{{apiKey}}")
.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}}/scenes/order_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/scenes/order_list/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/scenes/order_list/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/scenes/order_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/scenes/order_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/scenes/order_list/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/scenes/order_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/scenes/order_list/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/scenes/order_list/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/scenes/order_list/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/scenes/order_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/scenes/order_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/scenes/order_list/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/scenes/order_list/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/scenes/order_list/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/scenes/order_list/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/scenes/order_list/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/scenes/order_list/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/scenes/order_list/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/scenes/order_list/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/scenes/order_list/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/scenes/order_list/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/scenes/order_list/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/scenes/order_list/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/scenes/order_list/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/scenes/order_list/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/scenes/order_list/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/scenes/order_list/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/scenes/order_list/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/scenes/order_list/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
scenes_recurrence_list_list
{{baseUrl}}/scenes/recurrence_list/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/scenes/recurrence_list/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/scenes/recurrence_list/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/scenes/recurrence_list/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/scenes/recurrence_list/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/scenes/recurrence_list/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/scenes/recurrence_list/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/scenes/recurrence_list/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/scenes/recurrence_list/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/scenes/recurrence_list/"))
.header("authorization", "{{apiKey}}")
.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}}/scenes/recurrence_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/scenes/recurrence_list/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/scenes/recurrence_list/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/scenes/recurrence_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/scenes/recurrence_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/scenes/recurrence_list/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/scenes/recurrence_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/scenes/recurrence_list/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/scenes/recurrence_list/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/scenes/recurrence_list/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/scenes/recurrence_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/scenes/recurrence_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/scenes/recurrence_list/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/scenes/recurrence_list/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/scenes/recurrence_list/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/scenes/recurrence_list/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/scenes/recurrence_list/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/scenes/recurrence_list/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/scenes/recurrence_list/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/scenes/recurrence_list/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/scenes/recurrence_list/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/scenes/recurrence_list/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/scenes/recurrence_list/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/scenes/recurrence_list/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/scenes/recurrence_list/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/scenes/recurrence_list/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/scenes/recurrence_list/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/scenes/recurrence_list/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/scenes/recurrence_list/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/scenes/recurrence_list/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
scenes_task_list_list
{{baseUrl}}/scenes/task_list/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/scenes/task_list/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/scenes/task_list/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/scenes/task_list/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/scenes/task_list/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/scenes/task_list/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/scenes/task_list/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/scenes/task_list/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/scenes/task_list/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/scenes/task_list/"))
.header("authorization", "{{apiKey}}")
.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}}/scenes/task_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/scenes/task_list/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/scenes/task_list/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/scenes/task_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/scenes/task_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/scenes/task_list/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/scenes/task_list/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/scenes/task_list/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/scenes/task_list/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/scenes/task_list/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/scenes/task_list/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/scenes/task_list/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/scenes/task_list/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/scenes/task_list/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/scenes/task_list/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/scenes/task_list/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/scenes/task_list/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/scenes/task_list/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/scenes/task_list/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/scenes/task_list/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/scenes/task_list/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/scenes/task_list/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/scenes/task_list/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/scenes/task_list/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/scenes/task_list/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/scenes/task_list/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/scenes/task_list/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/scenes/task_list/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/scenes/task_list/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/scenes/task_list/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
signatures_batch_delete_create
{{baseUrl}}/signatures/batch_delete/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"signatures": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signatures/batch_delete/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"signatures\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signatures/batch_delete/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:signatures []}})
require "http/client"
url = "{{baseUrl}}/signatures/batch_delete/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"signatures\": []\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}}/signatures/batch_delete/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"signatures\": []\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}}/signatures/batch_delete/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"signatures\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signatures/batch_delete/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"signatures\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/signatures/batch_delete/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"account": "",
"signatures": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signatures/batch_delete/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"signatures\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signatures/batch_delete/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"signatures\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"signatures\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signatures/batch_delete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signatures/batch_delete/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"signatures\": []\n}")
.asString();
const data = JSON.stringify({
account: '',
signatures: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/signatures/batch_delete/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signatures/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', signatures: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signatures/batch_delete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","signatures":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signatures/batch_delete/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "signatures": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"signatures\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signatures/batch_delete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/signatures/batch_delete/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: '', signatures: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signatures/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: '', signatures: []},
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}}/signatures/batch_delete/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
signatures: []
});
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}}/signatures/batch_delete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', signatures: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signatures/batch_delete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","signatures":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"signatures": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signatures/batch_delete/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signatures/batch_delete/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"signatures\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signatures/batch_delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'signatures' => [
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/signatures/batch_delete/', [
'body' => '{
"account": "",
"signatures": []
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signatures/batch_delete/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'signatures' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'signatures' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/signatures/batch_delete/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signatures/batch_delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"signatures": []
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signatures/batch_delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"signatures": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"signatures\": []\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/signatures/batch_delete/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signatures/batch_delete/"
payload = {
"account": "",
"signatures": []
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signatures/batch_delete/"
payload <- "{\n \"account\": \"\",\n \"signatures\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signatures/batch_delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"signatures\": []\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/signatures/batch_delete/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"signatures\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signatures/batch_delete/";
let payload = json!({
"account": "",
"signatures": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signatures/batch_delete/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"signatures": []
}'
echo '{
"account": "",
"signatures": []
}' | \
http POST {{baseUrl}}/signatures/batch_delete/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "signatures": []\n}' \
--output-document \
- {{baseUrl}}/signatures/batch_delete/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"signatures": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signatures/batch_delete/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
signatures_create
{{baseUrl}}/signatures/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signatures/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signatures/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:created_by ""
:documents []
:file ""
:file_name ""
:file_upload ""
:id ""
:location ""
:mimetype ""
:signer {:company ""
:emails []
:name ""
:notes ""
:phones []}
:source ""
:task ""
:thumbnail ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/signatures/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/signatures/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signatures/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signatures/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/signatures/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 368
{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signatures/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signatures/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signatures/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signatures/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
source: '',
task: '',
thumbnail: '',
updated_at: '',
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}}/signatures/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signatures/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {company: '', emails: [], name: '', notes: '', phones: []},
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signatures/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","created_by":"","documents":[],"file":"","file_name":"","file_upload":"","id":"","location":"","mimetype":"","signer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"source":"","task":"","thumbnail":"","updated_at":"","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}}/signatures/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "created_by": "",\n "documents": [],\n "file": "",\n "file_name": "",\n "file_upload": "",\n "id": "",\n "location": "",\n "mimetype": "",\n "signer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "source": "",\n "task": "",\n "thumbnail": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signatures/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/signatures/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {company: '', emails: [], name: '', notes: '', phones: []},
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signatures/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {company: '', emails: [], name: '', notes: '', phones: []},
source: '',
task: '',
thumbnail: '',
updated_at: '',
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}}/signatures/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
source: '',
task: '',
thumbnail: '',
updated_at: '',
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}}/signatures/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
created_by: '',
documents: [],
file: '',
file_name: '',
file_upload: '',
id: '',
location: '',
mimetype: '',
signer: {company: '', emails: [], name: '', notes: '', phones: []},
source: '',
task: '',
thumbnail: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signatures/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","created_by":"","documents":[],"file":"","file_name":"","file_upload":"","id":"","location":"","mimetype":"","signer":{"company":"","emails":[],"name":"","notes":"","phones":[]},"source":"","task":"","thumbnail":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"created_by": @"",
@"documents": @[ ],
@"file": @"",
@"file_name": @"",
@"file_upload": @"",
@"id": @"",
@"location": @"",
@"mimetype": @"",
@"signer": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"source": @"",
@"task": @"",
@"thumbnail": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signatures/"]
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}}/signatures/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signatures/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'documents' => [
],
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'location' => '',
'mimetype' => '',
'signer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/signatures/', [
'body' => '{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signatures/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'documents' => [
],
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'location' => '',
'mimetype' => '',
'signer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'created_by' => '',
'documents' => [
],
'file' => '',
'file_name' => '',
'file_upload' => '',
'id' => '',
'location' => '',
'mimetype' => '',
'signer' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'source' => '',
'task' => '',
'thumbnail' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/signatures/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signatures/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signatures/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/signatures/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signatures/"
payload = {
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signatures/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signatures/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/signatures/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"documents\": [],\n \"file\": \"\",\n \"file_name\": \"\",\n \"file_upload\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"mimetype\": \"\",\n \"signer\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"source\": \"\",\n \"task\": \"\",\n \"thumbnail\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signatures/";
let payload = json!({
"account": "",
"created_at": "",
"created_by": "",
"documents": (),
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signatures/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/signatures/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "created_by": "",\n "documents": [],\n "file": "",\n "file_name": "",\n "file_upload": "",\n "id": "",\n "location": "",\n "mimetype": "",\n "signer": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "source": "",\n "task": "",\n "thumbnail": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/signatures/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"created_by": "",
"documents": [],
"file": "",
"file_name": "",
"file_upload": "",
"id": "",
"location": "",
"mimetype": "",
"signer": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"source": "",
"task": "",
"thumbnail": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signatures/")! 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
signatures_destroy
{{baseUrl}}/signatures/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signatures/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/signatures/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/signatures/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/signatures/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signatures/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signatures/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/signatures/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/signatures/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signatures/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/signatures/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/signatures/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/signatures/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signatures/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signatures/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/signatures/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/signatures/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/signatures/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signatures/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signatures/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signatures/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signatures/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/signatures/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signatures/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/signatures/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signatures/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signatures/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/signatures/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signatures/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signatures/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signatures/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/signatures/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signatures/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/signatures/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/signatures/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/signatures/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signatures/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
signatures_list
{{baseUrl}}/signatures/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signatures/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/signatures/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/signatures/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/signatures/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signatures/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signatures/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/signatures/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/signatures/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signatures/"))
.header("authorization", "{{apiKey}}")
.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}}/signatures/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/signatures/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/signatures/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/signatures/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signatures/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signatures/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/signatures/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/signatures/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/signatures/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/signatures/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/signatures/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signatures/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signatures/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signatures/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signatures/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/signatures/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signatures/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/signatures/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signatures/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signatures/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/signatures/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signatures/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signatures/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signatures/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/signatures/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signatures/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/signatures/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/signatures/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/signatures/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signatures/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
signatures_retrieve
{{baseUrl}}/signatures/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signatures/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/signatures/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/signatures/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/signatures/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signatures/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signatures/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/signatures/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/signatures/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signatures/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/signatures/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/signatures/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/signatures/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signatures/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signatures/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/signatures/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/signatures/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/signatures/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/signatures/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signatures/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signatures/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signatures/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signatures/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/signatures/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signatures/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/signatures/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signatures/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signatures/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/signatures/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signatures/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signatures/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signatures/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/signatures/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signatures/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/signatures/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/signatures/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/signatures/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signatures/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
sms_create
{{baseUrl}}/sms/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sms/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:alphanumeric_sender_id ""
:created_at ""
:error ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:phone ""
:received_at ""
:segments_count 0
:sender ""
:sent_at ""
:state ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/sms/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\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}}/sms/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/sms/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sms/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sms/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sms/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","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}}/sms/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sms/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/sms/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"alphanumeric_sender_id": @"",
@"created_at": @"",
@"error": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"phone": @"",
@"received_at": @"",
@"segments_count": @0,
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/"]
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}}/sms/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/sms/', [
'body' => '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sms/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/sms/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/"
payload = {
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/"
payload <- "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sms/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/";
let payload = json!({
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sms/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
echo '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}' | \
http POST {{baseUrl}}/sms/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/sms/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/")! 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
sms_destroy
{{baseUrl}}/sms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/sms/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/sms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/sms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/sms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/sms/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/sms/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/sms/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/sms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sms/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/sms/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/sms/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sms/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/sms/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sms/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/sms/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/sms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/sms/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/sms/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/sms/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
sms_list
{{baseUrl}}/sms/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/sms/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/sms/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/sms/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/sms/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/sms/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/"))
.header("authorization", "{{apiKey}}")
.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}}/sms/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/sms/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/sms/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/sms/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sms/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sms/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/sms/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/sms/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/sms/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/sms/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sms/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/sms/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sms/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/sms/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/sms/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/sms/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/sms/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/sms/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
sms_partial_update
{{baseUrl}}/sms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/sms/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:alphanumeric_sender_id ""
:created_at ""
:error ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:phone ""
:received_at ""
:segments_count 0
:sender ""
:sent_at ""
:state ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/sms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/sms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/sms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/sms/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/sms/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/sms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","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}}/sms/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/sms/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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('PATCH', '{{baseUrl}}/sms/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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: 'PATCH',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"alphanumeric_sender_id": @"",
@"created_at": @"",
@"error": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"phone": @"",
@"received_at": @"",
@"segments_count": @0,
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sms/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/sms/:id/', [
'body' => '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sms/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/sms/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/:id/"
payload = {
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/:id/"
payload <- "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/sms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/:id/";
let payload = json!({
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/sms/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
echo '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/sms/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/sms/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
sms_resend_create
{{baseUrl}}/sms/:id/resend/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/:id/resend/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sms/:id/resend/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:alphanumeric_sender_id ""
:created_at ""
:error ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:phone ""
:received_at ""
:segments_count 0
:sender ""
:sent_at ""
:state ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/sms/:id/resend/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\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}}/sms/:id/resend/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/:id/resend/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/:id/resend/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/sms/:id/resend/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sms/:id/resend/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/:id/resend/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sms/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sms/:id/resend/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/:id/resend/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sms/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","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}}/sms/:id/resend/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sms/:id/resend/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/sms/:id/resend/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sms/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/:id/resend/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
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}}/sms/:id/resend/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/:id/resend/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"alphanumeric_sender_id": @"",
@"created_at": @"",
@"error": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"phone": @"",
@"received_at": @"",
@"segments_count": @0,
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/:id/resend/"]
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}}/sms/:id/resend/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/:id/resend/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/sms/:id/resend/', [
'body' => '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/:id/resend/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sms/:id/resend/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/:id/resend/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/sms/:id/resend/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/:id/resend/"
payload = {
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/:id/resend/"
payload <- "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/:id/resend/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sms/:id/resend/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/:id/resend/";
let payload = json!({
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sms/:id/resend/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
echo '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}' | \
http POST {{baseUrl}}/sms/:id/resend/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/sms/:id/resend/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/:id/resend/")! 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
sms_retrieve
{{baseUrl}}/sms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/sms/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/sms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/sms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/sms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/sms/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/sms/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/sms/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/sms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sms/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/sms/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/sms/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/sms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sms/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/sms/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sms/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/sms/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/sms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/sms/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/sms/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/sms/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
sms_update
{{baseUrl}}/sms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/sms/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:alphanumeric_sender_id ""
:created_at ""
:error ""
:external_id ""
:failed_at ""
:id ""
:message ""
:notification ""
:phone ""
:received_at ""
:segments_count 0
:sender ""
:sent_at ""
:state ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/sms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/sms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sms/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sms/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/sms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/sms/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sms/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/sms/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/sms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sms/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","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}}/sms/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sms/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/sms/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/sms/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/sms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
alphanumeric_sender_id: '',
created_at: '',
error: '',
external_id: '',
failed_at: '',
id: '',
message: '',
notification: '',
phone: '',
received_at: '',
segments_count: 0,
sender: '',
sent_at: '',
state: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sms/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","alphanumeric_sender_id":"","created_at":"","error":"","external_id":"","failed_at":"","id":"","message":"","notification":"","phone":"","received_at":"","segments_count":0,"sender":"","sent_at":"","state":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"alphanumeric_sender_id": @"",
@"created_at": @"",
@"error": @"",
@"external_id": @"",
@"failed_at": @"",
@"id": @"",
@"message": @"",
@"notification": @"",
@"phone": @"",
@"received_at": @"",
@"segments_count": @0,
@"sender": @"",
@"sent_at": @"",
@"state": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sms/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/sms/:id/', [
'body' => '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sms/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'alphanumeric_sender_id' => '',
'created_at' => '',
'error' => '',
'external_id' => '',
'failed_at' => '',
'id' => '',
'message' => '',
'notification' => '',
'phone' => '',
'received_at' => '',
'segments_count' => 0,
'sender' => '',
'sent_at' => '',
'state' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sms/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sms/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sms/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/sms/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sms/:id/"
payload = {
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sms/:id/"
payload <- "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/sms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"alphanumeric_sender_id\": \"\",\n \"created_at\": \"\",\n \"error\": \"\",\n \"external_id\": \"\",\n \"failed_at\": \"\",\n \"id\": \"\",\n \"message\": \"\",\n \"notification\": \"\",\n \"phone\": \"\",\n \"received_at\": \"\",\n \"segments_count\": 0,\n \"sender\": \"\",\n \"sent_at\": \"\",\n \"state\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sms/:id/";
let payload = json!({
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/sms/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}'
echo '{
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
}' | \
http PUT {{baseUrl}}/sms/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "alphanumeric_sender_id": "",\n "created_at": "",\n "error": "",\n "external_id": "",\n "failed_at": "",\n "id": "",\n "message": "",\n "notification": "",\n "phone": "",\n "received_at": "",\n "segments_count": 0,\n "sender": "",\n "sent_at": "",\n "state": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/sms/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"alphanumeric_sender_id": "",
"created_at": "",
"error": "",
"external_id": "",
"failed_at": "",
"id": "",
"message": "",
"notification": "",
"phone": "",
"received_at": "",
"segments_count": 0,
"sender": "",
"sent_at": "",
"state": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_address_features_list
{{baseUrl}}/task_address_features/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_address_features/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_address_features/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_address_features/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_address_features/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_address_features/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_address_features/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_address_features/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_address_features/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_address_features/"))
.header("authorization", "{{apiKey}}")
.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}}/task_address_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_address_features/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_address_features/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_address_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_address_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_address_features/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_address_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_address_features/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_address_features/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_address_features/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_address_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_address_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_address_features/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_address_features/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_address_features/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_address_features/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_address_features/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_address_features/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_address_features/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_address_features/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_address_features/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_address_features/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_address_features/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_address_features/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_address_features/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_address_features/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_address_features/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_address_features/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_address_features/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_address_features/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_address_features_retrieve
{{baseUrl}}/task_address_features/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_address_features/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_address_features/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_address_features/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_address_features/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_address_features/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_address_features/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_address_features/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_address_features/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_address_features/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_address_features/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_address_features/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_address_features/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_address_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_address_features/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_address_features/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_address_features/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_address_features/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_address_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_address_features/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_address_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_address_features/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_address_features/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_address_features/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_address_features/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_address_features/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_address_features/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_address_features/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_address_features/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_address_features/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_address_features/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_address_features/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_address_features/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_address_features/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_address_features/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_address_features/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_address_features/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_address_features/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_address_features/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_address_features/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
task_commands_create
{{baseUrl}}/task_commands/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_commands/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/task_commands/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accepted_at ""
:account ""
:action ""
:assignee ""
:created_at ""
:error_message ""
:external_id ""
:id ""
:location ""
:notes ""
:rejected_at ""
:state ""
:task ""
:task_data {:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:metafields {}
:position ""
:scheduled_time ""}
:time ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/task_commands/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/task_commands/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/task_commands/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_commands/"
payload := strings.NewReader("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_commands/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 785
{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/task_commands/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_commands/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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 \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_commands/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/task_commands/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/task_commands/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/task_commands/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_commands/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accepted_at":"","account":"","action":"","assignee":"","created_at":"","error_message":"","external_id":"","id":"","location":"","notes":"","rejected_at":"","state":"","task":"","task_data":{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"metafields":{},"position":"","scheduled_time":""},"time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_commands/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accepted_at": "",\n "account": "",\n "action": "",\n "assignee": "",\n "created_at": "",\n "error_message": "",\n "external_id": "",\n "id": "",\n "location": "",\n "notes": "",\n "rejected_at": "",\n "state": "",\n "task": "",\n "task_data": {\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "metafields": {},\n "position": "",\n "scheduled_time": ""\n },\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_commands/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_commands/',
headers: {
authorization: '{{apiKey}}',
'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({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/task_commands/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
},
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}}/task_commands/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
});
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}}/task_commands/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_commands/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accepted_at":"","account":"","action":"","assignee":"","created_at":"","error_message":"","external_id":"","id":"","location":"","notes":"","rejected_at":"","state":"","task":"","task_data":{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"metafields":{},"position":"","scheduled_time":""},"time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accepted_at": @"",
@"account": @"",
@"action": @"",
@"assignee": @"",
@"created_at": @"",
@"error_message": @"",
@"external_id": @"",
@"id": @"",
@"location": @"",
@"notes": @"",
@"rejected_at": @"",
@"state": @"",
@"task": @"",
@"task_data": @{ @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" }, @"metafields": @{ }, @"position": @"", @"scheduled_time": @"" },
@"time": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_commands/"]
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}}/task_commands/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_commands/",
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([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_commands/', [
'body' => '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_commands/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_commands/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_commands/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_commands/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/task_commands/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_commands/"
payload = {
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_commands/"
payload <- "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_commands/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/task_commands/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_commands/";
let payload = json!({
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": json!({
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"metafields": json!({}),
"position": "",
"scheduled_time": ""
}),
"time": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/task_commands/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http POST {{baseUrl}}/task_commands/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accepted_at": "",\n "account": "",\n "action": "",\n "assignee": "",\n "created_at": "",\n "error_message": "",\n "external_id": "",\n "id": "",\n "location": "",\n "notes": "",\n "rejected_at": "",\n "state": "",\n "task": "",\n "task_data": {\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "metafields": {},\n "position": "",\n "scheduled_time": ""\n },\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/task_commands/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": [
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"metafields": [],
"position": "",
"scheduled_time": ""
],
"time": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_commands/")! 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
task_commands_list
{{baseUrl}}/task_commands/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_commands/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_commands/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_commands/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_commands/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_commands/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_commands/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_commands/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_commands/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_commands/"))
.header("authorization", "{{apiKey}}")
.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}}/task_commands/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_commands/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_commands/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_commands/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_commands/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_commands/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_commands/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_commands/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_commands/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_commands/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_commands/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_commands/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_commands/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_commands/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_commands/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_commands/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_commands/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_commands/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_commands/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_commands/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_commands/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_commands/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_commands/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_commands/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_commands/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_commands/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_commands/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_commands/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_commands/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_commands/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_commands_retrieve
{{baseUrl}}/task_commands/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_commands/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_commands/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_commands/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_commands/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_commands/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_commands/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_commands/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_commands/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_commands/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_commands/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_commands/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_commands/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_commands/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_commands/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_commands/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_commands/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_commands/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_commands/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_commands/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_commands/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_commands/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_commands/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_commands/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_commands/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_commands/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_commands/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_commands/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_commands/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_commands/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_commands/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_commands/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_commands/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_commands/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_commands/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_commands/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_commands/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
task_commands_update
{{baseUrl}}/task_commands/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_commands/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/task_commands/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accepted_at ""
:account ""
:action ""
:assignee ""
:created_at ""
:error_message ""
:external_id ""
:id ""
:location ""
:notes ""
:rejected_at ""
:state ""
:task ""
:task_data {:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:metafields {}
:position ""
:scheduled_time ""}
:time ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/task_commands/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/task_commands/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/task_commands/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_commands/:id/"
payload := strings.NewReader("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_commands/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 785
{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/task_commands/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_commands/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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 \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_commands/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/task_commands/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/task_commands/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_commands/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accepted_at":"","account":"","action":"","assignee":"","created_at":"","error_message":"","external_id":"","id":"","location":"","notes":"","rejected_at":"","state":"","task":"","task_data":{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"metafields":{},"position":"","scheduled_time":""},"time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_commands/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accepted_at": "",\n "account": "",\n "action": "",\n "assignee": "",\n "created_at": "",\n "error_message": "",\n "external_id": "",\n "id": "",\n "location": "",\n "notes": "",\n "rejected_at": "",\n "state": "",\n "task": "",\n "task_data": {\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "metafields": {},\n "position": "",\n "scheduled_time": ""\n },\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_commands/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_commands/:id/',
headers: {
authorization: '{{apiKey}}',
'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({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
},
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}}/task_commands/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
});
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}}/task_commands/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accepted_at: '',
account: '',
action: '',
assignee: '',
created_at: '',
error_message: '',
external_id: '',
id: '',
location: '',
notes: '',
rejected_at: '',
state: '',
task: '',
task_data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
metafields: {},
position: '',
scheduled_time: ''
},
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_commands/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accepted_at":"","account":"","action":"","assignee":"","created_at":"","error_message":"","external_id":"","id":"","location":"","notes":"","rejected_at":"","state":"","task":"","task_data":{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"metafields":{},"position":"","scheduled_time":""},"time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accepted_at": @"",
@"account": @"",
@"action": @"",
@"assignee": @"",
@"created_at": @"",
@"error_message": @"",
@"external_id": @"",
@"id": @"",
@"location": @"",
@"notes": @"",
@"rejected_at": @"",
@"state": @"",
@"task": @"",
@"task_data": @{ @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" }, @"metafields": @{ }, @"position": @"", @"scheduled_time": @"" },
@"time": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_commands/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_commands/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_commands/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_commands/:id/', [
'body' => '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_commands/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accepted_at' => '',
'account' => '',
'action' => '',
'assignee' => '',
'created_at' => '',
'error_message' => '',
'external_id' => '',
'id' => '',
'location' => '',
'notes' => '',
'rejected_at' => '',
'state' => '',
'task' => '',
'task_data' => [
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'metafields' => [
],
'position' => '',
'scheduled_time' => ''
],
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_commands/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_commands/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_commands/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/task_commands/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_commands/:id/"
payload = {
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_commands/:id/"
payload <- "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_commands/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/task_commands/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accepted_at\": \"\",\n \"account\": \"\",\n \"action\": \"\",\n \"assignee\": \"\",\n \"created_at\": \"\",\n \"error_message\": \"\",\n \"external_id\": \"\",\n \"id\": \"\",\n \"location\": \"\",\n \"notes\": \"\",\n \"rejected_at\": \"\",\n \"state\": \"\",\n \"task\": \"\",\n \"task_data\": {\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"metafields\": {},\n \"position\": \"\",\n \"scheduled_time\": \"\"\n },\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/task_commands/:id/";
let payload = json!({
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": json!({
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"metafields": json!({}),
"position": "",
"scheduled_time": ""
}),
"time": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/task_commands/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"metafields": {},
"position": "",
"scheduled_time": ""
},
"time": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http PUT {{baseUrl}}/task_commands/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accepted_at": "",\n "account": "",\n "action": "",\n "assignee": "",\n "created_at": "",\n "error_message": "",\n "external_id": "",\n "id": "",\n "location": "",\n "notes": "",\n "rejected_at": "",\n "state": "",\n "task": "",\n "task_data": {\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "metafields": {},\n "position": "",\n "scheduled_time": ""\n },\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/task_commands/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accepted_at": "",
"account": "",
"action": "",
"assignee": "",
"created_at": "",
"error_message": "",
"external_id": "",
"id": "",
"location": "",
"notes": "",
"rejected_at": "",
"state": "",
"task": "",
"task_data": [
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"metafields": [],
"position": "",
"scheduled_time": ""
],
"time": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_commands/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_event_tracks_list
{{baseUrl}}/task_event_tracks/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_event_tracks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_event_tracks/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_event_tracks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_event_tracks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_event_tracks/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_event_tracks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_event_tracks/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_event_tracks/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_event_tracks/"))
.header("authorization", "{{apiKey}}")
.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}}/task_event_tracks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_event_tracks/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_event_tracks/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_event_tracks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_event_tracks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_event_tracks/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_event_tracks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_event_tracks/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_event_tracks/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_event_tracks/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_event_tracks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_event_tracks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_event_tracks/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_event_tracks/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_event_tracks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_event_tracks/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_event_tracks/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_event_tracks/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_event_tracks/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_event_tracks/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_event_tracks/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_event_tracks/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_event_tracks/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_event_tracks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_event_tracks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_event_tracks/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_event_tracks/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_event_tracks/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_event_tracks/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_event_tracks/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_event_tracks_retrieve
{{baseUrl}}/task_event_tracks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_event_tracks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_event_tracks/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_event_tracks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_event_tracks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_event_tracks/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_event_tracks/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_event_tracks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_event_tracks/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_event_tracks/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_event_tracks/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_event_tracks/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_event_tracks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_event_tracks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_event_tracks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_event_tracks/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_event_tracks/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_event_tracks/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_event_tracks/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_event_tracks/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_event_tracks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_event_tracks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_event_tracks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_event_tracks/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_event_tracks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_event_tracks/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_event_tracks/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_event_tracks/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_event_tracks/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_event_tracks/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_event_tracks/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_event_tracks/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_event_tracks/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_event_tracks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_event_tracks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_event_tracks/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_event_tracks/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_event_tracks/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_event_tracks/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_event_tracks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_events_list
{{baseUrl}}/task_events/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_events/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_events/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_events/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_events/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_events/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_events/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_events/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_events/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_events/"))
.header("authorization", "{{apiKey}}")
.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}}/task_events/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_events/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_events/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_events/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_events/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_events/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_events/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_events/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_events/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_events/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_events/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_events/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_events/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_events/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_events/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_events/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_events/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_events/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_events/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_events/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_events/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_events/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_events/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_events/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_events/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_events/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_events/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_events/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_events/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_events/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_events_retrieve
{{baseUrl}}/task_events/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_events/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_events/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_events/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_events/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_events/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_events/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_events/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_events/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_events/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_events/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_events/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_events/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_events/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_events/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_events/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_events/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_events/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_events/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_events/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_events/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_events/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_events/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_events/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_events/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_events/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_events/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_events/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_events/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_events/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_events/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_events/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_events/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_events/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_events/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_events/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_events/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_events/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_events/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_events/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_exports_list
{{baseUrl}}/task_exports/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_exports/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_exports/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_exports/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_exports/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_exports/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_exports/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_exports/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_exports/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_exports/"))
.header("authorization", "{{apiKey}}")
.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}}/task_exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_exports/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_exports/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_exports/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_exports/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_exports/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_exports/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_exports/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_exports/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_exports/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_exports/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_exports/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_exports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_exports/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_exports/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_exports/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_exports/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_exports/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_exports/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_exports/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_exports/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_exports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_exports/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_exports/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_exports/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_exports/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_exports/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_exports/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
task_forms_create
{{baseUrl}}/task_forms/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/task_forms/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:completed false
:created_at ""
:edit_url ""
:id ""
:link ""
:name ""
:pdf_url ""
:task ""
:updated_at ""
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/task_forms/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\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}}/task_forms/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/"
payload := strings.NewReader("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_forms/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 184
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/task_forms/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_forms/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/task_forms/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_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}}/task_forms/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/task_forms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_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}}/task_forms/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_forms/',
headers: {
authorization: '{{apiKey}}',
'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({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/task_forms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_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}}/task_forms/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_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}}/task_forms/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"completed": @NO,
@"created_at": @"",
@"edit_url": @"",
@"id": @"",
@"link": @"",
@"name": @"",
@"pdf_url": @"",
@"task": @"",
@"updated_at": @"",
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/"]
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}}/task_forms/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/",
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([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_forms/', [
'body' => '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_forms/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/task_forms/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/"
payload = {
"completed": False,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/"
payload <- "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/task_forms/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/";
let payload = json!({
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/task_forms/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
echo '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}' | \
http POST {{baseUrl}}/task_forms/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/task_forms/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/")! 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
task_forms_destroy
{{baseUrl}}/task_forms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/task_forms/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_forms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/task_forms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/task_forms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/task_forms/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_forms/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/task_forms/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_forms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_forms/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_forms/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/task_forms/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_forms/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/task_forms/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_forms/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/task_forms/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/task_forms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/task_forms/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/task_forms/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_forms/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_forms_list
{{baseUrl}}/task_forms/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_forms/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_forms/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_forms/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_forms/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_forms/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/"))
.header("authorization", "{{apiKey}}")
.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}}/task_forms/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_forms/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_forms/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_forms/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_forms/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_forms/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_forms/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_forms/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_forms/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_forms/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_forms/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_forms/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_forms/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_forms/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_forms/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_forms/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_forms/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
task_forms_partial_update
{{baseUrl}}/task_forms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/task_forms/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:completed false
:created_at ""
:edit_url ""
:id ""
:link ""
:name ""
:pdf_url ""
:task ""
:updated_at ""
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/task_forms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/task_forms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/:id/"
payload := strings.NewReader("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/task_forms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 184
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/task_forms/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/task_forms/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/task_forms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_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}}/task_forms/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_forms/:id/',
headers: {
authorization: '{{apiKey}}',
'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({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_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('PATCH', '{{baseUrl}}/task_forms/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_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: 'PATCH',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"completed": @NO,
@"created_at": @"",
@"edit_url": @"",
@"id": @"",
@"link": @"",
@"name": @"",
@"pdf_url": @"",
@"task": @"",
@"updated_at": @"",
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_forms/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/task_forms/:id/', [
'body' => '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_forms/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/task_forms/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/:id/"
payload = {
"completed": False,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/:id/"
payload <- "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/task_forms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/:id/";
let payload = json!({
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/task_forms/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
echo '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}' | \
http PATCH {{baseUrl}}/task_forms/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/task_forms/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_forms_retrieve
{{baseUrl}}/task_forms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_forms/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_forms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_forms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_forms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_forms/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_forms/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_forms/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_forms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_forms/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_forms/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_forms/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_forms/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_forms/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_forms/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_forms/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_forms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_forms/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_forms/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_forms/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
task_forms_update
{{baseUrl}}/task_forms/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_forms/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/task_forms/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:completed false
:created_at ""
:edit_url ""
:id ""
:link ""
:name ""
:pdf_url ""
:task ""
:updated_at ""
:url ""
:view_url ""}})
require "http/client"
url = "{{baseUrl}}/task_forms/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/task_forms/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_forms/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_forms/:id/"
payload := strings.NewReader("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_forms/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 184
{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/task_forms/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_forms/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/task_forms/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
.asString();
const data = JSON.stringify({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/task_forms/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_forms/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_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}}/task_forms/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_forms/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_forms/:id/',
headers: {
authorization: '{{apiKey}}',
'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({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/task_forms/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/task_forms/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
completed: false,
created_at: '',
edit_url: '',
id: '',
link: '',
name: '',
pdf_url: '',
task: '',
updated_at: '',
url: '',
view_url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_forms/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"completed":false,"created_at":"","edit_url":"","id":"","link":"","name":"","pdf_url":"","task":"","updated_at":"","url":"","view_url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"completed": @NO,
@"created_at": @"",
@"edit_url": @"",
@"id": @"",
@"link": @"",
@"name": @"",
@"pdf_url": @"",
@"task": @"",
@"updated_at": @"",
@"url": @"",
@"view_url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_forms/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_forms/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_forms/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_forms/:id/', [
'body' => '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_forms/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'completed' => null,
'created_at' => '',
'edit_url' => '',
'id' => '',
'link' => '',
'name' => '',
'pdf_url' => '',
'task' => '',
'updated_at' => '',
'url' => '',
'view_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_forms/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_forms/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_forms/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/task_forms/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_forms/:id/"
payload = {
"completed": False,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_forms/:id/"
payload <- "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_forms/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/task_forms/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"completed\": false,\n \"created_at\": \"\",\n \"edit_url\": \"\",\n \"id\": \"\",\n \"link\": \"\",\n \"name\": \"\",\n \"pdf_url\": \"\",\n \"task\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"view_url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_forms/:id/";
let payload = json!({
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/task_forms/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}'
echo '{
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
}' | \
http PUT {{baseUrl}}/task_forms/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "completed": false,\n "created_at": "",\n "edit_url": "",\n "id": "",\n "link": "",\n "name": "",\n "pdf_url": "",\n "task": "",\n "updated_at": "",\n "url": "",\n "view_url": ""\n}' \
--output-document \
- {{baseUrl}}/task_forms/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"completed": false,
"created_at": "",
"edit_url": "",
"id": "",
"link": "",
"name": "",
"pdf_url": "",
"task": "",
"updated_at": "",
"url": "",
"view_url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_forms/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
task_import_create
{{baseUrl}}/task_import/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/task_import/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assignees []
:celery_task_id ""
:completed_at ""
:created_at ""
:created_by ""
:errors {}
:failed_at ""
:id ""
:mapping ""
:started_at ""
:state ""
:tasks_created []
:tasks_data [{}]
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/task_import/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/task_import/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_import/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 309
{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/task_import/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_import/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/task_import/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [
{}
],
updated_at: '',
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}}/task_import/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/task_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [{}],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"celery_task_id":"","completed_at":"","created_at":"","created_by":"","errors":{},"failed_at":"","id":"","mapping":"","started_at":"","state":"","tasks_created":[],"tasks_data":[{}],"updated_at":"","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}}/task_import/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assignees": [],\n "celery_task_id": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "errors": {},\n "failed_at": "",\n "id": "",\n "mapping": "",\n "started_at": "",\n "state": "",\n "tasks_created": [],\n "tasks_data": [\n {}\n ],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_import/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_import/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [{}],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/task_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [{}],
updated_at: '',
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}}/task_import/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [
{}
],
updated_at: '',
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}}/task_import/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
assignees: [],
celery_task_id: '',
completed_at: '',
created_at: '',
created_by: '',
errors: {},
failed_at: '',
id: '',
mapping: '',
started_at: '',
state: '',
tasks_created: [],
tasks_data: [{}],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assignees":[],"celery_task_id":"","completed_at":"","created_at":"","created_by":"","errors":{},"failed_at":"","id":"","mapping":"","started_at":"","state":"","tasks_created":[],"tasks_data":[{}],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assignees": @[ ],
@"celery_task_id": @"",
@"completed_at": @"",
@"created_at": @"",
@"created_by": @"",
@"errors": @{ },
@"failed_at": @"",
@"id": @"",
@"mapping": @"",
@"started_at": @"",
@"state": @"",
@"tasks_created": @[ ],
@"tasks_data": @[ @{ } ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import/"]
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}}/task_import/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assignees' => [
],
'celery_task_id' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'mapping' => '',
'started_at' => '',
'state' => '',
'tasks_created' => [
],
'tasks_data' => [
[
]
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_import/', [
'body' => '{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assignees' => [
],
'celery_task_id' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'mapping' => '',
'started_at' => '',
'state' => '',
'tasks_created' => [
],
'tasks_data' => [
[
]
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assignees' => [
],
'celery_task_id' => '',
'completed_at' => '',
'created_at' => '',
'created_by' => '',
'errors' => [
],
'failed_at' => '',
'id' => '',
'mapping' => '',
'started_at' => '',
'state' => '',
'tasks_created' => [
],
'tasks_data' => [
[
]
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_import/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/task_import/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import/"
payload = {
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [{}],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import/"
payload <- "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/task_import/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assignees\": [],\n \"celery_task_id\": \"\",\n \"completed_at\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"errors\": {},\n \"failed_at\": \"\",\n \"id\": \"\",\n \"mapping\": \"\",\n \"started_at\": \"\",\n \"state\": \"\",\n \"tasks_created\": [],\n \"tasks_data\": [\n {}\n ],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import/";
let payload = json!({
"account": "",
"assignees": (),
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": json!({}),
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": (),
"tasks_data": (json!({})),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/task_import/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": {},
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [
{}
],
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/task_import/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assignees": [],\n "celery_task_id": "",\n "completed_at": "",\n "created_at": "",\n "created_by": "",\n "errors": {},\n "failed_at": "",\n "id": "",\n "mapping": "",\n "started_at": "",\n "state": "",\n "tasks_created": [],\n "tasks_data": [\n {}\n ],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/task_import/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assignees": [],
"celery_task_id": "",
"completed_at": "",
"created_at": "",
"created_by": "",
"errors": [],
"failed_at": "",
"id": "",
"mapping": "",
"started_at": "",
"state": "",
"tasks_created": [],
"tasks_data": [[]],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import/")! 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
task_import_list
{{baseUrl}}/task_import/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_import/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_import/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_import/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_import/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_import/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import/"))
.header("authorization", "{{apiKey}}")
.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}}/task_import/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_import/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_import/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_import/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_import/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_import/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_import/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_import/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_import/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_import/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_import/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_import/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_import/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_import/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_import/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_import/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_import/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_import/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_import_retrieve
{{baseUrl}}/task_import/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_import/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_import/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_import/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_import/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_import/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_import/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_import/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_import/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_import/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_import/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_import/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_import/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_import/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_import/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_import/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_import/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_import/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_import/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_import/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_import/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_import/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
task_import_mapping_create
{{baseUrl}}/task_import_mapping/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import_mapping/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/task_import_mapping/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:created_at ""
:field_names []
:id ""
:lines [{:format ""
:from_field ""
:to_field ""}]
:url ""}})
require "http/client"
url = "{{baseUrl}}/task_import_mapping/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\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}}/task_import_mapping/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import_mapping/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import_mapping/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/task_import_mapping/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 180
{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/task_import_mapping/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import_mapping/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/task_import_mapping/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/task_import_mapping/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
created_at: '',
field_names: [],
id: '',
lines: [
{
format: '',
from_field: '',
to_field: ''
}
],
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}}/task_import_mapping/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
field_names: [],
id: '',
lines: [{format: '', from_field: '', to_field: ''}],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import_mapping/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","field_names":[],"id":"","lines":[{"format":"","from_field":"","to_field":""}],"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}}/task_import_mapping/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "created_at": "",\n "field_names": [],\n "id": "",\n "lines": [\n {\n "format": "",\n "from_field": "",\n "to_field": ""\n }\n ],\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/task_import_mapping/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/task_import_mapping/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
created_at: '',
field_names: [],
id: '',
lines: [{format: '', from_field: '', to_field: ''}],
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
created_at: '',
field_names: [],
id: '',
lines: [{format: '', from_field: '', to_field: ''}],
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}}/task_import_mapping/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
created_at: '',
field_names: [],
id: '',
lines: [
{
format: '',
from_field: '',
to_field: ''
}
],
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}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
created_at: '',
field_names: [],
id: '',
lines: [{format: '', from_field: '', to_field: ''}],
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import_mapping/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","created_at":"","field_names":[],"id":"","lines":[{"format":"","from_field":"","to_field":""}],"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"created_at": @"",
@"field_names": @[ ],
@"id": @"",
@"lines": @[ @{ @"format": @"", @"from_field": @"", @"to_field": @"" } ],
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import_mapping/"]
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}}/task_import_mapping/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import_mapping/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'created_at' => '',
'field_names' => [
],
'id' => '',
'lines' => [
[
'format' => '',
'from_field' => '',
'to_field' => ''
]
],
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/task_import_mapping/', [
'body' => '{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import_mapping/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'created_at' => '',
'field_names' => [
],
'id' => '',
'lines' => [
[
'format' => '',
'from_field' => '',
'to_field' => ''
]
],
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'created_at' => '',
'field_names' => [
],
'id' => '',
'lines' => [
[
'format' => '',
'from_field' => '',
'to_field' => ''
]
],
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/task_import_mapping/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import_mapping/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import_mapping/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/task_import_mapping/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import_mapping/"
payload = {
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import_mapping/"
payload <- "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import_mapping/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/task_import_mapping/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"created_at\": \"\",\n \"field_names\": [],\n \"id\": \"\",\n \"lines\": [\n {\n \"format\": \"\",\n \"from_field\": \"\",\n \"to_field\": \"\"\n }\n ],\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import_mapping/";
let payload = json!({
"account": "",
"created_at": "",
"field_names": (),
"id": "",
"lines": (
json!({
"format": "",
"from_field": "",
"to_field": ""
})
),
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/task_import_mapping/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}'
echo '{
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
{
"format": "",
"from_field": "",
"to_field": ""
}
],
"url": ""
}' | \
http POST {{baseUrl}}/task_import_mapping/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "created_at": "",\n "field_names": [],\n "id": "",\n "lines": [\n {\n "format": "",\n "from_field": "",\n "to_field": ""\n }\n ],\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/task_import_mapping/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"created_at": "",
"field_names": [],
"id": "",
"lines": [
[
"format": "",
"from_field": "",
"to_field": ""
]
],
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import_mapping/")! 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
task_import_mapping_list
{{baseUrl}}/task_import_mapping/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import_mapping/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_import_mapping/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_import_mapping/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_import_mapping/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import_mapping/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import_mapping/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_import_mapping/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_import_mapping/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import_mapping/"))
.header("authorization", "{{apiKey}}")
.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}}/task_import_mapping/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_import_mapping/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_import_mapping/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import_mapping/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_import_mapping/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_import_mapping/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_import_mapping/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_import_mapping/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_import_mapping/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import_mapping/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import_mapping/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_import_mapping/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import_mapping/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_import_mapping/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import_mapping/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_import_mapping/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import_mapping/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import_mapping/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_import_mapping/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import_mapping/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import_mapping/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import_mapping/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_import_mapping/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import_mapping/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_import_mapping/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_import_mapping/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_import_mapping/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import_mapping/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_import_mapping_retrieve
{{baseUrl}}/task_import_mapping/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_import_mapping/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_import_mapping/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_import_mapping/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_import_mapping/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_import_mapping/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_import_mapping/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_import_mapping/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_import_mapping/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_import_mapping/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_import_mapping/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_import_mapping/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_import_mapping/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_import_mapping/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_import_mapping/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_import_mapping/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_import_mapping/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_import_mapping/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_import_mapping/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_import_mapping/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_import_mapping/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_import_mapping/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_import_mapping/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_import_mapping/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_import_mapping/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_import_mapping/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_import_mapping/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_import_mapping/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_import_mapping/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_import_mapping/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_import_mapping/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_import_mapping/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_import_mapping/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_import_mapping/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_import_mapping/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_import_mapping/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_import_mapping/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_import_mapping/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_import_mapping/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_import_mapping/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_metadatas_list
{{baseUrl}}/task_metadatas/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_metadatas/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_metadatas/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_metadatas/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_metadatas/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_metadatas/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_metadatas/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_metadatas/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_metadatas/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_metadatas/"))
.header("authorization", "{{apiKey}}")
.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}}/task_metadatas/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_metadatas/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_metadatas/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_metadatas/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_metadatas/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_metadatas/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_metadatas/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_metadatas/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_metadatas/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_metadatas/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_metadatas/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_metadatas/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_metadatas/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_metadatas/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_metadatas/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_metadatas/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_metadatas/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_metadatas/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_metadatas/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_metadatas/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_metadatas/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_metadatas/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_metadatas/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_metadatas/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_metadatas/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_metadatas/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_metadatas/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_metadatas/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_metadatas/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_metadatas/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
task_metadatas_retrieve
{{baseUrl}}/task_metadatas/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/task_metadatas/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/task_metadatas/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/task_metadatas/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/task_metadatas/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/task_metadatas/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/task_metadatas/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/task_metadatas/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/task_metadatas/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/task_metadatas/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/task_metadatas/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/task_metadatas/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/task_metadatas/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/task_metadatas/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/task_metadatas/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/task_metadatas/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/task_metadatas/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/task_metadatas/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/task_metadatas/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/task_metadatas/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/task_metadatas/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/task_metadatas/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/task_metadatas/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/task_metadatas/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/task_metadatas/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/task_metadatas/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/task_metadatas/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/task_metadatas/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/task_metadatas/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/task_metadatas/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/task_metadatas/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/task_metadatas/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/task_metadatas/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/task_metadatas/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/task_metadatas/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/task_metadatas/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/task_metadatas/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/task_metadatas/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/task_metadatas/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/task_metadatas/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
tasks_accept_create
{{baseUrl}}/tasks/:id/accept/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/accept/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/accept/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/accept/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/accept/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/accept/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/accept/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/accept/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/accept/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/accept/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/accept/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/accept/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/accept/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/accept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/accept/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/accept/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/accept/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/accept/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/accept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/accept/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/accept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/accept/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/accept/"]
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/:id/accept/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/accept/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/accept/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/accept/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/accept/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/accept/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/accept/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/accept/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/accept/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/accept/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/accept/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/accept/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/accept/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/accept/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/accept/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/accept/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/accept/")! 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
tasks_account_change_create
{{baseUrl}}/tasks/:id/account_change/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/account_change/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/account_change/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/account_change/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\"\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}}/tasks/:id/account_change/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\"\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/:id/account_change/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/account_change/"
payload := strings.NewReader("{\n \"account\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/account_change/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"account": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/account_change/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/account_change/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/account_change/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/account_change/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: ''
});
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/:id/account_change/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/account_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/account_change/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":""}'
};
try {
const response = await 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/:id/account_change/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/account_change/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/account_change/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/account_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: ''},
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}}/tasks/:id/account_change/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: ''
});
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/:id/account_change/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/account_change/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/account_change/"]
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/:id/account_change/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/account_change/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/account_change/', [
'body' => '{
"account": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/account_change/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/account_change/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/account_change/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/account_change/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/account_change/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/account_change/"
payload = { "account": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/account_change/"
payload <- "{\n \"account\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/account_change/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\"\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/tasks/:id/account_change/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/account_change/";
let payload = json!({"account": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/account_change/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": ""
}'
echo '{
"account": ""
}' | \
http POST {{baseUrl}}/tasks/:id/account_change/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/account_change/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["account": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/account_change/")! 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
tasks_activate_create
{{baseUrl}}/tasks/:id/activate/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/activate/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/activate/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/activate/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/activate/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/activate/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/activate/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/activate/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/activate/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/activate/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/activate/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/activate/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/activate/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/activate/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/activate/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/activate/"]
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/:id/activate/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/activate/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/activate/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/activate/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/activate/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/activate/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/activate/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/activate/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/activate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/activate/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/activate/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/activate/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/activate/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/activate/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/activate/")! 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
tasks_assign_create
{{baseUrl}}/tasks/:id/assign/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"assignee": "",
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/assign/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/assign/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:assignee ""
:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/assign/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/assign/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\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/:id/assign/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/assign/"
payload := strings.NewReader("{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/assign/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"assignee": "",
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/assign/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/assign/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\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 \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/assign/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/assign/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
assignee: '',
location: '',
notes: ''
});
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/:id/assign/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/assign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {assignee: '', location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/assign/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"assignee":"","location":"","notes":""}'
};
try {
const response = await 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/:id/assign/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "assignee": "",\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/assign/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/assign/',
headers: {
authorization: '{{apiKey}}',
'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({assignee: '', location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/assign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {assignee: '', location: '', notes: ''},
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}}/tasks/:id/assign/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
assignee: '',
location: '',
notes: ''
});
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/:id/assign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {assignee: '', location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/assign/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"assignee":"","location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assignee": @"",
@"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/assign/"]
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/:id/assign/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/assign/",
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([
'assignee' => '',
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/assign/', [
'body' => '{
"assignee": "",
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/assign/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assignee' => '',
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assignee' => '',
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/assign/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/assign/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/assign/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/assign/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/assign/"
payload = {
"assignee": "",
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/assign/"
payload <- "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/assign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/assign/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"assignee\": \"\",\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/assign/";
let payload = json!({
"assignee": "",
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/assign/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"assignee": "",
"location": "",
"notes": ""
}'
echo '{
"assignee": "",
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/assign/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "assignee": "",\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/assign/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"assignee": "",
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/assign/")! 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
tasks_cancel_create
{{baseUrl}}/tasks/:id/cancel/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/cancel/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/cancel/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/cancel/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/cancel/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/cancel/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/cancel/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/cancel/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/cancel/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/cancel/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/cancel/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/cancel/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/cancel/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/cancel/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/cancel/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/cancel/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/cancel/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/cancel/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/cancel/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/cancel/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/cancel/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/cancel/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/cancel/"]
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/:id/cancel/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/cancel/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/cancel/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/cancel/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/cancel/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/cancel/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/cancel/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/cancel/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/cancel/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/cancel/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/cancel/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/cancel/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/cancel/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/cancel/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/cancel/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/cancel/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/cancel/")! 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
tasks_complete_create
{{baseUrl}}/tasks/:id/complete/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/complete/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/complete/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/complete/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/complete/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/complete/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/complete/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/complete/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/complete/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/complete/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/complete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/complete/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/complete/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/complete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/complete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/complete/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/complete/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/complete/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/complete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/complete/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/complete/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/complete/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/complete/"]
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/:id/complete/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/complete/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/complete/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/complete/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/complete/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/complete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/complete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/complete/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/complete/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/complete/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/complete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/complete/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/complete/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/complete/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/complete/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/complete/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/complete/")! 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
tasks_create
{{baseUrl}}/tasks/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/tasks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/tasks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1197
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","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}}/tasks/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"actions": @{ },
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"assignee": @"",
@"assignee_proximity": @"",
@"auto_assign": @NO,
@"barcodes": @[ ],
@"cancelled_at": @"",
@"category": @"",
@"complete_after": @"",
@"complete_before": @"",
@"completed_at": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"contact_address": @"",
@"contact_address_external_id": @"",
@"counts": @{ },
@"created_at": @"",
@"description": @"",
@"documents": @[ ],
@"duration": @{ },
@"external_id": @"",
@"forms": @{ },
@"id": @"",
@"issues": @[ ],
@"metafields": @{ },
@"order": @"",
@"orderer": @"",
@"orderer_name": @"",
@"position": @"",
@"priority": @0,
@"reference": @"",
@"route": @"",
@"scheduled_time": @"",
@"signatures": @[ ],
@"size": @[ ],
@"state": @"",
@"trackers": @[ ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/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}}/tasks/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/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([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/', [
'body' => '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/"
payload = {
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/"
payload <- "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tasks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/";
let payload = json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/tasks/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/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()
GET
tasks_documents_retrieve
{{baseUrl}}/tasks/:id/documents/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/documents/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:id/documents/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/documents/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/documents/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/documents/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/documents/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tasks/:id/documents/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:id/documents/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/documents/"))
.header("authorization", "{{apiKey}}")
.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/:id/documents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:id/documents/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/documents/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tasks/:id/documents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/documents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/documents/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/documents/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:id/documents/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/documents/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/documents/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/documents/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/documents/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/documents/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/documents/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tasks/:id/documents/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/documents/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:id/documents/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/documents/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/documents/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/tasks/:id/documents/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/documents/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/documents/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tasks/:id/documents/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/documents/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tasks/:id/documents/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/tasks/:id/documents/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/tasks/:id/documents/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/documents/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
tasks_events_retrieve
{{baseUrl}}/tasks/:id/events/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/events/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:id/events/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/events/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/events/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/events/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/events/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tasks/:id/events/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:id/events/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/events/"))
.header("authorization", "{{apiKey}}")
.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/:id/events/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:id/events/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/events/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tasks/:id/events/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/events/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/events/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/events/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:id/events/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/events/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/events/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/events/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/events/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/events/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/events/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/events/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tasks/:id/events/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/events/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:id/events/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/events/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/events/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/tasks/:id/events/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/events/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/events/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/events/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tasks/:id/events/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/events/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tasks/:id/events/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/tasks/:id/events/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/tasks/:id/events/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/events/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
tasks_fail_create
{{baseUrl}}/tasks/:id/fail/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/fail/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/fail/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/fail/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/fail/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/fail/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/fail/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/fail/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/fail/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/fail/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/fail/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/fail/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/fail/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/fail/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/fail/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/fail/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/fail/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/fail/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/fail/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/fail/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/fail/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/fail/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/fail/"]
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/:id/fail/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/fail/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/fail/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/fail/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/fail/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/fail/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/fail/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/fail/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/fail/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/fail/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/fail/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/fail/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/fail/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/fail/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/fail/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/fail/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/fail/")! 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
tasks_list
{{baseUrl}}/tasks/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/tasks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tasks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tasks/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/"))
.header("authorization", "{{apiKey}}")
.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/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tasks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/',
headers: {authorization: '{{apiKey}}'}
};
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/');
req.headers({
authorization: '{{apiKey}}'
});
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/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tasks/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/tasks/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tasks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tasks/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/tasks/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/tasks/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
tasks_partial_update
{{baseUrl}}/tasks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/tasks/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/tasks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1197
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/tasks/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/tasks/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/tasks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","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}}/tasks/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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('PATCH', '{{baseUrl}}/tasks/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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: 'PATCH',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"actions": @{ },
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"assignee": @"",
@"assignee_proximity": @"",
@"auto_assign": @NO,
@"barcodes": @[ ],
@"cancelled_at": @"",
@"category": @"",
@"complete_after": @"",
@"complete_before": @"",
@"completed_at": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"contact_address": @"",
@"contact_address_external_id": @"",
@"counts": @{ },
@"created_at": @"",
@"description": @"",
@"documents": @[ ],
@"duration": @{ },
@"external_id": @"",
@"forms": @{ },
@"id": @"",
@"issues": @[ ],
@"metafields": @{ },
@"order": @"",
@"orderer": @"",
@"orderer_name": @"",
@"position": @"",
@"priority": @0,
@"reference": @"",
@"route": @"",
@"scheduled_time": @"",
@"signatures": @[ ],
@"size": @[ ],
@"state": @"",
@"trackers": @[ ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/tasks/:id/', [
'body' => '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/tasks/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/"
payload = {
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/"
payload <- "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/tasks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/";
let payload = json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/tasks/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/tasks/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
tasks_reject_create
{{baseUrl}}/tasks/:id/reject/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/reject/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/reject/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/reject/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/reject/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/reject/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/reject/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/reject/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/reject/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/reject/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/reject/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/reject/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/reject/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/reject/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/reject/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/reject/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/reject/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/reject/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/reject/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/reject/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/reject/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/reject/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/reject/"]
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/:id/reject/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/reject/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/reject/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/reject/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/reject/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/reject/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/reject/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/reject/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/reject/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/reject/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/reject/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/reject/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/reject/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/reject/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/reject/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/reject/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/reject/")! 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
tasks_reorder_create
{{baseUrl}}/tasks/reorder/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/reorder/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/reorder/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:assign_tasks []
:assignee ""
:reorder_tasks []}})
require "http/client"
url = "{{baseUrl}}/tasks/reorder/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\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}}/tasks/reorder/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\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/reorder/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/reorder/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/reorder/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/reorder/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/reorder/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/reorder/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/reorder/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}")
.asString();
const data = JSON.stringify({
account: '',
assign_tasks: [],
assignee: '',
reorder_tasks: []
});
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/reorder/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/reorder/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', assign_tasks: [], assignee: '', reorder_tasks: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/reorder/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assign_tasks":[],"assignee":"","reorder_tasks":[]}'
};
try {
const response = await 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/reorder/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "assign_tasks": [],\n "assignee": "",\n "reorder_tasks": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/reorder/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/reorder/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: '', assign_tasks: [], assignee: '', reorder_tasks: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/reorder/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: '', assign_tasks: [], assignee: '', reorder_tasks: []},
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}}/tasks/reorder/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
assign_tasks: [],
assignee: '',
reorder_tasks: []
});
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/reorder/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: '', assign_tasks: [], assignee: '', reorder_tasks: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/reorder/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","assign_tasks":[],"assignee":"","reorder_tasks":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"assign_tasks": @[ ],
@"assignee": @"",
@"reorder_tasks": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/reorder/"]
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/reorder/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/reorder/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'assign_tasks' => [
],
'assignee' => '',
'reorder_tasks' => [
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/reorder/', [
'body' => '{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/reorder/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'assign_tasks' => [
],
'assignee' => '',
'reorder_tasks' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'assign_tasks' => [
],
'assignee' => '',
'reorder_tasks' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/tasks/reorder/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/reorder/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/reorder/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/reorder/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/reorder/"
payload = {
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/reorder/"
payload <- "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/reorder/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\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/tasks/reorder/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"assign_tasks\": [],\n \"assignee\": \"\",\n \"reorder_tasks\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/reorder/";
let payload = json!({
"account": "",
"assign_tasks": (),
"assignee": "",
"reorder_tasks": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/reorder/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}'
echo '{
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
}' | \
http POST {{baseUrl}}/tasks/reorder/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "assign_tasks": [],\n "assignee": "",\n "reorder_tasks": []\n}' \
--output-document \
- {{baseUrl}}/tasks/reorder/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"assign_tasks": [],
"assignee": "",
"reorder_tasks": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/reorder/")! 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
tasks_reposition_create
{{baseUrl}}/tasks/reposition/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/reposition/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/reposition/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/tasks/reposition/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\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}}/tasks/reposition/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/reposition/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/reposition/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/reposition/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1197
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/reposition/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/reposition/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/reposition/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/reposition/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/reposition/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/reposition/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/reposition/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","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}}/tasks/reposition/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/reposition/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/reposition/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/reposition/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/reposition/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
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}}/tasks/reposition/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/reposition/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"actions": @{ },
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"assignee": @"",
@"assignee_proximity": @"",
@"auto_assign": @NO,
@"barcodes": @[ ],
@"cancelled_at": @"",
@"category": @"",
@"complete_after": @"",
@"complete_before": @"",
@"completed_at": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"contact_address": @"",
@"contact_address_external_id": @"",
@"counts": @{ },
@"created_at": @"",
@"description": @"",
@"documents": @[ ],
@"duration": @{ },
@"external_id": @"",
@"forms": @{ },
@"id": @"",
@"issues": @[ ],
@"metafields": @{ },
@"order": @"",
@"orderer": @"",
@"orderer_name": @"",
@"position": @"",
@"priority": @0,
@"reference": @"",
@"route": @"",
@"scheduled_time": @"",
@"signatures": @[ ],
@"size": @[ ],
@"state": @"",
@"trackers": @[ ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/reposition/"]
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/reposition/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/reposition/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/reposition/', [
'body' => '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/reposition/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/reposition/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/reposition/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/reposition/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/reposition/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/reposition/"
payload = {
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/reposition/"
payload <- "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/reposition/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tasks/reposition/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/reposition/";
let payload = json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/reposition/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/tasks/reposition/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/reposition/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/reposition/")! 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
tasks_retrieve
{{baseUrl}}/tasks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tasks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/"))
.header("authorization", "{{apiKey}}")
.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/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tasks/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/tasks/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tasks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tasks/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/tasks/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/tasks/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
tasks_signatures_retrieve
{{baseUrl}}/tasks/:id/signatures/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/signatures/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tasks/:id/signatures/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/signatures/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/signatures/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/signatures/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/signatures/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tasks/:id/signatures/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tasks/:id/signatures/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/signatures/"))
.header("authorization", "{{apiKey}}")
.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/:id/signatures/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tasks/:id/signatures/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/signatures/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tasks/:id/signatures/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/signatures/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/signatures/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/signatures/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tasks/:id/signatures/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/signatures/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/signatures/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/signatures/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/signatures/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/signatures/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/signatures/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/signatures/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tasks/:id/signatures/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/signatures/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tasks/:id/signatures/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/signatures/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/signatures/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/tasks/:id/signatures/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/signatures/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/signatures/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/signatures/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tasks/:id/signatures/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/signatures/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tasks/:id/signatures/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/tasks/:id/signatures/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/tasks/:id/signatures/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/signatures/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
tasks_transit_create
{{baseUrl}}/tasks/:id/transit/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/transit/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/transit/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/transit/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/transit/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/transit/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/transit/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/transit/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/transit/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/transit/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/transit/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/transit/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/transit/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/transit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/transit/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/transit/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/transit/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/transit/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/transit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/transit/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/transit/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/transit/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/transit/"]
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/:id/transit/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/transit/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/transit/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/transit/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/transit/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/transit/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/transit/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/transit/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/transit/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/transit/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/transit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/transit/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/transit/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/transit/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/transit/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/transit/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/transit/")! 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
tasks_unaccept_create
{{baseUrl}}/tasks/:id/unaccept/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/unaccept/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/unaccept/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/unaccept/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/unaccept/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/unaccept/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/unaccept/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/unaccept/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/unaccept/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/unaccept/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/unaccept/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/unaccept/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/unaccept/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/unaccept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/unaccept/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/unaccept/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/unaccept/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/unaccept/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/unaccept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/unaccept/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/unaccept/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/unaccept/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/unaccept/"]
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/:id/unaccept/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/unaccept/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/unaccept/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/unaccept/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/unaccept/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/unaccept/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/unaccept/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/unaccept/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/unaccept/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/unaccept/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/unaccept/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/unaccept/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/unaccept/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/unaccept/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/unaccept/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/unaccept/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/unaccept/")! 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
tasks_unassign_create
{{baseUrl}}/tasks/:id/unassign/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"location": "",
"notes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/unassign/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"location\": \"\",\n \"notes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tasks/:id/unassign/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:location ""
:notes ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/unassign/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"notes\": \"\"\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}}/tasks/:id/unassign/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"location\": \"\",\n \"notes\": \"\"\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/:id/unassign/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"notes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/unassign/"
payload := strings.NewReader("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/unassign/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"location": "",
"notes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tasks/:id/unassign/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/unassign/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"notes\": \"\"\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 \"location\": \"\",\n \"notes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/unassign/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tasks/:id/unassign/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"notes\": \"\"\n}")
.asString();
const data = JSON.stringify({
location: '',
notes: ''
});
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/:id/unassign/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/unassign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/unassign/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await 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/:id/unassign/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "notes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"notes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/unassign/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/unassign/',
headers: {
authorization: '{{apiKey}}',
'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({location: '', notes: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tasks/:id/unassign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {location: '', notes: ''},
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}}/tasks/:id/unassign/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
notes: ''
});
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/:id/unassign/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {location: '', notes: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/unassign/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"location":"","notes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"location": @"",
@"notes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/unassign/"]
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/:id/unassign/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"notes\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/unassign/",
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([
'location' => '',
'notes' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/unassign/', [
'body' => '{
"location": "",
"notes": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/unassign/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'notes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'notes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/unassign/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/unassign/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/unassign/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"notes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/tasks/:id/unassign/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/unassign/"
payload = {
"location": "",
"notes": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/unassign/"
payload <- "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/unassign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"location\": \"\",\n \"notes\": \"\"\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/tasks/:id/unassign/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"location\": \"\",\n \"notes\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/unassign/";
let payload = json!({
"location": "",
"notes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tasks/:id/unassign/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"location": "",
"notes": ""
}'
echo '{
"location": "",
"notes": ""
}' | \
http POST {{baseUrl}}/tasks/:id/unassign/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "notes": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/unassign/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"location": "",
"notes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/unassign/")! 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
tasks_update
{{baseUrl}}/tasks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tasks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/tasks/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:actions {}
:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:assignee ""
:assignee_proximity ""
:auto_assign false
:barcodes []
:cancelled_at ""
:category ""
:complete_after ""
:complete_before ""
:completed_at ""
:contact {:company ""
:emails []
:name ""
:notes ""
:phones []}
:contact_address ""
:contact_address_external_id ""
:counts {}
:created_at ""
:description ""
:documents []
:duration {}
:external_id ""
:forms {}
:id ""
:issues []
:metafields {}
:order ""
:orderer ""
:orderer_name ""
:position ""
:priority 0
:reference ""
:route ""
:scheduled_time ""
:signatures []
:size []
:state ""
:trackers []
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/tasks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/tasks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tasks/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tasks/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1197
{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/tasks/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tasks/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tasks/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/tasks/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/tasks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tasks/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","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}}/tasks/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tasks/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/tasks/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {
company: '',
emails: [],
name: '',
notes: '',
phones: []
},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/tasks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
actions: {},
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
assignee: '',
assignee_proximity: '',
auto_assign: false,
barcodes: [],
cancelled_at: '',
category: '',
complete_after: '',
complete_before: '',
completed_at: '',
contact: {company: '', emails: [], name: '', notes: '', phones: []},
contact_address: '',
contact_address_external_id: '',
counts: {},
created_at: '',
description: '',
documents: [],
duration: {},
external_id: '',
forms: {},
id: '',
issues: [],
metafields: {},
order: '',
orderer: '',
orderer_name: '',
position: '',
priority: 0,
reference: '',
route: '',
scheduled_time: '',
signatures: [],
size: [],
state: '',
trackers: [],
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tasks/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","actions":{},"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"assignee":"","assignee_proximity":"","auto_assign":false,"barcodes":[],"cancelled_at":"","category":"","complete_after":"","complete_before":"","completed_at":"","contact":{"company":"","emails":[],"name":"","notes":"","phones":[]},"contact_address":"","contact_address_external_id":"","counts":{},"created_at":"","description":"","documents":[],"duration":{},"external_id":"","forms":{},"id":"","issues":[],"metafields":{},"order":"","orderer":"","orderer_name":"","position":"","priority":0,"reference":"","route":"","scheduled_time":"","signatures":[],"size":[],"state":"","trackers":[],"updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"actions": @{ },
@"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"assignee": @"",
@"assignee_proximity": @"",
@"auto_assign": @NO,
@"barcodes": @[ ],
@"cancelled_at": @"",
@"category": @"",
@"complete_after": @"",
@"complete_before": @"",
@"completed_at": @"",
@"contact": @{ @"company": @"", @"emails": @[ ], @"name": @"", @"notes": @"", @"phones": @[ ] },
@"contact_address": @"",
@"contact_address_external_id": @"",
@"counts": @{ },
@"created_at": @"",
@"description": @"",
@"documents": @[ ],
@"duration": @{ },
@"external_id": @"",
@"forms": @{ },
@"id": @"",
@"issues": @[ ],
@"metafields": @{ },
@"order": @"",
@"orderer": @"",
@"orderer_name": @"",
@"position": @"",
@"priority": @0,
@"reference": @"",
@"route": @"",
@"scheduled_time": @"",
@"signatures": @[ ],
@"size": @[ ],
@"state": @"",
@"trackers": @[ ],
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tasks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tasks/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tasks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/', [
'body' => '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tasks/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'actions' => [
],
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'assignee' => '',
'assignee_proximity' => '',
'auto_assign' => null,
'barcodes' => [
],
'cancelled_at' => '',
'category' => '',
'complete_after' => '',
'complete_before' => '',
'completed_at' => '',
'contact' => [
'company' => '',
'emails' => [
],
'name' => '',
'notes' => '',
'phones' => [
]
],
'contact_address' => '',
'contact_address_external_id' => '',
'counts' => [
],
'created_at' => '',
'description' => '',
'documents' => [
],
'duration' => [
],
'external_id' => '',
'forms' => [
],
'id' => '',
'issues' => [
],
'metafields' => [
],
'order' => '',
'orderer' => '',
'orderer_name' => '',
'position' => '',
'priority' => 0,
'reference' => '',
'route' => '',
'scheduled_time' => '',
'signatures' => [
],
'size' => [
],
'state' => '',
'trackers' => [
],
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/tasks/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tasks/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tasks/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/tasks/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tasks/:id/"
payload = {
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": False,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tasks/:id/"
payload <- "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tasks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/tasks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"actions\": {},\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"assignee\": \"\",\n \"assignee_proximity\": \"\",\n \"auto_assign\": false,\n \"barcodes\": [],\n \"cancelled_at\": \"\",\n \"category\": \"\",\n \"complete_after\": \"\",\n \"complete_before\": \"\",\n \"completed_at\": \"\",\n \"contact\": {\n \"company\": \"\",\n \"emails\": [],\n \"name\": \"\",\n \"notes\": \"\",\n \"phones\": []\n },\n \"contact_address\": \"\",\n \"contact_address_external_id\": \"\",\n \"counts\": {},\n \"created_at\": \"\",\n \"description\": \"\",\n \"documents\": [],\n \"duration\": {},\n \"external_id\": \"\",\n \"forms\": {},\n \"id\": \"\",\n \"issues\": [],\n \"metafields\": {},\n \"order\": \"\",\n \"orderer\": \"\",\n \"orderer_name\": \"\",\n \"position\": \"\",\n \"priority\": 0,\n \"reference\": \"\",\n \"route\": \"\",\n \"scheduled_time\": \"\",\n \"signatures\": [],\n \"size\": [],\n \"state\": \"\",\n \"trackers\": [],\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tasks/:id/";
let payload = json!({
"account": "",
"actions": json!({}),
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": (),
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": json!({
"company": "",
"emails": (),
"name": "",
"notes": "",
"phones": ()
}),
"contact_address": "",
"contact_address_external_id": "",
"counts": json!({}),
"created_at": "",
"description": "",
"documents": (),
"duration": json!({}),
"external_id": "",
"forms": json!({}),
"id": "",
"issues": (),
"metafields": json!({}),
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": (),
"size": (),
"state": "",
"trackers": (),
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/tasks/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}'
echo '{
"account": "",
"actions": {},
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": {
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
},
"contact_address": "",
"contact_address_external_id": "",
"counts": {},
"created_at": "",
"description": "",
"documents": [],
"duration": {},
"external_id": "",
"forms": {},
"id": "",
"issues": [],
"metafields": {},
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
}' | \
http PUT {{baseUrl}}/tasks/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "actions": {},\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "assignee": "",\n "assignee_proximity": "",\n "auto_assign": false,\n "barcodes": [],\n "cancelled_at": "",\n "category": "",\n "complete_after": "",\n "complete_before": "",\n "completed_at": "",\n "contact": {\n "company": "",\n "emails": [],\n "name": "",\n "notes": "",\n "phones": []\n },\n "contact_address": "",\n "contact_address_external_id": "",\n "counts": {},\n "created_at": "",\n "description": "",\n "documents": [],\n "duration": {},\n "external_id": "",\n "forms": {},\n "id": "",\n "issues": [],\n "metafields": {},\n "order": "",\n "orderer": "",\n "orderer_name": "",\n "position": "",\n "priority": 0,\n "reference": "",\n "route": "",\n "scheduled_time": "",\n "signatures": [],\n "size": [],\n "state": "",\n "trackers": [],\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/tasks/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"actions": [],
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"assignee": "",
"assignee_proximity": "",
"auto_assign": false,
"barcodes": [],
"cancelled_at": "",
"category": "",
"complete_after": "",
"complete_before": "",
"completed_at": "",
"contact": [
"company": "",
"emails": [],
"name": "",
"notes": "",
"phones": []
],
"contact_address": "",
"contact_address_external_id": "",
"counts": [],
"created_at": "",
"description": "",
"documents": [],
"duration": [],
"external_id": "",
"forms": [],
"id": "",
"issues": [],
"metafields": [],
"order": "",
"orderer": "",
"orderer_name": "",
"position": "",
"priority": 0,
"reference": "",
"route": "",
"scheduled_time": "",
"signatures": [],
"size": [],
"state": "",
"trackers": [],
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tasks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
time_location_features_create
{{baseUrl}}/time_location_features/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/time_location_features/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accuracy 0
:altitude 0
:battery_level ""
:created_at ""
:heading 0
:id ""
:location {:coordinates []
:type ""}
:model ""
:source ""
:speed 0
:state ""
:time ""
:updated_at ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/time_location_features/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/"
payload := strings.NewReader("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/time_location_features/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 274
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/time_location_features/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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 \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/time_location_features/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/time_location_features/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/time_location_features/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/time_location_features/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/time_location_features/',
headers: {
authorization: '{{apiKey}}',
'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({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/time_location_features/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
},
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}}/time_location_features/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
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}}/time_location_features/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accuracy": @0,
@"altitude": @0,
@"battery_level": @"",
@"created_at": @"",
@"heading": @0,
@"id": @"",
@"location": @{ @"coordinates": @[ ], @"type": @"" },
@"model": @"",
@"source": @"",
@"speed": @0,
@"state": @"",
@"time": @"",
@"updated_at": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/"]
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}}/time_location_features/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/",
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([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/time_location_features/', [
'body' => '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/time_location_features/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/time_location_features/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/"
payload = {
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/"
payload <- "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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/time_location_features/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_location_features/";
let payload = json!({
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": json!({
"coordinates": (),
"type": ""
}),
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/time_location_features/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
echo '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}' | \
http POST {{baseUrl}}/time_location_features/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/time_location_features/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": [
"coordinates": [],
"type": ""
],
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/")! 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
time_location_features_destroy
{{baseUrl}}/time_location_features/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/time_location_features/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/time_location_features/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/time_location_features/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/time_location_features/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/time_location_features/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/time_location_features/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/time_location_features/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/time_location_features/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/time_location_features/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_location_features/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/time_location_features/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_location_features/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/time_location_features/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/time_location_features/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/time_location_features/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/time_location_features/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_location_features/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/time_location_features/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/time_location_features/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/time_location_features/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
time_location_features_list
{{baseUrl}}/time_location_features/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/time_location_features/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/time_location_features/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/time_location_features/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/time_location_features/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/time_location_features/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/time_location_features/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/"))
.header("authorization", "{{apiKey}}")
.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}}/time_location_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/time_location_features/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/time_location_features/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/time_location_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_location_features/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/time_location_features/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/time_location_features/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/time_location_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_location_features/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/time_location_features/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/time_location_features/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/time_location_features/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/time_location_features/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_location_features/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/time_location_features/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/time_location_features/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/time_location_features/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
time_location_features_partial_update
{{baseUrl}}/time_location_features/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/time_location_features/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accuracy 0
:altitude 0
:battery_level ""
:created_at ""
:heading 0
:id ""
:location {:coordinates []
:type ""}
:model ""
:source ""
:speed 0
:state ""
:time ""
:updated_at ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/time_location_features/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/time_location_features/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/:id/"
payload := strings.NewReader("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/time_location_features/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 274
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/time_location_features/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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 \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/time_location_features/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/time_location_features/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_location_features/:id/',
headers: {
authorization: '{{apiKey}}',
'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({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/time_location_features/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accuracy": @0,
@"altitude": @0,
@"battery_level": @"",
@"created_at": @"",
@"heading": @0,
@"id": @"",
@"location": @{ @"coordinates": @[ ], @"type": @"" },
@"model": @"",
@"source": @"",
@"speed": @0,
@"state": @"",
@"time": @"",
@"updated_at": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_location_features/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/time_location_features/:id/', [
'body' => '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/time_location_features/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/time_location_features/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/:id/"
payload = {
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/:id/"
payload <- "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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.patch('/baseUrl/time_location_features/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/:id/";
let payload = json!({
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": json!({
"coordinates": (),
"type": ""
}),
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/time_location_features/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
echo '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}' | \
http PATCH {{baseUrl}}/time_location_features/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/time_location_features/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": [
"coordinates": [],
"type": ""
],
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
time_location_features_retrieve
{{baseUrl}}/time_location_features/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/time_location_features/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/time_location_features/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/time_location_features/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/time_location_features/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/time_location_features/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/time_location_features/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/time_location_features/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/time_location_features/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/time_location_features/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_location_features/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/time_location_features/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_location_features/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/time_location_features/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/time_location_features/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/time_location_features/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/time_location_features/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_location_features/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/time_location_features/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/time_location_features/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/time_location_features/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
time_location_features_update
{{baseUrl}}/time_location_features/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_location_features/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/time_location_features/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accuracy 0
:altitude 0
:battery_level ""
:created_at ""
:heading 0
:id ""
:location {:coordinates []
:type ""}
:model ""
:source ""
:speed 0
:state ""
:time ""
:updated_at ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/time_location_features/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_location_features/:id/"
payload := strings.NewReader("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/time_location_features/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 274
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/time_location_features/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_location_features/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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 \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/time_location_features/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/time_location_features/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_location_features/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/time_location_features/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/time_location_features/:id/',
headers: {
authorization: '{{apiKey}}',
'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({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
},
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}}/time_location_features/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
});
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}}/time_location_features/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
model: '',
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_location_features/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"model":"","source":"","speed":0,"state":"","time":"","updated_at":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accuracy": @0,
@"altitude": @0,
@"battery_level": @"",
@"created_at": @"",
@"heading": @0,
@"id": @"",
@"location": @{ @"coordinates": @[ ], @"type": @"" },
@"model": @"",
@"source": @"",
@"speed": @0,
@"state": @"",
@"time": @"",
@"updated_at": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_location_features/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_location_features/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_location_features/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/time_location_features/:id/', [
'body' => '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_location_features/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'model' => '',
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/time_location_features/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_location_features/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_location_features/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/time_location_features/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_location_features/:id/"
payload = {
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_location_features/:id/"
payload <- "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_location_features/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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/time_location_features/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"model\": \"\",\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"user\": \"\"\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}}/time_location_features/:id/";
let payload = json!({
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": json!({
"coordinates": (),
"type": ""
}),
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/time_location_features/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}'
echo '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
}' | \
http PUT {{baseUrl}}/time_location_features/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "model": "",\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/time_location_features/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": [
"coordinates": [],
"type": ""
],
"model": "",
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_location_features/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
time_locations_create
{{baseUrl}}/time_locations/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_locations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/time_locations/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:accuracy 0
:altitude 0
:battery_level ""
:created_at ""
:heading 0
:id ""
:location {:coordinates []
:type ""}
:source ""
:speed 0
:state ""
:time ""
:updated_at ""
:url ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/time_locations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/time_locations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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}}/time_locations/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_locations/"
payload := strings.NewReader("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/time_locations/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 272
{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/time_locations/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_locations/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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 \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/time_locations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/time_locations/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/time_locations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/time_locations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_locations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"source":"","speed":0,"state":"","time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_locations/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/time_locations/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/time_locations/',
headers: {
authorization: '{{apiKey}}',
'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({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/time_locations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
},
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}}/time_locations/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {
coordinates: [],
type: ''
},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
});
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}}/time_locations/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
accuracy: 0,
altitude: 0,
battery_level: '',
created_at: '',
heading: 0,
id: '',
location: {coordinates: [], type: ''},
source: '',
speed: 0,
state: '',
time: '',
updated_at: '',
url: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_locations/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"accuracy":0,"altitude":0,"battery_level":"","created_at":"","heading":0,"id":"","location":{"coordinates":[],"type":""},"source":"","speed":0,"state":"","time":"","updated_at":"","url":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accuracy": @0,
@"altitude": @0,
@"battery_level": @"",
@"created_at": @"",
@"heading": @0,
@"id": @"",
@"location": @{ @"coordinates": @[ ], @"type": @"" },
@"source": @"",
@"speed": @0,
@"state": @"",
@"time": @"",
@"updated_at": @"",
@"url": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_locations/"]
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}}/time_locations/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_locations/",
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([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/time_locations/', [
'body' => '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_locations/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accuracy' => 0,
'altitude' => 0,
'battery_level' => '',
'created_at' => '',
'heading' => 0,
'id' => '',
'location' => [
'coordinates' => [
],
'type' => ''
],
'source' => '',
'speed' => 0,
'state' => '',
'time' => '',
'updated_at' => '',
'url' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/time_locations/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_locations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_locations/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/time_locations/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_locations/"
payload = {
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_locations/"
payload <- "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_locations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\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/time_locations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"accuracy\": 0,\n \"altitude\": 0,\n \"battery_level\": \"\",\n \"created_at\": \"\",\n \"heading\": 0,\n \"id\": \"\",\n \"location\": {\n \"coordinates\": [],\n \"type\": \"\"\n },\n \"source\": \"\",\n \"speed\": 0,\n \"state\": \"\",\n \"time\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_locations/";
let payload = json!({
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": json!({
"coordinates": (),
"type": ""
}),
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/time_locations/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}'
echo '{
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": {
"coordinates": [],
"type": ""
},
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
}' | \
http POST {{baseUrl}}/time_locations/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "accuracy": 0,\n "altitude": 0,\n "battery_level": "",\n "created_at": "",\n "heading": 0,\n "id": "",\n "location": {\n "coordinates": [],\n "type": ""\n },\n "source": "",\n "speed": 0,\n "state": "",\n "time": "",\n "updated_at": "",\n "url": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/time_locations/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"accuracy": 0,
"altitude": 0,
"battery_level": "",
"created_at": "",
"heading": 0,
"id": "",
"location": [
"coordinates": [],
"type": ""
],
"source": "",
"speed": 0,
"state": "",
"time": "",
"updated_at": "",
"url": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_locations/")! 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
time_locations_list
{{baseUrl}}/time_locations/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_locations/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/time_locations/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/time_locations/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/time_locations/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/time_locations/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_locations/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/time_locations/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/time_locations/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_locations/"))
.header("authorization", "{{apiKey}}")
.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}}/time_locations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/time_locations/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/time_locations/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/time_locations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_locations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_locations/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/time_locations/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_locations/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/time_locations/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/time_locations/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/time_locations/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_locations/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_locations/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_locations/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_locations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/time_locations/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_locations/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/time_locations/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_locations/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_locations/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/time_locations/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_locations/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_locations/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_locations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/time_locations/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_locations/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/time_locations/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/time_locations/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/time_locations/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_locations/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
time_locations_retrieve
{{baseUrl}}/time_locations/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/time_locations/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/time_locations/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/time_locations/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/time_locations/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/time_locations/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/time_locations/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/time_locations/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/time_locations/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/time_locations/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/time_locations/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/time_locations/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/time_locations/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/time_locations/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/time_locations/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/time_locations/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/time_locations/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/time_locations/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/time_locations/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/time_locations/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/time_locations/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/time_locations/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/time_locations/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/time_locations/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/time_locations/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/time_locations/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/time_locations/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/time_locations/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/time_locations/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/time_locations/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/time_locations/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/time_locations/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/time_locations/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/time_locations/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/time_locations/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/time_locations/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/time_locations/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/time_locations/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/time_locations/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/time_locations/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
trackers_create
{{baseUrl}}/trackers/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/trackers/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:active_from ""
:active_states []
:active_until ""
:autozoom false
:created_by ""
:id ""
:max_zoom_level 0
:queued_states []
:reviewed_at ""
:reviews_allowed false
:show_call_action false
:show_destination false
:show_driver_info false
:show_eta false
:show_logo false
:show_path false
:show_predicted_delivery false
:show_sms_action false
:tasks []
:tracking_page_url ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/trackers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\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}}/trackers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/trackers/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 504
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/trackers/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/trackers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/trackers/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
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}}/trackers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/trackers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","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}}/trackers/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/trackers/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/trackers/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/trackers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
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}}/trackers/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
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}}/trackers/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"active_from": @"",
@"active_states": @[ ],
@"active_until": @"",
@"autozoom": @NO,
@"created_by": @"",
@"id": @"",
@"max_zoom_level": @0,
@"queued_states": @[ ],
@"reviewed_at": @"",
@"reviews_allowed": @NO,
@"show_call_action": @NO,
@"show_destination": @NO,
@"show_driver_info": @NO,
@"show_eta": @NO,
@"show_logo": @NO,
@"show_path": @NO,
@"show_predicted_delivery": @NO,
@"show_sms_action": @NO,
@"tasks": @[ ],
@"tracking_page_url": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/"]
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}}/trackers/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/trackers/', [
'body' => '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/trackers/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/trackers/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/"
payload = {
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": False,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": False,
"show_call_action": False,
"show_destination": False,
"show_driver_info": False,
"show_eta": False,
"show_logo": False,
"show_path": False,
"show_predicted_delivery": False,
"show_sms_action": False,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/"
payload <- "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/trackers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/";
let payload = json!({
"account": "",
"active_from": "",
"active_states": (),
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": (),
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": (),
"tracking_page_url": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/trackers/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
echo '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}' | \
http POST {{baseUrl}}/trackers/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/trackers/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/")! 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
trackers_list
{{baseUrl}}/trackers/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/trackers/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/trackers/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/trackers/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/trackers/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/trackers/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/"))
.header("authorization", "{{apiKey}}")
.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}}/trackers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/trackers/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/trackers/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/trackers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/trackers/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/trackers/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/trackers/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/trackers/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/trackers/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/trackers/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/trackers/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/trackers/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/trackers/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/trackers/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/trackers/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/trackers/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/trackers/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/trackers/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
trackers_partial_update
{{baseUrl}}/trackers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/trackers/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:active_from ""
:active_states []
:active_until ""
:autozoom false
:created_by ""
:id ""
:max_zoom_level 0
:queued_states []
:reviewed_at ""
:reviews_allowed false
:show_call_action false
:show_destination false
:show_driver_info false
:show_eta false
:show_logo false
:show_path false
:show_predicted_delivery false
:show_sms_action false
:tasks []
:tracking_page_url ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/trackers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/trackers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/trackers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 504
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/trackers/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/trackers/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/trackers/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/trackers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","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}}/trackers/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/trackers/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/trackers/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
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('PATCH', '{{baseUrl}}/trackers/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
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: 'PATCH',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"active_from": @"",
@"active_states": @[ ],
@"active_until": @"",
@"autozoom": @NO,
@"created_by": @"",
@"id": @"",
@"max_zoom_level": @0,
@"queued_states": @[ ],
@"reviewed_at": @"",
@"reviews_allowed": @NO,
@"show_call_action": @NO,
@"show_destination": @NO,
@"show_driver_info": @NO,
@"show_eta": @NO,
@"show_logo": @NO,
@"show_path": @NO,
@"show_predicted_delivery": @NO,
@"show_sms_action": @NO,
@"tasks": @[ ],
@"tracking_page_url": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/trackers/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/trackers/:id/', [
'body' => '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/trackers/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/trackers/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/:id/"
payload = {
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": False,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": False,
"show_call_action": False,
"show_destination": False,
"show_driver_info": False,
"show_eta": False,
"show_logo": False,
"show_path": False,
"show_predicted_delivery": False,
"show_sms_action": False,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/:id/"
payload <- "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/trackers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/:id/";
let payload = json!({
"account": "",
"active_from": "",
"active_states": (),
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": (),
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": (),
"tracking_page_url": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/trackers/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
echo '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/trackers/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/trackers/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
trackers_public_retrieve
{{baseUrl}}/trackers/:id/public/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/:id/public/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/trackers/:id/public/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/trackers/:id/public/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/trackers/:id/public/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/:id/public/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/:id/public/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/trackers/:id/public/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/trackers/:id/public/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/:id/public/"))
.header("authorization", "{{apiKey}}")
.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}}/trackers/:id/public/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/trackers/:id/public/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/trackers/:id/public/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/trackers/:id/public/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/:id/public/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/trackers/:id/public/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/trackers/:id/public/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/trackers/:id/public/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/trackers/:id/public/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/trackers/:id/public/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/trackers/:id/public/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/:id/public/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/:id/public/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/trackers/:id/public/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/:id/public/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/trackers/:id/public/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/:id/public/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/trackers/:id/public/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/:id/public/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/:id/public/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/trackers/:id/public/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/:id/public/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/:id/public/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/:id/public/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/trackers/:id/public/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/:id/public/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/trackers/:id/public/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/trackers/:id/public/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/trackers/:id/public/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/:id/public/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
trackers_retrieve
{{baseUrl}}/trackers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/trackers/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/trackers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/trackers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/trackers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/trackers/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/trackers/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/trackers/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/trackers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/trackers/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/trackers/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/trackers/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/trackers/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/trackers/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/trackers/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/trackers/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/trackers/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/trackers/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/trackers/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/trackers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/trackers/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/trackers/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/trackers/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
trackers_update
{{baseUrl}}/trackers/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/trackers/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/trackers/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:active_from ""
:active_states []
:active_until ""
:autozoom false
:created_by ""
:id ""
:max_zoom_level 0
:queued_states []
:reviewed_at ""
:reviews_allowed false
:show_call_action false
:show_destination false
:show_driver_info false
:show_eta false
:show_logo false
:show_path false
:show_predicted_delivery false
:show_sms_action false
:tasks []
:tracking_page_url ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/trackers/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/trackers/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/trackers/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/trackers/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/trackers/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 504
{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/trackers/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/trackers/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/trackers/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/trackers/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/trackers/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/trackers/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","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}}/trackers/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/trackers/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/trackers/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/trackers/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/trackers/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
active_from: '',
active_states: [],
active_until: '',
autozoom: false,
created_by: '',
id: '',
max_zoom_level: 0,
queued_states: [],
reviewed_at: '',
reviews_allowed: false,
show_call_action: false,
show_destination: false,
show_driver_info: false,
show_eta: false,
show_logo: false,
show_path: false,
show_predicted_delivery: false,
show_sms_action: false,
tasks: [],
tracking_page_url: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/trackers/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","active_from":"","active_states":[],"active_until":"","autozoom":false,"created_by":"","id":"","max_zoom_level":0,"queued_states":[],"reviewed_at":"","reviews_allowed":false,"show_call_action":false,"show_destination":false,"show_driver_info":false,"show_eta":false,"show_logo":false,"show_path":false,"show_predicted_delivery":false,"show_sms_action":false,"tasks":[],"tracking_page_url":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"active_from": @"",
@"active_states": @[ ],
@"active_until": @"",
@"autozoom": @NO,
@"created_by": @"",
@"id": @"",
@"max_zoom_level": @0,
@"queued_states": @[ ],
@"reviewed_at": @"",
@"reviews_allowed": @NO,
@"show_call_action": @NO,
@"show_destination": @NO,
@"show_driver_info": @NO,
@"show_eta": @NO,
@"show_logo": @NO,
@"show_path": @NO,
@"show_predicted_delivery": @NO,
@"show_sms_action": @NO,
@"tasks": @[ ],
@"tracking_page_url": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/trackers/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/trackers/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/trackers/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/trackers/:id/', [
'body' => '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/trackers/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'active_from' => '',
'active_states' => [
],
'active_until' => '',
'autozoom' => null,
'created_by' => '',
'id' => '',
'max_zoom_level' => 0,
'queued_states' => [
],
'reviewed_at' => '',
'reviews_allowed' => null,
'show_call_action' => null,
'show_destination' => null,
'show_driver_info' => null,
'show_eta' => null,
'show_logo' => null,
'show_path' => null,
'show_predicted_delivery' => null,
'show_sms_action' => null,
'tasks' => [
],
'tracking_page_url' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/trackers/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/trackers/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/trackers/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/trackers/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/trackers/:id/"
payload = {
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": False,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": False,
"show_call_action": False,
"show_destination": False,
"show_driver_info": False,
"show_eta": False,
"show_logo": False,
"show_path": False,
"show_predicted_delivery": False,
"show_sms_action": False,
"tasks": [],
"tracking_page_url": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/trackers/:id/"
payload <- "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/trackers/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/trackers/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"active_from\": \"\",\n \"active_states\": [],\n \"active_until\": \"\",\n \"autozoom\": false,\n \"created_by\": \"\",\n \"id\": \"\",\n \"max_zoom_level\": 0,\n \"queued_states\": [],\n \"reviewed_at\": \"\",\n \"reviews_allowed\": false,\n \"show_call_action\": false,\n \"show_destination\": false,\n \"show_driver_info\": false,\n \"show_eta\": false,\n \"show_logo\": false,\n \"show_path\": false,\n \"show_predicted_delivery\": false,\n \"show_sms_action\": false,\n \"tasks\": [],\n \"tracking_page_url\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/trackers/:id/";
let payload = json!({
"account": "",
"active_from": "",
"active_states": (),
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": (),
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": (),
"tracking_page_url": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/trackers/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}'
echo '{
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
}' | \
http PUT {{baseUrl}}/trackers/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "active_from": "",\n "active_states": [],\n "active_until": "",\n "autozoom": false,\n "created_by": "",\n "id": "",\n "max_zoom_level": 0,\n "queued_states": [],\n "reviewed_at": "",\n "reviews_allowed": false,\n "show_call_action": false,\n "show_destination": false,\n "show_driver_info": false,\n "show_eta": false,\n "show_logo": false,\n "show_path": false,\n "show_predicted_delivery": false,\n "show_sms_action": false,\n "tasks": [],\n "tracking_page_url": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/trackers/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"active_from": "",
"active_states": [],
"active_until": "",
"autozoom": false,
"created_by": "",
"id": "",
"max_zoom_level": 0,
"queued_states": [],
"reviewed_at": "",
"reviews_allowed": false,
"show_call_action": false,
"show_destination": false,
"show_driver_info": false,
"show_eta": false,
"show_logo": false,
"show_path": false,
"show_predicted_delivery": false,
"show_sms_action": false,
"tasks": [],
"tracking_page_url": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/trackers/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
users_activate_create
{{baseUrl}}/users/:id/activate/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"password": "",
"token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/activate/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"password\": \"\",\n \"token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/users/:id/activate/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:password ""
:token ""}})
require "http/client"
url = "{{baseUrl}}/users/:id/activate/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"password\": \"\",\n \"token\": \"\"\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}}/users/:id/activate/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"password\": \"\",\n \"token\": \"\"\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/:id/activate/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"password\": \"\",\n \"token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/activate/"
payload := strings.NewReader("{\n \"password\": \"\",\n \"token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/users/:id/activate/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"password": "",
"token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/users/:id/activate/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"password\": \"\",\n \"token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/activate/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"password\": \"\",\n \"token\": \"\"\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 \"password\": \"\",\n \"token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/users/:id/activate/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"password\": \"\",\n \"token\": \"\"\n}")
.asString();
const data = JSON.stringify({
password: '',
token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/users/:id/activate/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/users/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {password: '', token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"password":"","token":""}'
};
try {
const response = await 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/:id/activate/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "password": "",\n "token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"password\": \"\",\n \"token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/activate/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/users/:id/activate/',
headers: {
authorization: '{{apiKey}}',
'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({password: '', token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/users/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {password: '', token: ''},
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}}/users/:id/activate/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
password: '',
token: ''
});
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}}/users/:id/activate/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {password: '', token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/activate/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"password":"","token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"password": @"",
@"token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/activate/"]
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}}/users/:id/activate/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"password\": \"\",\n \"token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/activate/",
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([
'password' => '',
'token' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/users/:id/activate/', [
'body' => '{
"password": "",
"token": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/activate/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'password' => '',
'token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'password' => '',
'token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:id/activate/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"password": "",
"token": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/activate/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"password": "",
"token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"password\": \"\",\n \"token\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/users/:id/activate/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/activate/"
payload = {
"password": "",
"token": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/activate/"
payload <- "{\n \"password\": \"\",\n \"token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/activate/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"password\": \"\",\n \"token\": \"\"\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/users/:id/activate/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"password\": \"\",\n \"token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/activate/";
let payload = json!({
"password": "",
"token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/users/:id/activate/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"password": "",
"token": ""
}'
echo '{
"password": "",
"token": ""
}' | \
http POST {{baseUrl}}/users/:id/activate/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "password": "",\n "token": ""\n}' \
--output-document \
- {{baseUrl}}/users/:id/activate/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"password": "",
"token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/activate/")! 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
users_create
{{baseUrl}}/users/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/users/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:display_name ""
:email ""
:first_name ""
:id ""
:last_name ""
:password ""
:phone ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/users/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\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}}/users/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/"
payload := strings.NewReader("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/users/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 504
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/users/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/users/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
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}}/users/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/users/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","password":"","phone":"","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}}/users/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "password": "",\n "phone": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/users/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/users/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
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}}/users/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
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}}/users/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
password: '',
phone: '',
url: ''
}
};
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: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","password":"","phone":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"display_name": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"password": @"",
@"phone": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/"]
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}}/users/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST 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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'password' => '',
'phone' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/users/', [
'body' => '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'password' => '',
'phone' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'password' => '',
'phone' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/users/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/"
payload = {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/"
payload <- "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
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::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/users/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"password\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/";
let payload = json!({
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/users/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}'
echo '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
}' | \
http POST {{baseUrl}}/users/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "password": "",\n "phone": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/users/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"password": "",
"phone": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/")! 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
users_destroy
{{baseUrl}}/users/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/users/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/users/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/users/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/users/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/users/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/users/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/users/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/users/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/users/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/users/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/users/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/users/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/users/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/users/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/users/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
users_list
{{baseUrl}}/users/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
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);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
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
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/"))
.header("authorization", "{{apiKey}}")
.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()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/")
.header("authorization", "{{apiKey}}")
.asString();
const 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.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/',
headers: {authorization: '{{apiKey}}'}
};
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.headers({
authorization: '{{apiKey}}'
});
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/',
headers: {authorization: '{{apiKey}}'}
};
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', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `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",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/users/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), 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)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/users/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
users_on_duty_destroy
{{baseUrl}}/users/:id/on_duty/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/on_duty/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/users/:id/on_duty/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users/:id/on_duty/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/users/:id/on_duty/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/on_duty/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/on_duty/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/users/:id/on_duty/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/users/:id/on_duty/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/on_duty/"))
.header("authorization", "{{apiKey}}")
.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}}/users/:id/on_duty/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/users/:id/on_duty/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/users/:id/on_duty/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/on_duty/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/on_duty/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:id/on_duty/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/users/:id/on_duty/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/on_duty/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/on_duty/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/on_duty/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/users/:id/on_duty/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/on_duty/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/on_duty/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/users/:id/on_duty/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/on_duty/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/on_duty/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/on_duty/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/users/:id/on_duty/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/on_duty/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/users/:id/on_duty/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/users/:id/on_duty/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users/:id/on_duty/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/on_duty/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
users_on_duty_retrieve
{{baseUrl}}/users/:id/on_duty/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/on_duty/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/:id/on_duty/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users/:id/on_duty/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users/:id/on_duty/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/on_duty/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/on_duty/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/users/:id/on_duty/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/:id/on_duty/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/on_duty/"))
.header("authorization", "{{apiKey}}")
.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/:id/on_duty/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/:id/on_duty/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/on_duty/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/on_duty/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/on_duty/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:id/on_duty/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/on_duty/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/on_duty/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/on_duty/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/on_duty/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/on_duty/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users/:id/on_duty/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/on_duty/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/on_duty/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/users/:id/on_duty/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/on_duty/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/on_duty/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/on_duty/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users/:id/on_duty/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/on_duty/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users/:id/on_duty/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/users/:id/on_duty/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users/:id/on_duty/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/on_duty/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
users_on_duty_update
{{baseUrl}}/users/:id/on_duty/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/on_duty/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:id/on_duty/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""}})
require "http/client"
url = "{{baseUrl}}/users/:id/on_duty/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\"\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/:id/on_duty/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\"\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/:id/on_duty/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/on_duty/"
payload := strings.NewReader("{\n \"account\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/on_duty/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"account": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:id/on_duty/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/on_duty/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:id/on_duty/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:id/on_duty/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: ''
});
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/:id/on_duty/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":""}'
};
try {
const response = await 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/:id/on_duty/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/on_duty/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/on_duty/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:id/on_duty/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {account: ''},
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/:id/on_duty/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: ''
});
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/:id/on_duty/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {account: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/on_duty/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/on_duty/"]
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/:id/on_duty/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/on_duty/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/on_duty/', [
'body' => '{
"account": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:id/on_duty/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/on_duty/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/on_duty/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/users/:id/on_duty/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/on_duty/"
payload = { "account": "" }
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/on_duty/"
payload <- "{\n \"account\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/on_duty/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\"\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/:id/on_duty/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\"\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/:id/on_duty/";
let payload = json!({"account": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/users/:id/on_duty/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": ""
}'
echo '{
"account": ""
}' | \
http PUT {{baseUrl}}/users/:id/on_duty/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": ""\n}' \
--output-document \
- {{baseUrl}}/users/:id/on_duty/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["account": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/on_duty/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
users_partial_update
{{baseUrl}}/users/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/users/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:display_name ""
:email ""
:first_name ""
:id ""
:last_name ""
:phone ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/users/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/users/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/"
payload := strings.NewReader("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/users/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 486
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/users/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/users/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/users/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","phone":"","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}}/users/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "phone": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
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('PATCH', '{{baseUrl}}/users/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
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: 'PATCH',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","phone":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"display_name": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"phone": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/users/:id/', [
'body' => '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/users/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/"
payload = {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/"
payload <- "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/users/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/";
let payload = json!({
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/users/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
echo '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/users/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "phone": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/users/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
users_retrieve
{{baseUrl}}/users/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/users/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/"))
.header("authorization", "{{apiKey}}")
.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/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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/:id/',
headers: {authorization: '{{apiKey}}'}
};
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/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/users/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/users/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
users_update
{{baseUrl}}/users/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/users/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:address {:apartment_number ""
:city ""
:country ""
:country_code ""
:formatted_address ""
:geocode_failed_at ""
:geocoded_at ""
:google_place_id ""
:house_number ""
:location ""
:point_of_interest ""
:postal_code ""
:raw_address ""
:state ""
:street ""}
:display_name ""
:email ""
:first_name ""
:id ""
:last_name ""
:phone ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/users/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/users/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users/:id/"
payload := strings.NewReader("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 486
{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/users/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/users/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/users/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","phone":"","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}}/users/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "phone": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/users/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/users/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
address: {
apartment_number: '',
city: '',
country: '',
country_code: '',
formatted_address: '',
geocode_failed_at: '',
geocoded_at: '',
google_place_id: '',
house_number: '',
location: '',
point_of_interest: '',
postal_code: '',
raw_address: '',
state: '',
street: ''
},
display_name: '',
email: '',
first_name: '',
id: '',
last_name: '',
phone: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"address":{"apartment_number":"","city":"","country":"","country_code":"","formatted_address":"","geocode_failed_at":"","geocoded_at":"","google_place_id":"","house_number":"","location":"","point_of_interest":"","postal_code":"","raw_address":"","state":"","street":""},"display_name":"","email":"","first_name":"","id":"","last_name":"","phone":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"apartment_number": @"", @"city": @"", @"country": @"", @"country_code": @"", @"formatted_address": @"", @"geocode_failed_at": @"", @"geocoded_at": @"", @"google_place_id": @"", @"house_number": @"", @"location": @"", @"point_of_interest": @"", @"postal_code": @"", @"raw_address": @"", @"state": @"", @"street": @"" },
@"display_name": @"",
@"email": @"",
@"first_name": @"",
@"id": @"",
@"last_name": @"",
@"phone": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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/:id/', [
'body' => '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'apartment_number' => '',
'city' => '',
'country' => '',
'country_code' => '',
'formatted_address' => '',
'geocode_failed_at' => '',
'geocoded_at' => '',
'google_place_id' => '',
'house_number' => '',
'location' => '',
'point_of_interest' => '',
'postal_code' => '',
'raw_address' => '',
'state' => '',
'street' => ''
],
'display_name' => '',
'email' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'phone' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/users/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users/:id/"
payload = {
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users/:id/"
payload <- "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/users/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"address\": {\n \"apartment_number\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"country_code\": \"\",\n \"formatted_address\": \"\",\n \"geocode_failed_at\": \"\",\n \"geocoded_at\": \"\",\n \"google_place_id\": \"\",\n \"house_number\": \"\",\n \"location\": \"\",\n \"point_of_interest\": \"\",\n \"postal_code\": \"\",\n \"raw_address\": \"\",\n \"state\": \"\",\n \"street\": \"\"\n },\n \"display_name\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"phone\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users/:id/";
let payload = json!({
"address": json!({
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
}),
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/users/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}'
echo '{
"address": {
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
},
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
}' | \
http PUT {{baseUrl}}/users/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "apartment_number": "",\n "city": "",\n "country": "",\n "country_code": "",\n "formatted_address": "",\n "geocode_failed_at": "",\n "geocoded_at": "",\n "google_place_id": "",\n "house_number": "",\n "location": "",\n "point_of_interest": "",\n "postal_code": "",\n "raw_address": "",\n "state": "",\n "street": ""\n },\n "display_name": "",\n "email": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "phone": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/users/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"address": [
"apartment_number": "",
"city": "",
"country": "",
"country_code": "",
"formatted_address": "",
"geocode_failed_at": "",
"geocoded_at": "",
"google_place_id": "",
"house_number": "",
"location": "",
"point_of_interest": "",
"postal_code": "",
"raw_address": "",
"state": "",
"street": ""
],
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"phone": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
users_on_duty_log_create
{{baseUrl}}/users_on_duty_log/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users_on_duty_log/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/users_on_duty_log/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:account_role ""
:created_at ""
:mode ""
:status ""
:timestamp ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/users_on_duty_log/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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}}/users_on_duty_log/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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_on_duty_log/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users_on_duty_log/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/users_on_duty_log/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 124
{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/users_on_duty_log/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users_on_duty_log/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/users_on_duty_log/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/users_on_duty_log/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/users_on_duty_log/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/users_on_duty_log/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users_on_duty_log/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","account_role":"","created_at":"","mode":"","status":"","timestamp":"","user":""}'
};
try {
const response = await 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_on_duty_log/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "account_role": "",\n "created_at": "",\n "mode": "",\n "status": "",\n "timestamp": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/users_on_duty_log/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/users_on_duty_log/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/users_on_duty_log/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
},
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}}/users_on_duty_log/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
});
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}}/users_on_duty_log/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users_on_duty_log/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","account_role":"","created_at":"","mode":"","status":"","timestamp":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"account_role": @"",
@"created_at": @"",
@"mode": @"",
@"status": @"",
@"timestamp": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users_on_duty_log/"]
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}}/users_on_duty_log/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users_on_duty_log/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/users_on_duty_log/', [
'body' => '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users_on_duty_log/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/users_on_duty_log/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users_on_duty_log/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users_on_duty_log/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/users_on_duty_log/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users_on_duty_log/"
payload = {
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users_on_duty_log/"
payload <- "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users_on_duty_log/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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/users_on_duty_log/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users_on_duty_log/";
let payload = json!({
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/users_on_duty_log/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
echo '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}' | \
http POST {{baseUrl}}/users_on_duty_log/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "account_role": "",\n "created_at": "",\n "mode": "",\n "status": "",\n "timestamp": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/users_on_duty_log/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users_on_duty_log/")! 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
users_on_duty_log_list
{{baseUrl}}/users_on_duty_log/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users_on_duty_log/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users_on_duty_log/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users_on_duty_log/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users_on_duty_log/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users_on_duty_log/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users_on_duty_log/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/users_on_duty_log/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users_on_duty_log/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users_on_duty_log/"))
.header("authorization", "{{apiKey}}")
.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_on_duty_log/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users_on_duty_log/")
.header("authorization", "{{apiKey}}")
.asString();
const 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_on_duty_log/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users_on_duty_log/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users_on_duty_log/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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_on_duty_log/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users_on_duty_log/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users_on_duty_log/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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_on_duty_log/',
headers: {authorization: '{{apiKey}}'}
};
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_on_duty_log/');
req.headers({
authorization: '{{apiKey}}'
});
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_on_duty_log/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users_on_duty_log/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users_on_duty_log/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users_on_duty_log/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users_on_duty_log/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users_on_duty_log/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users_on_duty_log/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users_on_duty_log/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users_on_duty_log/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users_on_duty_log/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/users_on_duty_log/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users_on_duty_log/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users_on_duty_log/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users_on_duty_log/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users_on_duty_log/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users_on_duty_log/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users_on_duty_log/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/users_on_duty_log/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users_on_duty_log/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users_on_duty_log/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
users_on_duty_log_retrieve
{{baseUrl}}/users_on_duty_log/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/users_on_duty_log/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/users_on_duty_log/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/users_on_duty_log/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/users_on_duty_log/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/users_on_duty_log/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/users_on_duty_log/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/users_on_duty_log/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/users_on_duty_log/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/users_on_duty_log/:id/"))
.header("authorization", "{{apiKey}}")
.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_on_duty_log/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/users_on_duty_log/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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_on_duty_log/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/users_on_duty_log/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/users_on_duty_log/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await 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_on_duty_log/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/users_on_duty_log/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/users_on_duty_log/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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_on_duty_log/:id/',
headers: {authorization: '{{apiKey}}'}
};
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_on_duty_log/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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_on_duty_log/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/users_on_duty_log/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/users_on_duty_log/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/users_on_duty_log/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/users_on_duty_log/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/users_on_duty_log/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/users_on_duty_log/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/users_on_duty_log/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/users_on_duty_log/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/users_on_duty_log/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/users_on_duty_log/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/users_on_duty_log/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/users_on_duty_log/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/users_on_duty_log/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/users_on_duty_log/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/users_on_duty_log/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/users_on_duty_log/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/users_on_duty_log/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/users_on_duty_log/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/users_on_duty_log/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
webhooks_active_create
{{baseUrl}}/webhooks/:id/active/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/active/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/webhooks/:id/active/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:disable_message ""
:disabled_at ""
:document_events false
:failure_count 0
:headers {}
:id ""
:name ""
:notification_emails []
:review_events false
:shared_secret ""
:signature_events false
:state ""
:target ""
:task_events false
:updated_at ""
:url ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/active/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/active/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/active/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/active/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/webhooks/:id/active/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 412
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/webhooks/:id/active/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/active/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhooks/:id/active/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/webhooks/:id/active/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/webhooks/:id/active/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/:id/active/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/active/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/active/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/active/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/webhooks/:id/active/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/:id/active/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
},
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}}/webhooks/:id/active/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
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}}/webhooks/:id/active/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/active/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"disable_message": @"",
@"disabled_at": @"",
@"document_events": @NO,
@"failure_count": @0,
@"headers": @{ },
@"id": @"",
@"name": @"",
@"notification_emails": @[ ],
@"review_events": @NO,
@"shared_secret": @"",
@"signature_events": @NO,
@"state": @"",
@"target": @"",
@"task_events": @NO,
@"updated_at": @"",
@"url": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/active/"]
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}}/webhooks/:id/active/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/active/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/webhooks/:id/active/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/active/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhooks/:id/active/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/active/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/active/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/webhooks/:id/active/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/active/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": False,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": False,
"shared_secret": "",
"signature_events": False,
"state": "",
"target": "",
"task_events": False,
"updated_at": "",
"url": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/active/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/active/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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/webhooks/:id/active/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/:id/active/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": json!({}),
"id": "",
"name": "",
"notification_emails": (),
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/webhooks/:id/active/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}' | \
http POST {{baseUrl}}/webhooks/:id/active/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/webhooks/:id/active/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": [],
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/active/")! 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
webhooks_create
{{baseUrl}}/webhooks/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/webhooks/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:disable_message ""
:disabled_at ""
:document_events false
:failure_count 0
:headers {}
:id ""
:name ""
:notification_emails []
:review_events false
:shared_secret ""
:signature_events false
:state ""
:target ""
:task_events false
:updated_at ""
:url ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/webhooks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/webhooks/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 412
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/webhooks/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhooks/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/webhooks/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/webhooks/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/webhooks/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
},
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}}/webhooks/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
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}}/webhooks/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"disable_message": @"",
@"disabled_at": @"",
@"document_events": @NO,
@"failure_count": @0,
@"headers": @{ },
@"id": @"",
@"name": @"",
@"notification_emails": @[ ],
@"review_events": @NO,
@"shared_secret": @"",
@"signature_events": @NO,
@"state": @"",
@"target": @"",
@"task_events": @NO,
@"updated_at": @"",
@"url": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/webhooks/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhooks/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/webhooks/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": False,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": False,
"shared_secret": "",
"signature_events": False,
"state": "",
"target": "",
"task_events": False,
"updated_at": "",
"url": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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/webhooks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": json!({}),
"id": "",
"name": "",
"notification_emails": (),
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/webhooks/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}' | \
http POST {{baseUrl}}/webhooks/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/webhooks/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": [],
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
webhooks_destroy
{{baseUrl}}/webhooks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/webhooks/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/webhooks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/webhooks/:id/");
var request = new RestRequest("", Method.Delete);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/webhooks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/webhooks/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/webhooks/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/webhooks/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/webhooks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/',
method: 'DELETE',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.delete(null)
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/webhooks/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/webhooks/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/';
const options = {method: 'DELETE', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/webhooks/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/webhooks/:id/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/webhooks/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/"
response <- VERB("DELETE", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/webhooks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/webhooks/:id/ \
--header 'authorization: {{apiKey}}'
http DELETE {{baseUrl}}/webhooks/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/webhooks/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
webhooks_inactive_create
{{baseUrl}}/webhooks/:id/inactive/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/inactive/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/webhooks/:id/inactive/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:disable_message ""
:disabled_at ""
:document_events false
:failure_count 0
:headers {}
:id ""
:name ""
:notification_emails []
:review_events false
:shared_secret ""
:signature_events false
:state ""
:target ""
:task_events false
:updated_at ""
:url ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/inactive/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/inactive/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/inactive/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/inactive/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/webhooks/:id/inactive/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 412
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/webhooks/:id/inactive/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/inactive/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhooks/:id/inactive/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/webhooks/:id/inactive/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/webhooks/:id/inactive/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/:id/inactive/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/inactive/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/inactive/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/inactive/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/webhooks/:id/inactive/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/webhooks/:id/inactive/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
},
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}}/webhooks/:id/inactive/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
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}}/webhooks/:id/inactive/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/inactive/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"disable_message": @"",
@"disabled_at": @"",
@"document_events": @NO,
@"failure_count": @0,
@"headers": @{ },
@"id": @"",
@"name": @"",
@"notification_emails": @[ ],
@"review_events": @NO,
@"shared_secret": @"",
@"signature_events": @NO,
@"state": @"",
@"target": @"",
@"task_events": @NO,
@"updated_at": @"",
@"url": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/inactive/"]
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}}/webhooks/:id/inactive/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/inactive/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/webhooks/:id/inactive/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/inactive/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhooks/:id/inactive/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/inactive/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/inactive/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/webhooks/:id/inactive/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/inactive/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": False,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": False,
"shared_secret": "",
"signature_events": False,
"state": "",
"target": "",
"task_events": False,
"updated_at": "",
"url": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/inactive/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/inactive/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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/webhooks/:id/inactive/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/:id/inactive/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": json!({}),
"id": "",
"name": "",
"notification_emails": (),
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/webhooks/:id/inactive/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}' | \
http POST {{baseUrl}}/webhooks/:id/inactive/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/webhooks/:id/inactive/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": [],
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/inactive/")! 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
webhooks_list
{{baseUrl}}/webhooks/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/webhooks/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/webhooks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/webhooks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/webhooks/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/webhooks/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/webhooks/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/"))
.header("authorization", "{{apiKey}}")
.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}}/webhooks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/webhooks/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/webhooks/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/webhooks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/webhooks/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/webhooks/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/webhooks/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/webhooks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/webhooks/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/webhooks/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/webhooks/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/webhooks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/webhooks/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/webhooks/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/webhooks/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
webhooks_partial_update
{{baseUrl}}/webhooks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/webhooks/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:disable_message ""
:disabled_at ""
:document_events false
:failure_count 0
:headers {}
:id ""
:name ""
:notification_emails []
:review_events false
:shared_secret ""
:signature_events false
:state ""
:target ""
:task_events false
:updated_at ""
:url ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/webhooks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/");
var request = new RestRequest("", Method.Patch);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/webhooks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 412
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/webhooks/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/webhooks/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/webhooks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/',
method: 'PATCH',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.patch(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/webhooks/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/webhooks/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/';
const options = {
method: 'PATCH',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"disable_message": @"",
@"disabled_at": @"",
@"document_events": @NO,
@"failure_count": @0,
@"headers": @{ },
@"id": @"",
@"name": @"",
@"notification_emails": @[ ],
@"review_events": @NO,
@"shared_secret": @"",
@"signature_events": @NO,
@"state": @"",
@"target": @"",
@"task_events": @NO,
@"updated_at": @"",
@"url": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/webhooks/:id/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhooks/:id/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/webhooks/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": False,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": False,
"shared_secret": "",
"signature_events": False,
"state": "",
"target": "",
"task_events": False,
"updated_at": "",
"url": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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.patch('/baseUrl/webhooks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": json!({}),
"id": "",
"name": "",
"notification_emails": (),
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/webhooks/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}' | \
http PATCH {{baseUrl}}/webhooks/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/webhooks/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": [],
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
webhooks_retrieve
{{baseUrl}}/webhooks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/webhooks/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/webhooks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/webhooks/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/webhooks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/webhooks/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/webhooks/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/webhooks/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/webhooks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/webhooks/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/webhooks/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/webhooks/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/webhooks/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/webhooks/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/webhooks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhooks/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/webhooks/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/webhooks/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/webhooks/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
webhooks_update
{{baseUrl}}/webhooks/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhooks/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/webhooks/:id/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:activated_at ""
:created_at ""
:disable_message ""
:disabled_at ""
:document_events false
:failure_count 0
:headers {}
:id ""
:name ""
:notification_emails []
:review_events false
:shared_secret ""
:signature_events false
:state ""
:target ""
:task_events false
:updated_at ""
:url ""
:version ""}})
require "http/client"
url = "{{baseUrl}}/webhooks/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/");
var request = new RestRequest("", Method.Put);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhooks/:id/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/webhooks/:id/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 412
{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/webhooks/:id/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhooks/:id/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/webhooks/:id/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/webhooks/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhooks/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhooks/:id/',
method: 'PUT',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhooks/:id/")
.put(body)
.addHeader("authorization", "{{apiKey}}")
.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/webhooks/:id/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
},
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}}/webhooks/:id/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
});
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}}/webhooks/:id/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
activated_at: '',
created_at: '',
disable_message: '',
disabled_at: '',
document_events: false,
failure_count: 0,
headers: {},
id: '',
name: '',
notification_emails: [],
review_events: false,
shared_secret: '',
signature_events: false,
state: '',
target: '',
task_events: false,
updated_at: '',
url: '',
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhooks/:id/';
const options = {
method: 'PUT',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","activated_at":"","created_at":"","disable_message":"","disabled_at":"","document_events":false,"failure_count":0,"headers":{},"id":"","name":"","notification_emails":[],"review_events":false,"shared_secret":"","signature_events":false,"state":"","target":"","task_events":false,"updated_at":"","url":"","version":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"activated_at": @"",
@"created_at": @"",
@"disable_message": @"",
@"disabled_at": @"",
@"document_events": @NO,
@"failure_count": @0,
@"headers": @{ },
@"id": @"",
@"name": @"",
@"notification_emails": @[ ],
@"review_events": @NO,
@"shared_secret": @"",
@"signature_events": @NO,
@"state": @"",
@"target": @"",
@"task_events": @NO,
@"updated_at": @"",
@"url": @"",
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhooks/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhooks/:id/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhooks/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/webhooks/:id/', [
'body' => '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhooks/:id/');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'activated_at' => '',
'created_at' => '',
'disable_message' => '',
'disabled_at' => '',
'document_events' => null,
'failure_count' => 0,
'headers' => [
],
'id' => '',
'name' => '',
'notification_emails' => [
],
'review_events' => null,
'shared_secret' => '',
'signature_events' => null,
'state' => '',
'target' => '',
'task_events' => null,
'updated_at' => '',
'url' => '',
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhooks/:id/');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhooks/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhooks/:id/' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/webhooks/:id/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhooks/:id/"
payload = {
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": False,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": False,
"shared_secret": "",
"signature_events": False,
"state": "",
"target": "",
"task_events": False,
"updated_at": "",
"url": "",
"version": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhooks/:id/"
payload <- "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhooks/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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/webhooks/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"activated_at\": \"\",\n \"created_at\": \"\",\n \"disable_message\": \"\",\n \"disabled_at\": \"\",\n \"document_events\": false,\n \"failure_count\": 0,\n \"headers\": {},\n \"id\": \"\",\n \"name\": \"\",\n \"notification_emails\": [],\n \"review_events\": false,\n \"shared_secret\": \"\",\n \"signature_events\": false,\n \"state\": \"\",\n \"target\": \"\",\n \"task_events\": false,\n \"updated_at\": \"\",\n \"url\": \"\",\n \"version\": \"\"\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}}/webhooks/:id/";
let payload = json!({
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": json!({}),
"id": "",
"name": "",
"notification_emails": (),
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/webhooks/:id/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}'
echo '{
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": {},
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
}' | \
http PUT {{baseUrl}}/webhooks/:id/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "activated_at": "",\n "created_at": "",\n "disable_message": "",\n "disabled_at": "",\n "document_events": false,\n "failure_count": 0,\n "headers": {},\n "id": "",\n "name": "",\n "notification_emails": [],\n "review_events": false,\n "shared_secret": "",\n "signature_events": false,\n "state": "",\n "target": "",\n "task_events": false,\n "updated_at": "",\n "url": "",\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/webhooks/:id/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"activated_at": "",
"created_at": "",
"disable_message": "",
"disabled_at": "",
"document_events": false,
"failure_count": 0,
"headers": [],
"id": "",
"name": "",
"notification_emails": [],
"review_events": false,
"shared_secret": "",
"signature_events": false,
"state": "",
"target": "",
"task_events": false,
"updated_at": "",
"url": "",
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhooks/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
worker_features_list
{{baseUrl}}/worker_features/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/worker_features/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/worker_features/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/worker_features/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/worker_features/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/worker_features/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/worker_features/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/worker_features/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/worker_features/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/worker_features/"))
.header("authorization", "{{apiKey}}")
.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}}/worker_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/worker_features/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/worker_features/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/worker_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/worker_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/worker_features/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/worker_features/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/worker_features/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/worker_features/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/worker_features/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/worker_features/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/worker_features/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/worker_features/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/worker_features/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/worker_features/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/worker_features/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/worker_features/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/worker_features/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/worker_features/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/worker_features/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/worker_features/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/worker_features/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/worker_features/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/worker_features/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/worker_features/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/worker_features/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/worker_features/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/worker_features/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/worker_features/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/worker_features/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
worker_features_retrieve
{{baseUrl}}/worker_features/:user_id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
user_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/worker_features/:user_id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/worker_features/:user_id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/worker_features/:user_id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/worker_features/:user_id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/worker_features/:user_id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/worker_features/:user_id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/worker_features/:user_id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/worker_features/:user_id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/worker_features/:user_id/"))
.header("authorization", "{{apiKey}}")
.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}}/worker_features/:user_id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/worker_features/:user_id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/worker_features/:user_id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/worker_features/:user_id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/worker_features/:user_id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/worker_features/:user_id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/worker_features/:user_id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/worker_features/:user_id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/worker_features/:user_id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/worker_features/:user_id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/worker_features/:user_id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/worker_features/:user_id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/worker_features/:user_id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/worker_features/:user_id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/worker_features/:user_id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/worker_features/:user_id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/worker_features/:user_id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/worker_features/:user_id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/worker_features/:user_id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/worker_features/:user_id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/worker_features/:user_id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/worker_features/:user_id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/worker_features/:user_id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/worker_features/:user_id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/worker_features/:user_id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/worker_features/:user_id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/worker_features/:user_id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/worker_features/:user_id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/worker_features/:user_id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/worker_features/:user_id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
worker_tracks_list
{{baseUrl}}/worker_tracks/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/worker_tracks/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/worker_tracks/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/worker_tracks/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/worker_tracks/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/worker_tracks/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/worker_tracks/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/worker_tracks/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/worker_tracks/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/worker_tracks/"))
.header("authorization", "{{apiKey}}")
.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}}/worker_tracks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/worker_tracks/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/worker_tracks/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/worker_tracks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/worker_tracks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/worker_tracks/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/worker_tracks/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/worker_tracks/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/worker_tracks/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/worker_tracks/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/worker_tracks/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/worker_tracks/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/worker_tracks/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/worker_tracks/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/worker_tracks/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/worker_tracks/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/worker_tracks/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/worker_tracks/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/worker_tracks/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/worker_tracks/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/worker_tracks/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/worker_tracks/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/worker_tracks/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/worker_tracks/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/worker_tracks/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/worker_tracks/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/worker_tracks/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/worker_tracks/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/worker_tracks/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/worker_tracks/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
working_state_create
{{baseUrl}}/working_state/
HEADERS
Authorization
{{apiKey}}
BODY json
{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/working_state/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/working_state/" {:headers {:authorization "{{apiKey}}"}
:content-type :json
:form-params {:account ""
:account_role ""
:created_at ""
:mode ""
:status ""
:timestamp ""
:user ""}})
require "http/client"
url = "{{baseUrl}}/working_state/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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}}/working_state/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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}}/working_state/");
var request = new RestRequest("", Method.Post);
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/working_state/"
payload := strings.NewReader("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "{{apiKey}}")
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/working_state/ HTTP/1.1
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 124
{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/working_state/")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/working_state/"))
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/working_state/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/working_state/")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
.asString();
const data = JSON.stringify({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/working_state/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/working_state/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/working_state/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","account_role":"","created_at":"","mode":"","status":"","timestamp":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/working_state/',
method: 'POST',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": "",\n "account_role": "",\n "created_at": "",\n "mode": "",\n "status": "",\n "timestamp": "",\n "user": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/working_state/")
.post(body)
.addHeader("authorization", "{{apiKey}}")
.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/working_state/',
headers: {
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/working_state/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
},
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}}/working_state/');
req.headers({
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
});
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}}/working_state/',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
data: {
account: '',
account_role: '',
created_at: '',
mode: '',
status: '',
timestamp: '',
user: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/working_state/';
const options = {
method: 'POST',
headers: {authorization: '{{apiKey}}', 'content-type': 'application/json'},
body: '{"account":"","account_role":"","created_at":"","mode":"","status":"","timestamp":"","user":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account": @"",
@"account_role": @"",
@"created_at": @"",
@"mode": @"",
@"status": @"",
@"timestamp": @"",
@"user": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/working_state/"]
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}}/working_state/" in
let headers = Header.add_list (Header.init ()) [
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/working_state/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"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}}/working_state/', [
'body' => '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/working_state/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => '',
'account_role' => '',
'created_at' => '',
'mode' => '',
'status' => '',
'timestamp' => '',
'user' => ''
]));
$request->setRequestUrl('{{baseUrl}}/working_state/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/working_state/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/working_state/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
headers = {
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/working_state/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/working_state/"
payload = {
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}
headers = {
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/working_state/"
payload <- "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/working_state/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\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/working_state/') do |req|
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"account\": \"\",\n \"account_role\": \"\",\n \"created_at\": \"\",\n \"mode\": \"\",\n \"status\": \"\",\n \"timestamp\": \"\",\n \"user\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/working_state/";
let payload = json!({
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/working_state/ \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}'
echo '{
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
}' | \
http POST {{baseUrl}}/working_state/ \
authorization:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "account": "",\n "account_role": "",\n "created_at": "",\n "mode": "",\n "status": "",\n "timestamp": "",\n "user": ""\n}' \
--output-document \
- {{baseUrl}}/working_state/
import Foundation
let headers = [
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"account": "",
"account_role": "",
"created_at": "",
"mode": "",
"status": "",
"timestamp": "",
"user": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/working_state/")! 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
working_state_list
{{baseUrl}}/working_state/
HEADERS
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/working_state/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/working_state/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/working_state/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/working_state/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/working_state/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/working_state/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/working_state/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/working_state/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/working_state/"))
.header("authorization", "{{apiKey}}")
.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}}/working_state/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/working_state/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/working_state/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/working_state/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/working_state/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/working_state/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/working_state/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/working_state/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/working_state/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/working_state/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/working_state/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/working_state/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/working_state/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/working_state/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/working_state/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/working_state/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/working_state/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/working_state/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/working_state/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/working_state/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/working_state/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/working_state/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/working_state/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/working_state/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/working_state/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/working_state/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/working_state/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/working_state/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/working_state/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/working_state/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
working_state_retrieve
{{baseUrl}}/working_state/:id/
HEADERS
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/working_state/:id/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/working_state/:id/" {:headers {:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/working_state/:id/"
headers = HTTP::Headers{
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/working_state/:id/"),
Headers =
{
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/working_state/:id/");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/working_state/:id/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/working_state/:id/ HTTP/1.1
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/working_state/:id/")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/working_state/:id/"))
.header("authorization", "{{apiKey}}")
.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}}/working_state/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/working_state/:id/")
.header("authorization", "{{apiKey}}")
.asString();
const 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}}/working_state/:id/');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/working_state/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/working_state/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/working_state/:id/',
method: 'GET',
headers: {
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/working_state/:id/")
.get()
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/working_state/:id/',
headers: {
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.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}}/working_state/:id/',
headers: {authorization: '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/working_state/:id/');
req.headers({
authorization: '{{apiKey}}'
});
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}}/working_state/:id/',
headers: {authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/working_state/:id/';
const options = {method: 'GET', headers: {authorization: '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/working_state/:id/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/working_state/:id/" in
let headers = Header.add (Header.init ()) "authorization" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/working_state/:id/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/working_state/:id/', [
'headers' => [
'authorization' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/working_state/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/working_state/:id/');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/working_state/:id/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/working_state/:id/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "{{apiKey}}" }
conn.request("GET", "/baseUrl/working_state/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/working_state/:id/"
headers = {"authorization": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/working_state/:id/"
response <- VERB("GET", url, add_headers('authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/working_state/:id/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/working_state/:id/') do |req|
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/working_state/:id/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/working_state/:id/ \
--header 'authorization: {{apiKey}}'
http GET {{baseUrl}}/working_state/:id/ \
authorization:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/working_state/:id/
import Foundation
let headers = ["authorization": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/working_state/:id/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()