Tag List API
curl --request GET \
--url https://api.pazy.io/v1.0/tagsimport requests
url = "https://api.pazy.io/v1.0/tags"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/tags', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/tags")
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 List API
Retrieve the list of organization tags available for tagging invoices, vendors, and line items
Tag List API
curl --request GET \
--url https://api.pazy.io/v1.0/tagsimport requests
url = "https://api.pazy.io/v1.0/tags"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/tags', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/tags")
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
Code Examples
curl -X GET https://api.pazy.io/v1.0/tags \
-H "Authorization: Api-Key YOUR_API_KEY"
const response = await fetch('https://api.pazy.io/v1.0/tags', {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/tags"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
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 list response data |
data.tags | array | List of tags configured for the organization |
data.tags[].id | string | Unique slug identifier for the tag (use this as tagId in the Tag Detail API and Tag Value Creation API) |
data.tags[].name | string | Display name of the tag |
data.tags[].description | string | Description of the tag |
data.tags[].dataType | string | Data type of the tag (e.g., DROPDOWN, VARCHAR, NUMBER, NUMERIC, DATETIME) |
data.tags[].type | string | PREDEFINED for the built-in tags every organization has (expense-head, cost-centre, department, location), or CUSTOM for tags and custom fields your organization created |
data.context | object | Response metadata |
data.context.count | number | Total number of tags returned |
DROPDOWN.
Response Example
{
"ok": true,
"data": {
"tags": [
{
"id": "expense-head",
"name": "Expense Head",
"description": "List all of your \"Expense Heads\" in your accounting. This will be visible in drop-downs across accounting policy requirements",
"dataType": "DROPDOWN",
"type": "PREDEFINED"
},
{
"id": "cost-centre",
"name": "Cost Centre",
"description": "Add if you have multiple cost centre(e.g. Zomato, Blinkit, Hyperpure)",
"dataType": "DROPDOWN",
"type": "PREDEFINED"
},
{
"id": "department",
"name": "Department",
"description": "Add different departments(Finance, Legal, Product, Marketing etc.) you have.",
"dataType": "DROPDOWN",
"type": "PREDEFINED"
},
{
"id": "location",
"name": "Location",
"description": "Add different locations you have offices in. This will allow you to analyze different expenses by location.",
"dataType": "DROPDOWN",
"type": "PREDEFINED"
},
{
"id": "project",
"name": "Project",
"description": "Project reference",
"dataType": "VARCHAR",
"type": "CUSTOM"
}
],
"context": {
"count": 5
}
}
}
Error Responses
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
- Use the
id(slug) returned for a tag as thetagIdpath parameter in the Tag Detail API to retrieve the available values for aDROPDOWNtag - Use
typeto tell the built-inPREDEFINEDtags apart fromCUSTOMones - Check
dataTypeto understand how a tag is used — onlyDROPDOWNtags carry a fixed list of selectable values - Tags are organization-scoped — only tags configured under your organization are returned
- Access is limited to users with tag read permission and an admin or bookkeeper role
Was this page helpful?