Replace an Item filter
curl --request PUT \
--url https://api-sandbox.argyle.com/v2/item-filters/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Key paystub fields supported",
"filters": {
"status": {
"eq": "healthy"
},
"field_coverage": {
"paystubs": {
"gross_pay": {
"supported": {
"eq": true
}
},
"paystub_date": {
"supported": {
"eq": true
}
}
}
}
}
}
'import requests
url = "https://api-sandbox.argyle.com/v2/item-filters/{id}"
payload = {
"name": "Key paystub fields supported",
"filters": {
"status": { "eq": "healthy" },
"field_coverage": { "paystubs": {
"gross_pay": { "supported": { "eq": True } },
"paystub_date": { "supported": { "eq": True } }
} }
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Key paystub fields supported',
filters: {
status: {eq: 'healthy'},
field_coverage: {
paystubs: {gross_pay: {supported: {eq: true}}, paystub_date: {supported: {eq: true}}}
}
}
})
};
fetch('https://api-sandbox.argyle.com/v2/item-filters/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.argyle.com/v2/item-filters/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Key paystub fields supported',
'filters' => [
'status' => [
'eq' => 'healthy'
],
'field_coverage' => [
'paystubs' => [
'gross_pay' => [
'supported' => [
'eq' => true
]
],
'paystub_date' => [
'supported' => [
'eq' => true
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.argyle.com/v2/item-filters/{id}"
payload := strings.NewReader("{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-sandbox.argyle.com/v2/item-filters/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.argyle.com/v2/item-filters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "087394d4-83b5-4722-8c5e-0235362c12f5",
"name": "Key paystub fields supported"
}Item Filters
Replace An Item Filter
Replaces the filters of an Item filter with a new set of filters.
PUT
/
v2
/
item-filters
/
{id}
Replace an Item filter
curl --request PUT \
--url https://api-sandbox.argyle.com/v2/item-filters/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Key paystub fields supported",
"filters": {
"status": {
"eq": "healthy"
},
"field_coverage": {
"paystubs": {
"gross_pay": {
"supported": {
"eq": true
}
},
"paystub_date": {
"supported": {
"eq": true
}
}
}
}
}
}
'import requests
url = "https://api-sandbox.argyle.com/v2/item-filters/{id}"
payload = {
"name": "Key paystub fields supported",
"filters": {
"status": { "eq": "healthy" },
"field_coverage": { "paystubs": {
"gross_pay": { "supported": { "eq": True } },
"paystub_date": { "supported": { "eq": True } }
} }
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Key paystub fields supported',
filters: {
status: {eq: 'healthy'},
field_coverage: {
paystubs: {gross_pay: {supported: {eq: true}}, paystub_date: {supported: {eq: true}}}
}
}
})
};
fetch('https://api-sandbox.argyle.com/v2/item-filters/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.argyle.com/v2/item-filters/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Key paystub fields supported',
'filters' => [
'status' => [
'eq' => 'healthy'
],
'field_coverage' => [
'paystubs' => [
'gross_pay' => [
'supported' => [
'eq' => true
]
],
'paystub_date' => [
'supported' => [
'eq' => true
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.argyle.com/v2/item-filters/{id}"
payload := strings.NewReader("{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-sandbox.argyle.com/v2/item-filters/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.argyle.com/v2/item-filters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Key paystub fields supported\",\n \"filters\": {\n \"status\": {\n \"eq\": \"healthy\"\n },\n \"field_coverage\": {\n \"paystubs\": {\n \"gross_pay\": {\n \"supported\": {\n \"eq\": true\n }\n },\n \"paystub_date\": {\n \"supported\": {\n \"eq\": true\n }\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "087394d4-83b5-4722-8c5e-0235362c12f5",
"name": "Key paystub fields supported"
}Authorizations
Username = api_key_id, Password = api_key_secret
Path Parameters
ID of the Item filter whose filters are to be replaced.
Body
application/json
⌘I