Create an Item filter
curl --request POST \
--url https://api-sandbox.argyle.com/v2/item-filters \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("POST", 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.post("https://api-sandbox.argyle.com/v2/item-filters")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Create An Item Filter
Filters are applied to properties of the field_coverage object of Items using the comparison operators below. You can also filter Items by their status property using the eq operator.
The name and ID of the new Item filter are returned in the response, which can be used as a query parameter when listing Items.
Comparison operators
eq — equals
gt — greater than
gte — greater than or equal to
lt — less than
lte — less than or equal to
POST
/
v2
/
item-filters
Create an Item filter
curl --request POST \
--url https://api-sandbox.argyle.com/v2/item-filters \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
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([
'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"
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("POST", 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.post("https://api-sandbox.argyle.com/v2/item-filters")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Body
application/json
Name for the Item filter.
The set of filters, which can be applied when listing Items.
⌘I