Tag Detail API
curl --request GET \
--url https://api.pazy.io/v1.0/tags/:tagId/valuesimport requests
url = "https://api.pazy.io/v1.0/tags/:tagId/values"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/tags/:tagId/values', 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.pazy.io/v1.0/tags/:tagId/values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/tags/:tagId/values"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/tags/:tagId/values")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/tags/:tagId/values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyTags APIs
Tag Detail API
Retrieve the list of values configured under a specific dropdown tag
Tag Detail API
curl --request GET \
--url https://api.pazy.io/v1.0/tags/:tagId/valuesimport requests
url = "https://api.pazy.io/v1.0/tags/:tagId/values"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/tags/:tagId/values', 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.pazy.io/v1.0/tags/:tagId/values",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/tags/:tagId/values"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/tags/:tagId/values")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/tags/:tagId/values")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAuthentication
All requests require an API key in the request headers. Headers:Authorization: Api-Key YOUR_API_KEY
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tagId | string | Yes | The unique slug identifier of the dropdown tag whose values are to be fetched. Obtain this from the Tag List API. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | No | Filter tag values by value text (partial match). |
Code Examples
curl -X GET "https://api.pazy.io/v1.0/tags/cost-centre/values?value=Eng" \
-H "Authorization: Api-Key YOUR_API_KEY"
const params = new URLSearchParams({ value: 'Eng' });
const response = await fetch(`https://api.pazy.io/v1.0/tags/cost-centre/values?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/tags/cost-centre/values"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
params = { "value": "Eng" }
response = requests.get(url, headers=headers, params=params)
result = response.json()
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the tag values response data |
data.tags | array | List of values configured for the tag |
data.tags[].id | number | Unique identifier for the tag value (use this as tagId in the Invoice List API to filter invoices by this value) |
data.tags[].value | string | The tag value text |
data.tags[].status | string | State of the tag value (e.g., ENABLED, DISABLED) |
data.context | object | Response metadata |
data.context.count | number | Total number of tag values returned |
Response Example
{
"ok": true,
"data": {
"tags": [
{
"id": 1024,
"value": "Engineering",
"status": "ENABLED"
},
{
"id": 1025,
"value": "Marketing",
"status": "ENABLED"
},
{
"id": 1026,
"value": "Legacy Ops",
"status": "DISABLED"
}
],
"context": {
"count": 3
}
}
}
Error Responses
Tag Not Found
Returned when the tag does not exist or is not a dropdown tag. HTTP Status:404 Not Found
{
"ok": false,
"error": {
"code": "TAG_NOT_FOUND",
"message": "Dropdown tag not found."
}
}
Access Denied
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "ACCESS_DENIED",
"message": "Access denied: Only admin and bookkeeper can view this resources"
}
}
Authentication Errors
HTTP Status:401 Unauthorized
{
"ok": false,
"error": {
"code": "MISSING_CREDENTIALS",
"message": "Missing Credentials"
}
}
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
}
}
Permission Errors
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Permission check failed - PERMISSION_CHECK_FAILED"
}
}
Internal Error
HTTP Status:500 Internal Server Error
{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal error"
}
}
Best Practices
- This endpoint returns values only for
DROPDOWNtags; requesting values for a non-dropdown tag returns aTAG_NOT_FOUNDerror - Predefined tags (
expense-head,cost-centre,department,location) with no values yet return an emptytagsarray rather thanTAG_NOT_FOUND - Use the
idfrom a tag value as thetagIdparameter in the Invoice List API to filter invoices that carry this tag value - The
statusfield indicates whether the value is currently usable —DISABLEDvalues are returned for historical reference but should not be used on new transactions - Use
valueto narrow down results — partial matching is supported (e.g.,EngmatchesEngineering) - Add new values to a dropdown tag with the Tag Value Creation API
Was this page helpful?