HRIS API
HRIS APIv9.3.0
Welcome to the HRIS API. You can use this API to access all HRIS API endpoints. Base URL The base URL for all API requests is https://unify.apideck.com We also provide a Mock API that can be used for testing purposes: https://mock-api.apideck.com Headers Custom headers that are expected as part of the request. Note that RFC7230 states header names are case insensitive. | Name | Type | Required | Description | | --------------------- | ------- | -------- |…
- Endpoints
- 27 (15 GET, 4 POST, 4 DELETE, 4 PATCH)
- Base URL
https://unify.apideck.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 9.3.0
- Provider
- apideck.com
- License
- Apache 2.0
- Categories
- Developer Tools
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://unify.apideck.com) and your API key credentials, then send requests.
POST
Create Company
{{baseUrl}}/hris/companies
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/companies");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/hris/companies" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:addresses [{:city ""
:contact_name ""
:country ""
:county ""
:email ""
:fax ""
:id ""
:latitude ""
:line1 ""
:line2 ""
:line3 ""
:line4 ""
:longitude ""
:name ""
:phone_number ""
:postal_code ""
:row_version ""
:salutation ""
:state ""
:street_number ""
:string ""
:type ""
:website ""}]
:company_number ""
:created_at ""
:created_by ""
:debtor_id ""
:deleted false
:display_name ""
:emails [{:email ""
:id ""
:type ""}]
:id ""
:legal_name ""
:phone_numbers [{:area_code ""
:country_code ""
:extension ""
:id ""
:number ""
:type ""}]
:status ""
:subdomain ""
:updated_at ""
:updated_by ""
:websites [{:id ""
:type ""
:url ""}]}})
require "http/client"
url = "{{baseUrl}}/hris/companies"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/hris/companies"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/hris/companies");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/companies"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/companies HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1077
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/hris/companies")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/companies"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/companies")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/hris/companies")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
id: '',
legal_name: '',
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [
{
id: '',
type: '',
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}}/hris/companies');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/companies';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_number":"","created_at":"","created_by":"","debtor_id":"","deleted":false,"display_name":"","emails":[{"email":"","id":"","type":""}],"id":"","legal_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","subdomain":"","updated_at":"","updated_by":"","websites":[{"id":"","type":"","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}}/hris/companies',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "company_number": "",\n "created_at": "",\n "created_by": "",\n "debtor_id": "",\n "deleted": false,\n "display_name": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "id": "",\n "legal_name": "",\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "status": "",\n "subdomain": "",\n "updated_at": "",\n "updated_by": "",\n "websites": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/companies")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', 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}}/hris/companies');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
id: '',
legal_name: '',
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [
{
id: '',
type: '',
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}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/companies';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_number":"","created_at":"","created_by":"","debtor_id":"","deleted":false,"display_name":"","emails":[{"email":"","id":"","type":""}],"id":"","legal_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","subdomain":"","updated_at":"","updated_by":"","websites":[{"id":"","type":"","url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
@"company_number": @"",
@"created_at": @"",
@"created_by": @"",
@"debtor_id": @"",
@"deleted": @NO,
@"display_name": @"",
@"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
@"id": @"",
@"legal_name": @"",
@"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
@"status": @"",
@"subdomain": @"",
@"updated_at": @"",
@"updated_by": @"",
@"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/companies"]
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}}/hris/companies" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/companies",
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([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/hris/companies', [
'body' => '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/companies');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/hris/companies');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/companies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/companies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/hris/companies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/companies"
payload = {
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": False,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/companies"
payload <- "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/hris/companies') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/companies";
let payload = json!({
"addresses": (
json!({
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
})
),
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": (
json!({
"email": "",
"id": "",
"type": ""
})
),
"id": "",
"legal_name": "",
"phone_numbers": (
json!({
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
})
),
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": (
json!({
"id": "",
"type": "",
"url": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/companies \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
echo '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}' | \
http POST {{baseUrl}}/hris/companies \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "company_number": "",\n "created_at": "",\n "created_by": "",\n "debtor_id": "",\n "deleted": false,\n "display_name": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "id": "",\n "legal_name": "",\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "status": "",\n "subdomain": "",\n "updated_at": "",\n "updated_by": "",\n "websites": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/hris/companies
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"addresses": [
[
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
]
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
[
"email": "",
"id": "",
"type": ""
]
],
"id": "",
"legal_name": "",
"phone_numbers": [
[
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
]
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
[
"id": "",
"type": "",
"url": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/companies")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Company
{{baseUrl}}/hris/companies/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/companies/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/companies/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/companies/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/companies/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/companies/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/companies/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/companies/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/hris/companies/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/companies/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/hris/companies/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/companies/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/companies/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/companies/: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}}/hris/companies/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/companies/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/hris/companies/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/companies/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/companies/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/companies/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/companies/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/hris/companies/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/companies/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/companies/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/companies/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/hris/companies/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
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}}/hris/companies/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/companies/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/hris/companies/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/companies/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/companies/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Company
{{baseUrl}}/hris/companies/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/companies/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/companies/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/companies/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/companies/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/companies/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/companies/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/companies/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/companies/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/companies/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/companies/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/companies/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/companies/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/companies/: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}}/hris/companies/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/companies/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/companies/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/companies/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/companies/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/companies/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/companies/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/companies/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/companies/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/companies/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/companies/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/companies/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/companies/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/companies/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/companies/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/companies/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/companies/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"company_number": "123456-AB",
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"debtor_id": "12345",
"deleted": false,
"display_name": "SpaceX",
"id": "12345",
"legal_name": "SpaceX",
"status": "active",
"subdomain": "company",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Companies
{{baseUrl}}/hris/companies
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/companies");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/companies" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/companies"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/companies"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/companies");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/companies HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/companies")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/companies"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/companies")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/companies');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/companies';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/companies")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/companies';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/companies"]
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}}/hris/companies" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/companies",
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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/companies', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/companies');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/companies');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/companies' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/companies' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/companies", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/companies"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/companies"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/companies') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/companies";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/companies \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/companies \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/companies
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/companies")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update Company
{{baseUrl}}/hris/companies/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/companies/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/hris/companies/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:addresses [{:city ""
:contact_name ""
:country ""
:county ""
:email ""
:fax ""
:id ""
:latitude ""
:line1 ""
:line2 ""
:line3 ""
:line4 ""
:longitude ""
:name ""
:phone_number ""
:postal_code ""
:row_version ""
:salutation ""
:state ""
:street_number ""
:string ""
:type ""
:website ""}]
:company_number ""
:created_at ""
:created_by ""
:debtor_id ""
:deleted false
:display_name ""
:emails [{:email ""
:id ""
:type ""}]
:id ""
:legal_name ""
:phone_numbers [{:area_code ""
:country_code ""
:extension ""
:id ""
:number ""
:type ""}]
:status ""
:subdomain ""
:updated_at ""
:updated_by ""
:websites [{:id ""
:type ""
:url ""}]}})
require "http/client"
url = "{{baseUrl}}/hris/companies/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\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}}/hris/companies/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/hris/companies/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/companies/:id"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/companies/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1077
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/hris/companies/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/companies/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/companies/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/hris/companies/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
id: '',
legal_name: '',
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [
{
id: '',
type: '',
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}}/hris/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/companies/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_number":"","created_at":"","created_by":"","debtor_id":"","deleted":false,"display_name":"","emails":[{"email":"","id":"","type":""}],"id":"","legal_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","subdomain":"","updated_at":"","updated_by":"","websites":[{"id":"","type":"","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}}/hris/companies/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "company_number": "",\n "created_at": "",\n "created_by": "",\n "debtor_id": "",\n "deleted": false,\n "display_name": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "id": "",\n "legal_name": "",\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "status": "",\n "subdomain": "",\n "updated_at": "",\n "updated_by": "",\n "websites": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/companies/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', 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}}/hris/companies/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
id: '',
legal_name: '',
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [
{
id: '',
type: '',
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}}/hris/companies/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
company_number: '',
created_at: '',
created_by: '',
debtor_id: '',
deleted: false,
display_name: '',
emails: [{email: '', id: '', type: ''}],
id: '',
legal_name: '',
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
status: '',
subdomain: '',
updated_at: '',
updated_by: '',
websites: [{id: '', type: '', url: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/companies/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_number":"","created_at":"","created_by":"","debtor_id":"","deleted":false,"display_name":"","emails":[{"email":"","id":"","type":""}],"id":"","legal_name":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","subdomain":"","updated_at":"","updated_by":"","websites":[{"id":"","type":"","url":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
@"company_number": @"",
@"created_at": @"",
@"created_by": @"",
@"debtor_id": @"",
@"deleted": @NO,
@"display_name": @"",
@"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
@"id": @"",
@"legal_name": @"",
@"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
@"status": @"",
@"subdomain": @"",
@"updated_at": @"",
@"updated_by": @"",
@"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/companies/: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}}/hris/companies/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/companies/: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([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/hris/companies/:id', [
'body' => '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/companies/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'company_number' => '',
'created_at' => '',
'created_by' => '',
'debtor_id' => '',
'deleted' => null,
'display_name' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'id' => '',
'legal_name' => '',
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'status' => '',
'subdomain' => '',
'updated_at' => '',
'updated_by' => '',
'websites' => [
[
'id' => '',
'type' => '',
'url' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/hris/companies/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/companies/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/companies/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/hris/companies/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/companies/:id"
payload = {
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": False,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/companies/:id"
payload <- "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/companies/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/hris/companies/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"company_number\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"debtor_id\": \"\",\n \"deleted\": false,\n \"display_name\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"id\": \"\",\n \"legal_name\": \"\",\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"status\": \"\",\n \"subdomain\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"websites\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/companies/:id";
let payload = json!({
"addresses": (
json!({
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
})
),
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": (
json!({
"email": "",
"id": "",
"type": ""
})
),
"id": "",
"legal_name": "",
"phone_numbers": (
json!({
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
})
),
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": (
json!({
"id": "",
"type": "",
"url": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/companies/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}'
echo '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"id": "",
"legal_name": "",
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
{
"id": "",
"type": "",
"url": ""
}
]
}' | \
http PATCH {{baseUrl}}/hris/companies/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "company_number": "",\n "created_at": "",\n "created_by": "",\n "debtor_id": "",\n "deleted": false,\n "display_name": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "id": "",\n "legal_name": "",\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "status": "",\n "subdomain": "",\n "updated_at": "",\n "updated_by": "",\n "websites": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/hris/companies/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"addresses": [
[
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
]
],
"company_number": "",
"created_at": "",
"created_by": "",
"debtor_id": "",
"deleted": false,
"display_name": "",
"emails": [
[
"email": "",
"id": "",
"type": ""
]
],
"id": "",
"legal_name": "",
"phone_numbers": [
[
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
]
],
"status": "",
"subdomain": "",
"updated_at": "",
"updated_by": "",
"websites": [
[
"id": "",
"type": "",
"url": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/companies/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Create Department
{{baseUrl}}/hris/departments
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/departments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/hris/departments" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:code ""
:created_at ""
:created_by ""
:description ""
:id ""
:name ""
:parent_id ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/hris/departments"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/departments"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/departments");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/departments"
payload := strings.NewReader("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/departments HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 162
{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/hris/departments")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/departments"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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 \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/departments")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/hris/departments")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/hris/departments');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/departments';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"code":"","created_at":"","created_by":"","description":"","id":"","name":"","parent_id":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/hris/departments',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "code": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "parent_id": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/departments")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
},
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}}/hris/departments');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
});
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}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/departments';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"code":"","created_at":"","created_by":"","description":"","id":"","name":"","parent_id":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"code": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"id": @"",
@"name": @"",
@"parent_id": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/departments"]
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}}/hris/departments" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/departments",
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([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/hris/departments', [
'body' => '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/departments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/hris/departments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/departments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/departments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/hris/departments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/departments"
payload = {
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/departments"
payload <- "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/departments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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/hris/departments') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/departments";
let payload = json!({
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/departments \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}' | \
http POST {{baseUrl}}/hris/departments \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "code": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "parent_id": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/hris/departments
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/departments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Departments",
"service": "workday",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Department
{{baseUrl}}/hris/departments/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/departments/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/departments/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/departments/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/departments/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/departments/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/departments/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/departments/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/hris/departments/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/departments/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/hris/departments/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/departments/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/departments/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/departments/: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}}/hris/departments/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/departments/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/hris/departments/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/departments/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/departments/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/departments/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/departments/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/hris/departments/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/departments/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/departments/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/departments/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/hris/departments/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
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}}/hris/departments/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/departments/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/hris/departments/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/departments/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/departments/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Departments",
"service": "workday",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Department
{{baseUrl}}/hris/departments/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/departments/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/departments/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/departments/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/departments/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/departments/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/departments/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/departments/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/departments/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/departments/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/departments/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/departments/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/departments/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/departments/: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}}/hris/departments/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/departments/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/departments/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/departments/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/departments/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/departments/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/departments/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/departments/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/departments/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/departments/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/departments/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/departments/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/departments/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/departments/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/departments/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/departments/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/departments/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"code": "2",
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "R&D",
"id": "12345",
"name": "R&D",
"parent_id": "22345",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "Departments",
"service": "workday",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Departments
{{baseUrl}}/hris/departments
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/departments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/departments" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/departments"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/departments"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/departments");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/departments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/departments HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/departments")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/departments"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/departments")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/departments');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/departments';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/departments")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/departments';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/departments"]
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}}/hris/departments" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/departments",
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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/departments', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/departments');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/departments');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/departments' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/departments' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/departments", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/departments"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/departments"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/departments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/departments') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/departments";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/departments \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/departments \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/departments
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/departments")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "Departments",
"service": "workday",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update Department
{{baseUrl}}/hris/departments/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/departments/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/hris/departments/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:code ""
:created_at ""
:created_by ""
:description ""
:id ""
:name ""
:parent_id ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/hris/departments/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/departments/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/departments/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/departments/:id"
payload := strings.NewReader("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/departments/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 162
{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/hris/departments/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/departments/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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 \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/departments/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/hris/departments/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/hris/departments/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/departments/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"code":"","created_at":"","created_by":"","description":"","id":"","name":"","parent_id":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/hris/departments/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "code": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "parent_id": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/departments/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
},
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}}/hris/departments/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
});
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}}/hris/departments/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
code: '',
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
parent_id: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/departments/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"code":"","created_at":"","created_by":"","description":"","id":"","name":"","parent_id":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"code": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"id": @"",
@"name": @"",
@"parent_id": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/departments/: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}}/hris/departments/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/departments/: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([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/hris/departments/:id', [
'body' => '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/departments/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'code' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'parent_id' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/hris/departments/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/departments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/departments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/hris/departments/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/departments/:id"
payload = {
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/departments/:id"
payload <- "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/departments/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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/hris/departments/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"code\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_id\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/departments/:id";
let payload = json!({
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/departments/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
}' | \
http PATCH {{baseUrl}}/hris/departments/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "code": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "parent_id": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/hris/departments/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"code": "",
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"parent_id": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/departments/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Departments",
"service": "workday",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Employee Payroll
{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
payroll_id
employee_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/payrolls/employees/:employee_id/payrolls/:payroll_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/payrolls/employees/:employee_id/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/payrolls/employees/:employee_id/payrolls/:payroll_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/payrolls/employees/:employee_id/payrolls/:payroll_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/payrolls/employees/:employee_id/payrolls/:payroll_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"operation": "one",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Employee Payrolls
{{baseUrl}}/hris/payrolls/employees/:employee_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
employee_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/payrolls/employees/:employee_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/payrolls/employees/:employee_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/payrolls/employees/:employee_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/payrolls/employees/:employee_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/payrolls/employees/:employee_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/payrolls/employees/:employee_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/payrolls/employees/:employee_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/payrolls/employees/:employee_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/payrolls/employees/:employee_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/payrolls/employees/:employee_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/employees/:employee_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/payrolls/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/payrolls/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/payrolls/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/payrolls/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/payrolls/employees/:employee_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}}/hris/payrolls/employees/:employee_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/payrolls/employees/:employee_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/payrolls/employees/:employee_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/payrolls/employees/:employee_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/payrolls/employees/:employee_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/payrolls/employees/:employee_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/payrolls/employees/:employee_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/payrolls/employees/:employee_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/payrolls/employees/:employee_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/payrolls/employees/:employee_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/payrolls/employees/:employee_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/payrolls/employees/:employee_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/payrolls/employees/:employee_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/payrolls/employees/:employee_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/payrolls/employees/:employee_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/payrolls/employees/:employee_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/payrolls/employees/:employee_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"operation": "all",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Employee Schedules
{{baseUrl}}/hris/schedules/employees/:employee_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
employee_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/schedules/employees/:employee_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/schedules/employees/:employee_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/schedules/employees/:employee_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/schedules/employees/:employee_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/schedules/employees/:employee_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/schedules/employees/:employee_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/schedules/employees/:employee_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/schedules/employees/:employee_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/schedules/employees/:employee_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/schedules/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/schedules/employees/:employee_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/schedules/employees/:employee_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/schedules/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/schedules/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/schedules/employees/:employee_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/schedules/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/schedules/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/schedules/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/schedules/employees/:employee_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/schedules/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/schedules/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/schedules/employees/:employee_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}}/hris/schedules/employees/:employee_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/schedules/employees/:employee_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/schedules/employees/:employee_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/schedules/employees/:employee_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/schedules/employees/:employee_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/schedules/employees/:employee_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/schedules/employees/:employee_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/schedules/employees/:employee_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/schedules/employees/:employee_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/schedules/employees/:employee_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/schedules/employees/:employee_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/schedules/employees/:employee_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/schedules/employees/:employee_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/schedules/employees/:employee_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/schedules/employees/:employee_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/schedules/employees/:employee_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/schedules/employees/:employee_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"operation": "all",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Create Employee
{{baseUrl}}/hris/employees
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/employees");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/hris/employees" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:addresses [{:city ""
:contact_name ""
:country ""
:county ""
:email ""
:fax ""
:id ""
:latitude ""
:line1 ""
:line2 ""
:line3 ""
:line4 ""
:longitude ""
:name ""
:phone_number ""
:postal_code ""
:row_version ""
:salutation ""
:state ""
:street_number ""
:string ""
:type ""
:website ""}]
:birthday ""
:company_id ""
:company_name ""
:compensations [{:currency ""
:effective_date ""
:flsa_status ""
:id ""
:job_id ""
:payment_unit ""
:rate ""}]
:country_of_birth ""
:created_at ""
:created_by ""
:custom_fields [{:description ""
:id ""
:name ""
:value ""}]
:deceased_on ""
:deleted false
:department ""
:department_id ""
:department_name ""
:description ""
:dietary_preference ""
:direct_reports []
:display_name ""
:division ""
:division_id ""
:emails [{:email ""
:id ""
:type ""}]
:employee_number ""
:employment_end_date ""
:employment_role {:sub_type ""
:type ""}
:employment_start_date ""
:employment_status ""
:first_name ""
:food_allergies []
:gender ""
:id ""
:initials ""
:jobs [{:compensation_rate ""
:currency ""
:employee_id ""
:end_date ""
:hired_at ""
:id ""
:is_primary false
:location {}
:payment_unit ""
:role ""
:start_date ""
:title ""}]
:languages []
:last_name ""
:leaving_reason ""
:manager {:email ""
:employment_status ""
:first_name ""
:id ""
:last_name ""
:name ""}
:marital_status ""
:middle_name ""
:nationalities []
:partner {:birthday ""
:deceased_on ""
:first_name ""
:gender ""
:id ""
:initials ""
:last_name ""
:middle_name ""}
:phone_numbers [{:area_code ""
:country_code ""
:extension ""
:id ""
:number ""
:type ""}]
:photo_url ""
:preferred_language ""
:preferred_name ""
:pronouns ""
:record_url ""
:row_version ""
:salutation ""
:social_links [{:id ""
:type ""
:url ""}]
:social_security_number ""
:source ""
:source_id ""
:tags []
:tax_code ""
:tax_id ""
:team {:id ""
:name ""}
:timezone ""
:title ""
:updated_at ""
:updated_by ""
:works_remote false}})
require "http/client"
url = "{{baseUrl}}/hris/employees"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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}}/hris/employees"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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}}/hris/employees");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/employees"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/employees HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 2949
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/hris/employees")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/employees"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/employees")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/hris/employees")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
.asString();
const data = JSON.stringify({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [
{
description: '',
id: '',
name: '',
value: ''
}
],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
employee_number: '',
employment_end_date: '',
employment_role: {
sub_type: '',
type: ''
},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [
{
id: '',
type: '',
url: ''
}
],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {
id: '',
name: ''
},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/employees';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","compensations":[{"currency":"","effective_date":"","flsa_status":"","id":"","job_id":"","payment_unit":"","rate":""}],"country_of_birth":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deceased_on":"","deleted":false,"department":"","department_id":"","department_name":"","description":"","dietary_preference":"","direct_reports":[],"display_name":"","division":"","division_id":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","employment_end_date":"","employment_role":{"sub_type":"","type":""},"employment_start_date":"","employment_status":"","first_name":"","food_allergies":[],"gender":"","id":"","initials":"","jobs":[{"compensation_rate":"","currency":"","employee_id":"","end_date":"","hired_at":"","id":"","is_primary":false,"location":{},"payment_unit":"","role":"","start_date":"","title":""}],"languages":[],"last_name":"","leaving_reason":"","manager":{"email":"","employment_status":"","first_name":"","id":"","last_name":"","name":""},"marital_status":"","middle_name":"","nationalities":[],"partner":{"birthday":"","deceased_on":"","first_name":"","gender":"","id":"","initials":"","last_name":"","middle_name":""},"phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","preferred_language":"","preferred_name":"","pronouns":"","record_url":"","row_version":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"social_security_number":"","source":"","source_id":"","tags":[],"tax_code":"","tax_id":"","team":{"id":"","name":""},"timezone":"","title":"","updated_at":"","updated_by":"","works_remote":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}}/hris/employees',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "birthday": "",\n "company_id": "",\n "company_name": "",\n "compensations": [\n {\n "currency": "",\n "effective_date": "",\n "flsa_status": "",\n "id": "",\n "job_id": "",\n "payment_unit": "",\n "rate": ""\n }\n ],\n "country_of_birth": "",\n "created_at": "",\n "created_by": "",\n "custom_fields": [\n {\n "description": "",\n "id": "",\n "name": "",\n "value": ""\n }\n ],\n "deceased_on": "",\n "deleted": false,\n "department": "",\n "department_id": "",\n "department_name": "",\n "description": "",\n "dietary_preference": "",\n "direct_reports": [],\n "display_name": "",\n "division": "",\n "division_id": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "employee_number": "",\n "employment_end_date": "",\n "employment_role": {\n "sub_type": "",\n "type": ""\n },\n "employment_start_date": "",\n "employment_status": "",\n "first_name": "",\n "food_allergies": [],\n "gender": "",\n "id": "",\n "initials": "",\n "jobs": [\n {\n "compensation_rate": "",\n "currency": "",\n "employee_id": "",\n "end_date": "",\n "hired_at": "",\n "id": "",\n "is_primary": false,\n "location": {},\n "payment_unit": "",\n "role": "",\n "start_date": "",\n "title": ""\n }\n ],\n "languages": [],\n "last_name": "",\n "leaving_reason": "",\n "manager": {\n "email": "",\n "employment_status": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "name": ""\n },\n "marital_status": "",\n "middle_name": "",\n "nationalities": [],\n "partner": {\n "birthday": "",\n "deceased_on": "",\n "first_name": "",\n "gender": "",\n "id": "",\n "initials": "",\n "last_name": "",\n "middle_name": ""\n },\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "photo_url": "",\n "preferred_language": "",\n "preferred_name": "",\n "pronouns": "",\n "record_url": "",\n "row_version": "",\n "salutation": "",\n "social_links": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ],\n "social_security_number": "",\n "source": "",\n "source_id": "",\n "tags": [],\n "tax_code": "",\n "tax_id": "",\n "team": {\n "id": "",\n "name": ""\n },\n "timezone": "",\n "title": "",\n "updated_at": "",\n "updated_by": "",\n "works_remote": 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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/employees")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [
{
description: '',
id: '',
name: '',
value: ''
}
],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
employee_number: '',
employment_end_date: '',
employment_role: {
sub_type: '',
type: ''
},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [
{
id: '',
type: '',
url: ''
}
],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {
id: '',
name: ''
},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/employees';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","compensations":[{"currency":"","effective_date":"","flsa_status":"","id":"","job_id":"","payment_unit":"","rate":""}],"country_of_birth":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deceased_on":"","deleted":false,"department":"","department_id":"","department_name":"","description":"","dietary_preference":"","direct_reports":[],"display_name":"","division":"","division_id":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","employment_end_date":"","employment_role":{"sub_type":"","type":""},"employment_start_date":"","employment_status":"","first_name":"","food_allergies":[],"gender":"","id":"","initials":"","jobs":[{"compensation_rate":"","currency":"","employee_id":"","end_date":"","hired_at":"","id":"","is_primary":false,"location":{},"payment_unit":"","role":"","start_date":"","title":""}],"languages":[],"last_name":"","leaving_reason":"","manager":{"email":"","employment_status":"","first_name":"","id":"","last_name":"","name":""},"marital_status":"","middle_name":"","nationalities":[],"partner":{"birthday":"","deceased_on":"","first_name":"","gender":"","id":"","initials":"","last_name":"","middle_name":""},"phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","preferred_language":"","preferred_name":"","pronouns":"","record_url":"","row_version":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"social_security_number":"","source":"","source_id":"","tags":[],"tax_code":"","tax_id":"","team":{"id":"","name":""},"timezone":"","title":"","updated_at":"","updated_by":"","works_remote":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
@"birthday": @"",
@"company_id": @"",
@"company_name": @"",
@"compensations": @[ @{ @"currency": @"", @"effective_date": @"", @"flsa_status": @"", @"id": @"", @"job_id": @"", @"payment_unit": @"", @"rate": @"" } ],
@"country_of_birth": @"",
@"created_at": @"",
@"created_by": @"",
@"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
@"deceased_on": @"",
@"deleted": @NO,
@"department": @"",
@"department_id": @"",
@"department_name": @"",
@"description": @"",
@"dietary_preference": @"",
@"direct_reports": @[ ],
@"display_name": @"",
@"division": @"",
@"division_id": @"",
@"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
@"employee_number": @"",
@"employment_end_date": @"",
@"employment_role": @{ @"sub_type": @"", @"type": @"" },
@"employment_start_date": @"",
@"employment_status": @"",
@"first_name": @"",
@"food_allergies": @[ ],
@"gender": @"",
@"id": @"",
@"initials": @"",
@"jobs": @[ @{ @"compensation_rate": @"", @"currency": @"", @"employee_id": @"", @"end_date": @"", @"hired_at": @"", @"id": @"", @"is_primary": @NO, @"location": @{ }, @"payment_unit": @"", @"role": @"", @"start_date": @"", @"title": @"" } ],
@"languages": @[ ],
@"last_name": @"",
@"leaving_reason": @"",
@"manager": @{ @"email": @"", @"employment_status": @"", @"first_name": @"", @"id": @"", @"last_name": @"", @"name": @"" },
@"marital_status": @"",
@"middle_name": @"",
@"nationalities": @[ ],
@"partner": @{ @"birthday": @"", @"deceased_on": @"", @"first_name": @"", @"gender": @"", @"id": @"", @"initials": @"", @"last_name": @"", @"middle_name": @"" },
@"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
@"photo_url": @"",
@"preferred_language": @"",
@"preferred_name": @"",
@"pronouns": @"",
@"record_url": @"",
@"row_version": @"",
@"salutation": @"",
@"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
@"social_security_number": @"",
@"source": @"",
@"source_id": @"",
@"tags": @[ ],
@"tax_code": @"",
@"tax_id": @"",
@"team": @{ @"id": @"", @"name": @"" },
@"timezone": @"",
@"title": @"",
@"updated_at": @"",
@"updated_by": @"",
@"works_remote": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/employees"]
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}}/hris/employees" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/employees",
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([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/hris/employees', [
'body' => '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/employees');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]));
$request->setRequestUrl('{{baseUrl}}/hris/employees');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/employees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/employees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/hris/employees", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/employees"
payload = {
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": False,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": False,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": False
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/employees"
payload <- "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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/hris/employees') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/employees";
let payload = json!({
"addresses": (
json!({
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
})
),
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": (
json!({
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
})
),
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": (
json!({
"description": "",
"id": "",
"name": "",
"value": ""
})
),
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": (),
"display_name": "",
"division": "",
"division_id": "",
"emails": (
json!({
"email": "",
"id": "",
"type": ""
})
),
"employee_number": "",
"employment_end_date": "",
"employment_role": json!({
"sub_type": "",
"type": ""
}),
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": (),
"gender": "",
"id": "",
"initials": "",
"jobs": (
json!({
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": json!({}),
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
})
),
"languages": (),
"last_name": "",
"leaving_reason": "",
"manager": json!({
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
}),
"marital_status": "",
"middle_name": "",
"nationalities": (),
"partner": json!({
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
}),
"phone_numbers": (
json!({
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
})
),
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": (
json!({
"id": "",
"type": "",
"url": ""
})
),
"social_security_number": "",
"source": "",
"source_id": "",
"tags": (),
"tax_code": "",
"tax_id": "",
"team": json!({
"id": "",
"name": ""
}),
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/employees \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
echo '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}' | \
http POST {{baseUrl}}/hris/employees \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "birthday": "",\n "company_id": "",\n "company_name": "",\n "compensations": [\n {\n "currency": "",\n "effective_date": "",\n "flsa_status": "",\n "id": "",\n "job_id": "",\n "payment_unit": "",\n "rate": ""\n }\n ],\n "country_of_birth": "",\n "created_at": "",\n "created_by": "",\n "custom_fields": [\n {\n "description": "",\n "id": "",\n "name": "",\n "value": ""\n }\n ],\n "deceased_on": "",\n "deleted": false,\n "department": "",\n "department_id": "",\n "department_name": "",\n "description": "",\n "dietary_preference": "",\n "direct_reports": [],\n "display_name": "",\n "division": "",\n "division_id": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "employee_number": "",\n "employment_end_date": "",\n "employment_role": {\n "sub_type": "",\n "type": ""\n },\n "employment_start_date": "",\n "employment_status": "",\n "first_name": "",\n "food_allergies": [],\n "gender": "",\n "id": "",\n "initials": "",\n "jobs": [\n {\n "compensation_rate": "",\n "currency": "",\n "employee_id": "",\n "end_date": "",\n "hired_at": "",\n "id": "",\n "is_primary": false,\n "location": {},\n "payment_unit": "",\n "role": "",\n "start_date": "",\n "title": ""\n }\n ],\n "languages": [],\n "last_name": "",\n "leaving_reason": "",\n "manager": {\n "email": "",\n "employment_status": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "name": ""\n },\n "marital_status": "",\n "middle_name": "",\n "nationalities": [],\n "partner": {\n "birthday": "",\n "deceased_on": "",\n "first_name": "",\n "gender": "",\n "id": "",\n "initials": "",\n "last_name": "",\n "middle_name": ""\n },\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "photo_url": "",\n "preferred_language": "",\n "preferred_name": "",\n "pronouns": "",\n "record_url": "",\n "row_version": "",\n "salutation": "",\n "social_links": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ],\n "social_security_number": "",\n "source": "",\n "source_id": "",\n "tags": [],\n "tax_code": "",\n "tax_id": "",\n "team": {\n "id": "",\n "name": ""\n },\n "timezone": "",\n "title": "",\n "updated_at": "",\n "updated_by": "",\n "works_remote": false\n}' \
--output-document \
- {{baseUrl}}/hris/employees
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"addresses": [
[
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
]
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
[
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
]
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
[
"description": "",
"id": "",
"name": "",
"value": ""
]
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
[
"email": "",
"id": "",
"type": ""
]
],
"employee_number": "",
"employment_end_date": "",
"employment_role": [
"sub_type": "",
"type": ""
],
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
[
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": [],
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
]
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": [
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
],
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": [
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
],
"phone_numbers": [
[
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
]
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
[
"id": "",
"type": "",
"url": ""
]
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": [
"id": "",
"name": ""
],
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/employees")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Employee
{{baseUrl}}/hris/employees/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/employees/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/employees/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/employees/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/employees/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/employees/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/employees/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/employees/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/hris/employees/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/employees/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/hris/employees/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/employees/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/employees/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/employees/: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}}/hris/employees/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/employees/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/hris/employees/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/employees/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/employees/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/employees/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/employees/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/hris/employees/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/employees/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/employees/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/employees/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/hris/employees/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
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}}/hris/employees/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/employees/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/hris/employees/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/employees/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/employees/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Employee
{{baseUrl}}/hris/employees/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/employees/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/employees/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/employees/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/employees/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/employees/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/employees/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/employees/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/employees/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/employees/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/employees/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/employees/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/employees/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/employees/: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}}/hris/employees/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/employees/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/employees/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/employees/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/employees/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/employees/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/employees/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/employees/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/employees/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/employees/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/employees/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/employees/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/employees/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/employees/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/employees/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/employees/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/employees/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"birthday": "2000-08-12",
"company_id": "23456",
"company_name": "SpaceX",
"country_of_birth": "US",
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"deceased_on": "2000-08-12",
"deleted": true,
"department": "R&D",
"department_id": "12345",
"department_name": "12345",
"description": "A description",
"dietary_preference": "Veggie",
"direct_reports": [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
],
"display_name": "Technoking",
"division": "Europe",
"division_id": "12345",
"employee_number": "123456-AB",
"employment_end_date": "2028-10-26",
"employment_start_date": "2021-10-26",
"employment_status": "active",
"first_name": "Elon",
"food_allergies": [
"No allergies"
],
"gender": "male",
"id": "12345",
"initials": "EM",
"last_name": "Musk",
"leaving_reason": "resigned",
"marital_status": "married",
"middle_name": "D.",
"photo_url": "https://unavatar.io/elon-musk",
"preferred_language": "EN",
"preferred_name": "Elon Musk",
"pronouns": "she,her",
"record_url": "https://app.intercom.io/contacts/12345",
"row_version": "1-12345",
"salutation": "Mr",
"social_security_number": "123456789",
"source": "lever",
"source_id": "12345",
"tags": [
"New"
],
"tax_code": "1111",
"tax_id": "234-32-0000",
"timezone": "Europe/London",
"title": "CEO",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345",
"works_remote": true
},
"operation": "one",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Employees
{{baseUrl}}/hris/employees
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/employees");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/employees" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/employees"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/employees"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/employees");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/employees"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/employees HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/employees")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/employees"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/employees")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/employees');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/employees';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/employees")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/employees';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/employees"]
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}}/hris/employees" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/employees",
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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/employees', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/employees');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/employees');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/employees' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/employees' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/employees", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/employees"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/employees"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/employees') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/employees";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/employees \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/employees \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/employees
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/employees")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update Employee
{{baseUrl}}/hris/employees/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/employees/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/hris/employees/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:addresses [{:city ""
:contact_name ""
:country ""
:county ""
:email ""
:fax ""
:id ""
:latitude ""
:line1 ""
:line2 ""
:line3 ""
:line4 ""
:longitude ""
:name ""
:phone_number ""
:postal_code ""
:row_version ""
:salutation ""
:state ""
:street_number ""
:string ""
:type ""
:website ""}]
:birthday ""
:company_id ""
:company_name ""
:compensations [{:currency ""
:effective_date ""
:flsa_status ""
:id ""
:job_id ""
:payment_unit ""
:rate ""}]
:country_of_birth ""
:created_at ""
:created_by ""
:custom_fields [{:description ""
:id ""
:name ""
:value ""}]
:deceased_on ""
:deleted false
:department ""
:department_id ""
:department_name ""
:description ""
:dietary_preference ""
:direct_reports []
:display_name ""
:division ""
:division_id ""
:emails [{:email ""
:id ""
:type ""}]
:employee_number ""
:employment_end_date ""
:employment_role {:sub_type ""
:type ""}
:employment_start_date ""
:employment_status ""
:first_name ""
:food_allergies []
:gender ""
:id ""
:initials ""
:jobs [{:compensation_rate ""
:currency ""
:employee_id ""
:end_date ""
:hired_at ""
:id ""
:is_primary false
:location {}
:payment_unit ""
:role ""
:start_date ""
:title ""}]
:languages []
:last_name ""
:leaving_reason ""
:manager {:email ""
:employment_status ""
:first_name ""
:id ""
:last_name ""
:name ""}
:marital_status ""
:middle_name ""
:nationalities []
:partner {:birthday ""
:deceased_on ""
:first_name ""
:gender ""
:id ""
:initials ""
:last_name ""
:middle_name ""}
:phone_numbers [{:area_code ""
:country_code ""
:extension ""
:id ""
:number ""
:type ""}]
:photo_url ""
:preferred_language ""
:preferred_name ""
:pronouns ""
:record_url ""
:row_version ""
:salutation ""
:social_links [{:id ""
:type ""
:url ""}]
:social_security_number ""
:source ""
:source_id ""
:tags []
:tax_code ""
:tax_id ""
:team {:id ""
:name ""}
:timezone ""
:title ""
:updated_at ""
:updated_by ""
:works_remote false}})
require "http/client"
url = "{{baseUrl}}/hris/employees/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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}}/hris/employees/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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}}/hris/employees/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/employees/:id"
payload := strings.NewReader("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/employees/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 2949
{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/hris/employees/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/employees/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/employees/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/hris/employees/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
.asString();
const data = JSON.stringify({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [
{
description: '',
id: '',
name: '',
value: ''
}
],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
employee_number: '',
employment_end_date: '',
employment_role: {
sub_type: '',
type: ''
},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [
{
id: '',
type: '',
url: ''
}
],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {
id: '',
name: ''
},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/employees/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","compensations":[{"currency":"","effective_date":"","flsa_status":"","id":"","job_id":"","payment_unit":"","rate":""}],"country_of_birth":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deceased_on":"","deleted":false,"department":"","department_id":"","department_name":"","description":"","dietary_preference":"","direct_reports":[],"display_name":"","division":"","division_id":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","employment_end_date":"","employment_role":{"sub_type":"","type":""},"employment_start_date":"","employment_status":"","first_name":"","food_allergies":[],"gender":"","id":"","initials":"","jobs":[{"compensation_rate":"","currency":"","employee_id":"","end_date":"","hired_at":"","id":"","is_primary":false,"location":{},"payment_unit":"","role":"","start_date":"","title":""}],"languages":[],"last_name":"","leaving_reason":"","manager":{"email":"","employment_status":"","first_name":"","id":"","last_name":"","name":""},"marital_status":"","middle_name":"","nationalities":[],"partner":{"birthday":"","deceased_on":"","first_name":"","gender":"","id":"","initials":"","last_name":"","middle_name":""},"phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","preferred_language":"","preferred_name":"","pronouns":"","record_url":"","row_version":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"social_security_number":"","source":"","source_id":"","tags":[],"tax_code":"","tax_id":"","team":{"id":"","name":""},"timezone":"","title":"","updated_at":"","updated_by":"","works_remote":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}}/hris/employees/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "birthday": "",\n "company_id": "",\n "company_name": "",\n "compensations": [\n {\n "currency": "",\n "effective_date": "",\n "flsa_status": "",\n "id": "",\n "job_id": "",\n "payment_unit": "",\n "rate": ""\n }\n ],\n "country_of_birth": "",\n "created_at": "",\n "created_by": "",\n "custom_fields": [\n {\n "description": "",\n "id": "",\n "name": "",\n "value": ""\n }\n ],\n "deceased_on": "",\n "deleted": false,\n "department": "",\n "department_id": "",\n "department_name": "",\n "description": "",\n "dietary_preference": "",\n "direct_reports": [],\n "display_name": "",\n "division": "",\n "division_id": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "employee_number": "",\n "employment_end_date": "",\n "employment_role": {\n "sub_type": "",\n "type": ""\n },\n "employment_start_date": "",\n "employment_status": "",\n "first_name": "",\n "food_allergies": [],\n "gender": "",\n "id": "",\n "initials": "",\n "jobs": [\n {\n "compensation_rate": "",\n "currency": "",\n "employee_id": "",\n "end_date": "",\n "hired_at": "",\n "id": "",\n "is_primary": false,\n "location": {},\n "payment_unit": "",\n "role": "",\n "start_date": "",\n "title": ""\n }\n ],\n "languages": [],\n "last_name": "",\n "leaving_reason": "",\n "manager": {\n "email": "",\n "employment_status": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "name": ""\n },\n "marital_status": "",\n "middle_name": "",\n "nationalities": [],\n "partner": {\n "birthday": "",\n "deceased_on": "",\n "first_name": "",\n "gender": "",\n "id": "",\n "initials": "",\n "last_name": "",\n "middle_name": ""\n },\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "photo_url": "",\n "preferred_language": "",\n "preferred_name": "",\n "pronouns": "",\n "record_url": "",\n "row_version": "",\n "salutation": "",\n "social_links": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ],\n "social_security_number": "",\n "source": "",\n "source_id": "",\n "tags": [],\n "tax_code": "",\n "tax_id": "",\n "team": {\n "id": "",\n "name": ""\n },\n "timezone": "",\n "title": "",\n "updated_at": "",\n "updated_by": "",\n "works_remote": 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 \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/employees/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [
{
description: '',
id: '',
name: '',
value: ''
}
],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [
{
email: '',
id: '',
type: ''
}
],
employee_number: '',
employment_end_date: '',
employment_role: {
sub_type: '',
type: ''
},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [
{
area_code: '',
country_code: '',
extension: '',
id: '',
number: '',
type: ''
}
],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [
{
id: '',
type: '',
url: ''
}
],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {
id: '',
name: ''
},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: 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}}/hris/employees/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
addresses: [
{
city: '',
contact_name: '',
country: '',
county: '',
email: '',
fax: '',
id: '',
latitude: '',
line1: '',
line2: '',
line3: '',
line4: '',
longitude: '',
name: '',
phone_number: '',
postal_code: '',
row_version: '',
salutation: '',
state: '',
street_number: '',
string: '',
type: '',
website: ''
}
],
birthday: '',
company_id: '',
company_name: '',
compensations: [
{
currency: '',
effective_date: '',
flsa_status: '',
id: '',
job_id: '',
payment_unit: '',
rate: ''
}
],
country_of_birth: '',
created_at: '',
created_by: '',
custom_fields: [{description: '', id: '', name: '', value: ''}],
deceased_on: '',
deleted: false,
department: '',
department_id: '',
department_name: '',
description: '',
dietary_preference: '',
direct_reports: [],
display_name: '',
division: '',
division_id: '',
emails: [{email: '', id: '', type: ''}],
employee_number: '',
employment_end_date: '',
employment_role: {sub_type: '', type: ''},
employment_start_date: '',
employment_status: '',
first_name: '',
food_allergies: [],
gender: '',
id: '',
initials: '',
jobs: [
{
compensation_rate: '',
currency: '',
employee_id: '',
end_date: '',
hired_at: '',
id: '',
is_primary: false,
location: {},
payment_unit: '',
role: '',
start_date: '',
title: ''
}
],
languages: [],
last_name: '',
leaving_reason: '',
manager: {
email: '',
employment_status: '',
first_name: '',
id: '',
last_name: '',
name: ''
},
marital_status: '',
middle_name: '',
nationalities: [],
partner: {
birthday: '',
deceased_on: '',
first_name: '',
gender: '',
id: '',
initials: '',
last_name: '',
middle_name: ''
},
phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
photo_url: '',
preferred_language: '',
preferred_name: '',
pronouns: '',
record_url: '',
row_version: '',
salutation: '',
social_links: [{id: '', type: '', url: ''}],
social_security_number: '',
source: '',
source_id: '',
tags: [],
tax_code: '',
tax_id: '',
team: {id: '', name: ''},
timezone: '',
title: '',
updated_at: '',
updated_by: '',
works_remote: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/employees/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","compensations":[{"currency":"","effective_date":"","flsa_status":"","id":"","job_id":"","payment_unit":"","rate":""}],"country_of_birth":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deceased_on":"","deleted":false,"department":"","department_id":"","department_name":"","description":"","dietary_preference":"","direct_reports":[],"display_name":"","division":"","division_id":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","employment_end_date":"","employment_role":{"sub_type":"","type":""},"employment_start_date":"","employment_status":"","first_name":"","food_allergies":[],"gender":"","id":"","initials":"","jobs":[{"compensation_rate":"","currency":"","employee_id":"","end_date":"","hired_at":"","id":"","is_primary":false,"location":{},"payment_unit":"","role":"","start_date":"","title":""}],"languages":[],"last_name":"","leaving_reason":"","manager":{"email":"","employment_status":"","first_name":"","id":"","last_name":"","name":""},"marital_status":"","middle_name":"","nationalities":[],"partner":{"birthday":"","deceased_on":"","first_name":"","gender":"","id":"","initials":"","last_name":"","middle_name":""},"phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","preferred_language":"","preferred_name":"","pronouns":"","record_url":"","row_version":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"social_security_number":"","source":"","source_id":"","tags":[],"tax_code":"","tax_id":"","team":{"id":"","name":""},"timezone":"","title":"","updated_at":"","updated_by":"","works_remote":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
@"birthday": @"",
@"company_id": @"",
@"company_name": @"",
@"compensations": @[ @{ @"currency": @"", @"effective_date": @"", @"flsa_status": @"", @"id": @"", @"job_id": @"", @"payment_unit": @"", @"rate": @"" } ],
@"country_of_birth": @"",
@"created_at": @"",
@"created_by": @"",
@"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
@"deceased_on": @"",
@"deleted": @NO,
@"department": @"",
@"department_id": @"",
@"department_name": @"",
@"description": @"",
@"dietary_preference": @"",
@"direct_reports": @[ ],
@"display_name": @"",
@"division": @"",
@"division_id": @"",
@"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
@"employee_number": @"",
@"employment_end_date": @"",
@"employment_role": @{ @"sub_type": @"", @"type": @"" },
@"employment_start_date": @"",
@"employment_status": @"",
@"first_name": @"",
@"food_allergies": @[ ],
@"gender": @"",
@"id": @"",
@"initials": @"",
@"jobs": @[ @{ @"compensation_rate": @"", @"currency": @"", @"employee_id": @"", @"end_date": @"", @"hired_at": @"", @"id": @"", @"is_primary": @NO, @"location": @{ }, @"payment_unit": @"", @"role": @"", @"start_date": @"", @"title": @"" } ],
@"languages": @[ ],
@"last_name": @"",
@"leaving_reason": @"",
@"manager": @{ @"email": @"", @"employment_status": @"", @"first_name": @"", @"id": @"", @"last_name": @"", @"name": @"" },
@"marital_status": @"",
@"middle_name": @"",
@"nationalities": @[ ],
@"partner": @{ @"birthday": @"", @"deceased_on": @"", @"first_name": @"", @"gender": @"", @"id": @"", @"initials": @"", @"last_name": @"", @"middle_name": @"" },
@"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
@"photo_url": @"",
@"preferred_language": @"",
@"preferred_name": @"",
@"pronouns": @"",
@"record_url": @"",
@"row_version": @"",
@"salutation": @"",
@"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
@"social_security_number": @"",
@"source": @"",
@"source_id": @"",
@"tags": @[ ],
@"tax_code": @"",
@"tax_id": @"",
@"team": @{ @"id": @"", @"name": @"" },
@"timezone": @"",
@"title": @"",
@"updated_at": @"",
@"updated_by": @"",
@"works_remote": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/employees/: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}}/hris/employees/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/employees/: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([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/hris/employees/:id', [
'body' => '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/employees/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'addresses' => [
[
'city' => '',
'contact_name' => '',
'country' => '',
'county' => '',
'email' => '',
'fax' => '',
'id' => '',
'latitude' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'line4' => '',
'longitude' => '',
'name' => '',
'phone_number' => '',
'postal_code' => '',
'row_version' => '',
'salutation' => '',
'state' => '',
'street_number' => '',
'string' => '',
'type' => '',
'website' => ''
]
],
'birthday' => '',
'company_id' => '',
'company_name' => '',
'compensations' => [
[
'currency' => '',
'effective_date' => '',
'flsa_status' => '',
'id' => '',
'job_id' => '',
'payment_unit' => '',
'rate' => ''
]
],
'country_of_birth' => '',
'created_at' => '',
'created_by' => '',
'custom_fields' => [
[
'description' => '',
'id' => '',
'name' => '',
'value' => ''
]
],
'deceased_on' => '',
'deleted' => null,
'department' => '',
'department_id' => '',
'department_name' => '',
'description' => '',
'dietary_preference' => '',
'direct_reports' => [
],
'display_name' => '',
'division' => '',
'division_id' => '',
'emails' => [
[
'email' => '',
'id' => '',
'type' => ''
]
],
'employee_number' => '',
'employment_end_date' => '',
'employment_role' => [
'sub_type' => '',
'type' => ''
],
'employment_start_date' => '',
'employment_status' => '',
'first_name' => '',
'food_allergies' => [
],
'gender' => '',
'id' => '',
'initials' => '',
'jobs' => [
[
'compensation_rate' => '',
'currency' => '',
'employee_id' => '',
'end_date' => '',
'hired_at' => '',
'id' => '',
'is_primary' => null,
'location' => [
],
'payment_unit' => '',
'role' => '',
'start_date' => '',
'title' => ''
]
],
'languages' => [
],
'last_name' => '',
'leaving_reason' => '',
'manager' => [
'email' => '',
'employment_status' => '',
'first_name' => '',
'id' => '',
'last_name' => '',
'name' => ''
],
'marital_status' => '',
'middle_name' => '',
'nationalities' => [
],
'partner' => [
'birthday' => '',
'deceased_on' => '',
'first_name' => '',
'gender' => '',
'id' => '',
'initials' => '',
'last_name' => '',
'middle_name' => ''
],
'phone_numbers' => [
[
'area_code' => '',
'country_code' => '',
'extension' => '',
'id' => '',
'number' => '',
'type' => ''
]
],
'photo_url' => '',
'preferred_language' => '',
'preferred_name' => '',
'pronouns' => '',
'record_url' => '',
'row_version' => '',
'salutation' => '',
'social_links' => [
[
'id' => '',
'type' => '',
'url' => ''
]
],
'social_security_number' => '',
'source' => '',
'source_id' => '',
'tags' => [
],
'tax_code' => '',
'tax_id' => '',
'team' => [
'id' => '',
'name' => ''
],
'timezone' => '',
'title' => '',
'updated_at' => '',
'updated_by' => '',
'works_remote' => null
]));
$request->setRequestUrl('{{baseUrl}}/hris/employees/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/employees/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/employees/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/hris/employees/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/employees/:id"
payload = {
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": False,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": False,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": False
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/employees/:id"
payload <- "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/employees/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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/hris/employees/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"addresses\": [\n {\n \"city\": \"\",\n \"contact_name\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"fax\": \"\",\n \"id\": \"\",\n \"latitude\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"line4\": \"\",\n \"longitude\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"state\": \"\",\n \"street_number\": \"\",\n \"string\": \"\",\n \"type\": \"\",\n \"website\": \"\"\n }\n ],\n \"birthday\": \"\",\n \"company_id\": \"\",\n \"company_name\": \"\",\n \"compensations\": [\n {\n \"currency\": \"\",\n \"effective_date\": \"\",\n \"flsa_status\": \"\",\n \"id\": \"\",\n \"job_id\": \"\",\n \"payment_unit\": \"\",\n \"rate\": \"\"\n }\n ],\n \"country_of_birth\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"custom_fields\": [\n {\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"deceased_on\": \"\",\n \"deleted\": false,\n \"department\": \"\",\n \"department_id\": \"\",\n \"department_name\": \"\",\n \"description\": \"\",\n \"dietary_preference\": \"\",\n \"direct_reports\": [],\n \"display_name\": \"\",\n \"division\": \"\",\n \"division_id\": \"\",\n \"emails\": [\n {\n \"email\": \"\",\n \"id\": \"\",\n \"type\": \"\"\n }\n ],\n \"employee_number\": \"\",\n \"employment_end_date\": \"\",\n \"employment_role\": {\n \"sub_type\": \"\",\n \"type\": \"\"\n },\n \"employment_start_date\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"food_allergies\": [],\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"jobs\": [\n {\n \"compensation_rate\": \"\",\n \"currency\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"hired_at\": \"\",\n \"id\": \"\",\n \"is_primary\": false,\n \"location\": {},\n \"payment_unit\": \"\",\n \"role\": \"\",\n \"start_date\": \"\",\n \"title\": \"\"\n }\n ],\n \"languages\": [],\n \"last_name\": \"\",\n \"leaving_reason\": \"\",\n \"manager\": {\n \"email\": \"\",\n \"employment_status\": \"\",\n \"first_name\": \"\",\n \"id\": \"\",\n \"last_name\": \"\",\n \"name\": \"\"\n },\n \"marital_status\": \"\",\n \"middle_name\": \"\",\n \"nationalities\": [],\n \"partner\": {\n \"birthday\": \"\",\n \"deceased_on\": \"\",\n \"first_name\": \"\",\n \"gender\": \"\",\n \"id\": \"\",\n \"initials\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\"\n },\n \"phone_numbers\": [\n {\n \"area_code\": \"\",\n \"country_code\": \"\",\n \"extension\": \"\",\n \"id\": \"\",\n \"number\": \"\",\n \"type\": \"\"\n }\n ],\n \"photo_url\": \"\",\n \"preferred_language\": \"\",\n \"preferred_name\": \"\",\n \"pronouns\": \"\",\n \"record_url\": \"\",\n \"row_version\": \"\",\n \"salutation\": \"\",\n \"social_links\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"url\": \"\"\n }\n ],\n \"social_security_number\": \"\",\n \"source\": \"\",\n \"source_id\": \"\",\n \"tags\": [],\n \"tax_code\": \"\",\n \"tax_id\": \"\",\n \"team\": {\n \"id\": \"\",\n \"name\": \"\"\n },\n \"timezone\": \"\",\n \"title\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\",\n \"works_remote\": 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}}/hris/employees/:id";
let payload = json!({
"addresses": (
json!({
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
})
),
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": (
json!({
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
})
),
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": (
json!({
"description": "",
"id": "",
"name": "",
"value": ""
})
),
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": (),
"display_name": "",
"division": "",
"division_id": "",
"emails": (
json!({
"email": "",
"id": "",
"type": ""
})
),
"employee_number": "",
"employment_end_date": "",
"employment_role": json!({
"sub_type": "",
"type": ""
}),
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": (),
"gender": "",
"id": "",
"initials": "",
"jobs": (
json!({
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": json!({}),
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
})
),
"languages": (),
"last_name": "",
"leaving_reason": "",
"manager": json!({
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
}),
"marital_status": "",
"middle_name": "",
"nationalities": (),
"partner": json!({
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
}),
"phone_numbers": (
json!({
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
})
),
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": (
json!({
"id": "",
"type": "",
"url": ""
})
),
"social_security_number": "",
"source": "",
"source_id": "",
"tags": (),
"tax_code": "",
"tax_id": "",
"team": json!({
"id": "",
"name": ""
}),
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/employees/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}'
echo '{
"addresses": [
{
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
}
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
{
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
}
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
{
"description": "",
"id": "",
"name": "",
"value": ""
}
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
{
"email": "",
"id": "",
"type": ""
}
],
"employee_number": "",
"employment_end_date": "",
"employment_role": {
"sub_type": "",
"type": ""
},
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
{
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": {},
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
}
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": {
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
},
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": {
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
},
"phone_numbers": [
{
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
}
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
{
"id": "",
"type": "",
"url": ""
}
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": {
"id": "",
"name": ""
},
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
}' | \
http PATCH {{baseUrl}}/hris/employees/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "addresses": [\n {\n "city": "",\n "contact_name": "",\n "country": "",\n "county": "",\n "email": "",\n "fax": "",\n "id": "",\n "latitude": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "line4": "",\n "longitude": "",\n "name": "",\n "phone_number": "",\n "postal_code": "",\n "row_version": "",\n "salutation": "",\n "state": "",\n "street_number": "",\n "string": "",\n "type": "",\n "website": ""\n }\n ],\n "birthday": "",\n "company_id": "",\n "company_name": "",\n "compensations": [\n {\n "currency": "",\n "effective_date": "",\n "flsa_status": "",\n "id": "",\n "job_id": "",\n "payment_unit": "",\n "rate": ""\n }\n ],\n "country_of_birth": "",\n "created_at": "",\n "created_by": "",\n "custom_fields": [\n {\n "description": "",\n "id": "",\n "name": "",\n "value": ""\n }\n ],\n "deceased_on": "",\n "deleted": false,\n "department": "",\n "department_id": "",\n "department_name": "",\n "description": "",\n "dietary_preference": "",\n "direct_reports": [],\n "display_name": "",\n "division": "",\n "division_id": "",\n "emails": [\n {\n "email": "",\n "id": "",\n "type": ""\n }\n ],\n "employee_number": "",\n "employment_end_date": "",\n "employment_role": {\n "sub_type": "",\n "type": ""\n },\n "employment_start_date": "",\n "employment_status": "",\n "first_name": "",\n "food_allergies": [],\n "gender": "",\n "id": "",\n "initials": "",\n "jobs": [\n {\n "compensation_rate": "",\n "currency": "",\n "employee_id": "",\n "end_date": "",\n "hired_at": "",\n "id": "",\n "is_primary": false,\n "location": {},\n "payment_unit": "",\n "role": "",\n "start_date": "",\n "title": ""\n }\n ],\n "languages": [],\n "last_name": "",\n "leaving_reason": "",\n "manager": {\n "email": "",\n "employment_status": "",\n "first_name": "",\n "id": "",\n "last_name": "",\n "name": ""\n },\n "marital_status": "",\n "middle_name": "",\n "nationalities": [],\n "partner": {\n "birthday": "",\n "deceased_on": "",\n "first_name": "",\n "gender": "",\n "id": "",\n "initials": "",\n "last_name": "",\n "middle_name": ""\n },\n "phone_numbers": [\n {\n "area_code": "",\n "country_code": "",\n "extension": "",\n "id": "",\n "number": "",\n "type": ""\n }\n ],\n "photo_url": "",\n "preferred_language": "",\n "preferred_name": "",\n "pronouns": "",\n "record_url": "",\n "row_version": "",\n "salutation": "",\n "social_links": [\n {\n "id": "",\n "type": "",\n "url": ""\n }\n ],\n "social_security_number": "",\n "source": "",\n "source_id": "",\n "tags": [],\n "tax_code": "",\n "tax_id": "",\n "team": {\n "id": "",\n "name": ""\n },\n "timezone": "",\n "title": "",\n "updated_at": "",\n "updated_by": "",\n "works_remote": false\n}' \
--output-document \
- {{baseUrl}}/hris/employees/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"addresses": [
[
"city": "",
"contact_name": "",
"country": "",
"county": "",
"email": "",
"fax": "",
"id": "",
"latitude": "",
"line1": "",
"line2": "",
"line3": "",
"line4": "",
"longitude": "",
"name": "",
"phone_number": "",
"postal_code": "",
"row_version": "",
"salutation": "",
"state": "",
"street_number": "",
"string": "",
"type": "",
"website": ""
]
],
"birthday": "",
"company_id": "",
"company_name": "",
"compensations": [
[
"currency": "",
"effective_date": "",
"flsa_status": "",
"id": "",
"job_id": "",
"payment_unit": "",
"rate": ""
]
],
"country_of_birth": "",
"created_at": "",
"created_by": "",
"custom_fields": [
[
"description": "",
"id": "",
"name": "",
"value": ""
]
],
"deceased_on": "",
"deleted": false,
"department": "",
"department_id": "",
"department_name": "",
"description": "",
"dietary_preference": "",
"direct_reports": [],
"display_name": "",
"division": "",
"division_id": "",
"emails": [
[
"email": "",
"id": "",
"type": ""
]
],
"employee_number": "",
"employment_end_date": "",
"employment_role": [
"sub_type": "",
"type": ""
],
"employment_start_date": "",
"employment_status": "",
"first_name": "",
"food_allergies": [],
"gender": "",
"id": "",
"initials": "",
"jobs": [
[
"compensation_rate": "",
"currency": "",
"employee_id": "",
"end_date": "",
"hired_at": "",
"id": "",
"is_primary": false,
"location": [],
"payment_unit": "",
"role": "",
"start_date": "",
"title": ""
]
],
"languages": [],
"last_name": "",
"leaving_reason": "",
"manager": [
"email": "",
"employment_status": "",
"first_name": "",
"id": "",
"last_name": "",
"name": ""
],
"marital_status": "",
"middle_name": "",
"nationalities": [],
"partner": [
"birthday": "",
"deceased_on": "",
"first_name": "",
"gender": "",
"id": "",
"initials": "",
"last_name": "",
"middle_name": ""
],
"phone_numbers": [
[
"area_code": "",
"country_code": "",
"extension": "",
"id": "",
"number": "",
"type": ""
]
],
"photo_url": "",
"preferred_language": "",
"preferred_name": "",
"pronouns": "",
"record_url": "",
"row_version": "",
"salutation": "",
"social_links": [
[
"id": "",
"type": "",
"url": ""
]
],
"social_security_number": "",
"source": "",
"source_id": "",
"tags": [],
"tax_code": "",
"tax_id": "",
"team": [
"id": "",
"name": ""
],
"timezone": "",
"title": "",
"updated_at": "",
"updated_by": "",
"works_remote": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/employees/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Jobs
{{baseUrl}}/hris/jobs/employees/:employee_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
employee_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/jobs/employees/:employee_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/jobs/employees/:employee_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/jobs/employees/:employee_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/jobs/employees/:employee_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/jobs/employees/:employee_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/jobs/employees/:employee_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/jobs/employees/:employee_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/jobs/employees/:employee_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/jobs/employees/:employee_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/jobs/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/jobs/employees/:employee_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/jobs/employees/:employee_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/jobs/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/jobs/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/jobs/employees/:employee_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/jobs/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/jobs/employees/:employee_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}}/hris/jobs/employees/:employee_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/jobs/employees/:employee_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/jobs/employees/:employee_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/jobs/employees/:employee_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/jobs/employees/:employee_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/jobs/employees/:employee_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/jobs/employees/:employee_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/jobs/employees/:employee_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/jobs/employees/:employee_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/jobs/employees/:employee_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/jobs/employees/:employee_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/jobs/employees/:employee_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/jobs/employees/:employee_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/jobs/employees/:employee_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/jobs/employees/:employee_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/jobs/employees/:employee_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/jobs/employees/:employee_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"operation": "all",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
One Job
{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
job_id
employee_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/jobs/employees/:employee_id/jobs/:job_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/jobs/employees/:employee_id/jobs/:job_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/jobs/employees/:employee_id/jobs/:job_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/jobs/employees/:employee_id/jobs/:job_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/jobs/employees/:employee_id/jobs/:job_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/jobs/employees/:employee_id/jobs/:job_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id/jobs/:job_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/jobs/employees/:employee_id/jobs/:job_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id/jobs/:job_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id/jobs/:job_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id/jobs/:job_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/jobs/employees/:employee_id/jobs/:job_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_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}}/hris/jobs/employees/:employee_id/jobs/:job_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/jobs/employees/:employee_id/jobs/:job_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/jobs/employees/:employee_id/jobs/:job_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/jobs/employees/:employee_id/jobs/:job_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/jobs/employees/:employee_id/jobs/:job_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"department": "Brussels Office",
"employment_status": "active",
"end_date": "2020-08-12",
"id": "12345",
"is_primary": true,
"start_date": "2020-08-12",
"title": "CEO"
},
"operation": "one",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Payroll
{{baseUrl}}/hris/payrolls/:payroll_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
payroll_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/payrolls/:payroll_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/payrolls/:payroll_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/payrolls/:payroll_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/payrolls/:payroll_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/payrolls/:payroll_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/payrolls/:payroll_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/payrolls/:payroll_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/payrolls/:payroll_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/payrolls/:payroll_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/:payroll_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/payrolls/:payroll_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls/:payroll_id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/payrolls/:payroll_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/:payroll_id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/payrolls/:payroll_id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/:payroll_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/:payroll_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls/:payroll_id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/payrolls/:payroll_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}}/hris/payrolls/:payroll_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/payrolls/:payroll_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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/payrolls/:payroll_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/payrolls/:payroll_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/payrolls/:payroll_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/payrolls/:payroll_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/payrolls/:payroll_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/payrolls/:payroll_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/payrolls/:payroll_id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/payrolls/:payroll_id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/payrolls/:payroll_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/payrolls/:payroll_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/payrolls/:payroll_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/payrolls/:payroll_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/payrolls/:payroll_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/payrolls/:payroll_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/payrolls/:payroll_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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"check_date": "2022-04-08",
"company_id": "23456",
"end_date": "2022-04-21",
"id": "12345",
"processed": false,
"processed_date": "2022-04-08",
"start_date": "2022-04-08"
},
"operation": "one",
"resource": "Companies",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Payroll
{{baseUrl}}/hris/payrolls
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/payrolls");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/payrolls" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/payrolls"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/payrolls"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/payrolls");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/payrolls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/payrolls HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/payrolls")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/payrolls"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/payrolls")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/payrolls');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/payrolls',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/payrolls';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/payrolls")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/payrolls',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/payrolls';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/payrolls"]
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}}/hris/payrolls" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/payrolls",
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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/payrolls', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/payrolls');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/payrolls');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/payrolls' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/payrolls' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/payrolls", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/payrolls"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/payrolls"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/payrolls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/payrolls') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/payrolls";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/payrolls \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/payrolls \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/payrolls
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/payrolls")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"operation": "all",
"resource": "Employees",
"service": "sage-hr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Create Time Off Request
{{baseUrl}}/hris/time-off-requests
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/time-off-requests");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/hris/time-off-requests" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:amount ""
:approval_date ""
:created_at ""
:created_by ""
:description ""
:employee_id ""
:end_date ""
:id ""
:notes {:employee ""
:manager ""}
:policy_id ""
:request_date ""
:request_type ""
:start_date ""
:status ""
:units ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/hris/time-off-requests"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/time-off-requests"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/time-off-requests");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/time-off-requests"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/time-off-requests HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 363
{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/hris/time-off-requests")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/time-off-requests"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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 \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/hris/time-off-requests")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {
employee: '',
manager: ''
},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/hris/time-off-requests');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/time-off-requests';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"amount":"","approval_date":"","created_at":"","created_by":"","description":"","employee_id":"","end_date":"","id":"","notes":{"employee":"","manager":""},"policy_id":"","request_date":"","request_type":"","start_date":"","status":"","units":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/hris/time-off-requests',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "approval_date": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "employee_id": "",\n "end_date": "",\n "id": "",\n "notes": {\n "employee": "",\n "manager": ""\n },\n "policy_id": "",\n "request_date": "",\n "request_type": "",\n "start_date": "",\n "status": "",\n "units": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
},
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}}/hris/time-off-requests');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {
employee: '',
manager: ''
},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
});
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}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/time-off-requests';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"amount":"","approval_date":"","created_at":"","created_by":"","description":"","employee_id":"","end_date":"","id":"","notes":{"employee":"","manager":""},"policy_id":"","request_date":"","request_type":"","start_date":"","status":"","units":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"approval_date": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"employee_id": @"",
@"end_date": @"",
@"id": @"",
@"notes": @{ @"employee": @"", @"manager": @"" },
@"policy_id": @"",
@"request_date": @"",
@"request_type": @"",
@"start_date": @"",
@"status": @"",
@"units": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/time-off-requests"]
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}}/hris/time-off-requests" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/time-off-requests",
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([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/hris/time-off-requests', [
'body' => '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/time-off-requests');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/hris/time-off-requests');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/time-off-requests' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/time-off-requests' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/hris/time-off-requests", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/time-off-requests"
payload = {
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/time-off-requests"
payload <- "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/time-off-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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/hris/time-off-requests') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/time-off-requests";
let payload = json!({
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": json!({
"employee": "",
"manager": ""
}),
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/time-off-requests \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}' | \
http POST {{baseUrl}}/hris/time-off-requests \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "approval_date": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "employee_id": "",\n "end_date": "",\n "id": "",\n "notes": {\n "employee": "",\n "manager": ""\n },\n "policy_id": "",\n "request_date": "",\n "request_type": "",\n "start_date": "",\n "status": "",\n "units": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/hris/time-off-requests
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": [
"employee": "",
"manager": ""
],
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/time-off-requests")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "time-off-requests",
"service": "bamboohr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Time Off Request
{{baseUrl}}/hris/time-off-requests/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/time-off-requests/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/time-off-requests/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/time-off-requests/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/time-off-requests/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/time-off-requests/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/time-off-requests/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/time-off-requests/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/hris/time-off-requests/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/time-off-requests/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/hris/time-off-requests/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/time-off-requests/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/time-off-requests/: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}}/hris/time-off-requests/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/time-off-requests/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/hris/time-off-requests/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/hris/time-off-requests/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/time-off-requests/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/time-off-requests/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/time-off-requests/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/hris/time-off-requests/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
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}}/hris/time-off-requests/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/time-off-requests/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/hris/time-off-requests/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/time-off-requests/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/time-off-requests/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "time-off-requests",
"service": "bamboohr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Time Off Request
{{baseUrl}}/hris/time-off-requests/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
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}}/hris/time-off-requests/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/time-off-requests/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/time-off-requests/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/time-off-requests/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/time-off-requests/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/time-off-requests/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/time-off-requests/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/time-off-requests/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/time-off-requests/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/time-off-requests/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/time-off-requests/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/time-off-requests/: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}}/hris/time-off-requests/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/time-off-requests/: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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/time-off-requests/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/time-off-requests/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/time-off-requests/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/time-off-requests/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/time-off-requests/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/time-off-requests/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/time-off-requests/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/time-off-requests/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/time-off-requests/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/time-off-requests/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/time-off-requests/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"amount": 3.5,
"approval_date": "2022-03-21",
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "Enjoying some sun.",
"employee_id": "12345",
"end_date": "2022-04-01",
"id": "12345",
"policy_id": "12345",
"request_date": "2022-03-21",
"request_type": "vacation",
"start_date": "2022-04-01",
"status": "approved",
"units": "hours",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "time-off-requests",
"service": "bamboohr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Time Off Requests
{{baseUrl}}/hris/time-off-requests
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/time-off-requests");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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}}/hris/time-off-requests" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/hris/time-off-requests"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"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}}/hris/time-off-requests"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "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}}/hris/time-off-requests");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/time-off-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/time-off-requests HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/hris/time-off-requests")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/time-off-requests"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/hris/time-off-requests")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-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}}/hris/time-off-requests');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/time-off-requests';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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}}/hris/time-off-requests';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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 = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/time-off-requests"]
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}}/hris/time-off-requests" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/time-off-requests",
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}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/hris/time-off-requests', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/time-off-requests');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/hris/time-off-requests');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/time-off-requests' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/time-off-requests' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/hris/time-off-requests", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/time-off-requests"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/time-off-requests"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/time-off-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/hris/time-off-requests') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/hris/time-off-requests";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/time-off-requests \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/hris/time-off-requests \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/hris/time-off-requests
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/time-off-requests")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "time-off-requests",
"service": "bamboohr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update Time Off Request
{{baseUrl}}/hris/time-off-requests/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/hris/time-off-requests/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
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 \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/hris/time-off-requests/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:amount ""
:approval_date ""
:created_at ""
:created_by ""
:description ""
:employee_id ""
:end_date ""
:id ""
:notes {:employee ""
:manager ""}
:policy_id ""
:request_date ""
:request_type ""
:start_date ""
:status ""
:units ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/hris/time-off-requests/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/time-off-requests/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/time-off-requests/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/hris/time-off-requests/:id"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
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/hris/time-off-requests/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 363
{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/hris/time-off-requests/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/hris/time-off-requests/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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 \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/hris/time-off-requests/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {
employee: '',
manager: ''
},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/hris/time-off-requests/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/hris/time-off-requests/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"amount":"","approval_date":"","created_at":"","created_by":"","description":"","employee_id":"","end_date":"","id":"","notes":{"employee":"","manager":""},"policy_id":"","request_date":"","request_type":"","start_date":"","status":"","units":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/hris/time-off-requests/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "approval_date": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "employee_id": "",\n "end_date": "",\n "id": "",\n "notes": {\n "employee": "",\n "manager": ""\n },\n "policy_id": "",\n "request_date": "",\n "request_type": "",\n "start_date": "",\n "status": "",\n "units": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/hris/time-off-requests/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.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/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
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({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
},
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}}/hris/time-off-requests/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {
employee: '',
manager: ''
},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
});
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}}/hris/time-off-requests/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
amount: '',
approval_date: '',
created_at: '',
created_by: '',
description: '',
employee_id: '',
end_date: '',
id: '',
notes: {employee: '', manager: ''},
policy_id: '',
request_date: '',
request_type: '',
start_date: '',
status: '',
units: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/hris/time-off-requests/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"amount":"","approval_date":"","created_at":"","created_by":"","description":"","employee_id":"","end_date":"","id":"","notes":{"employee":"","manager":""},"policy_id":"","request_date":"","request_type":"","start_date":"","status":"","units":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"approval_date": @"",
@"created_at": @"",
@"created_by": @"",
@"description": @"",
@"employee_id": @"",
@"end_date": @"",
@"id": @"",
@"notes": @{ @"employee": @"", @"manager": @"" },
@"policy_id": @"",
@"request_date": @"",
@"request_type": @"",
@"start_date": @"",
@"status": @"",
@"units": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/hris/time-off-requests/: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}}/hris/time-off-requests/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/hris/time-off-requests/: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([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/hris/time-off-requests/:id', [
'body' => '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'approval_date' => '',
'created_at' => '',
'created_by' => '',
'description' => '',
'employee_id' => '',
'end_date' => '',
'id' => '',
'notes' => [
'employee' => '',
'manager' => ''
],
'policy_id' => '',
'request_date' => '',
'request_type' => '',
'start_date' => '',
'status' => '',
'units' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/hris/time-off-requests/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/hris/time-off-requests/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/hris/time-off-requests/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/hris/time-off-requests/:id"
payload = {
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/hris/time-off-requests/:id"
payload <- "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/hris/time-off-requests/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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/hris/time-off-requests/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"amount\": \"\",\n \"approval_date\": \"\",\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"employee_id\": \"\",\n \"end_date\": \"\",\n \"id\": \"\",\n \"notes\": {\n \"employee\": \"\",\n \"manager\": \"\"\n },\n \"policy_id\": \"\",\n \"request_date\": \"\",\n \"request_type\": \"\",\n \"start_date\": \"\",\n \"status\": \"\",\n \"units\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\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}}/hris/time-off-requests/:id";
let payload = json!({
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": json!({
"employee": "",
"manager": ""
}),
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
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}}/hris/time-off-requests/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": {
"employee": "",
"manager": ""
},
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
}' | \
http PATCH {{baseUrl}}/hris/time-off-requests/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "approval_date": "",\n "created_at": "",\n "created_by": "",\n "description": "",\n "employee_id": "",\n "end_date": "",\n "id": "",\n "notes": {\n "employee": "",\n "manager": ""\n },\n "policy_id": "",\n "request_date": "",\n "request_type": "",\n "start_date": "",\n "status": "",\n "units": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/hris/time-off-requests/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"amount": "",
"approval_date": "",
"created_at": "",
"created_by": "",
"description": "",
"employee_id": "",
"end_date": "",
"id": "",
"notes": [
"employee": "",
"manager": ""
],
"policy_id": "",
"request_date": "",
"request_type": "",
"start_date": "",
"status": "",
"units": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/hris/time-off-requests/: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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "time-off-requests",
"service": "bamboohr",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}