Company Entities API
curl --request GET \
--url https://api.pazy.io/v1.0/company/entitiesimport requests
url = "https://api.pazy.io/v1.0/company/entities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/company/entities', 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/company/entities",
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/company/entities"
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/company/entities")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/company/entities")
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_bodyCompany APIs
Company Entities API
Retrieve company entities for a specific its identifier
Company Entities API
curl --request GET \
--url https://api.pazy.io/v1.0/company/entitiesimport requests
url = "https://api.pazy.io/v1.0/company/entities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/company/entities', 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/company/entities",
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/company/entities"
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/company/entities")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/company/entities")
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/company/entities \
-H "Authorization: Api-Key YOUR_API_KEY"
const response = await fetch("https://api.pazy.io/v1.0/company/entities", {
method: "GET",
headers: {
Authorization: "Api-Key YOUR_API_KEY",
},
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/company/entities"
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.entities[].orgIdentifierId | string | Unique identifier for the organization entity |
data.entities[].entityType | string | Type of the entity identifier e.g. GSTIN, PAN |
data.entities[].entityValue | string | Value of the entity identifier e.g. the GSTIN number |
data.entities[].businessName | string | Name of the business associated with the entity |
data.entities[].state | string | Indian state where the entity is registered |
data.context.count | number | Total number of entities |
data.context.accountingPlatform | string | Accounting platform integrated e.g. TALLY, ZOHO |
Response Example
{
"ok": true,
"data": {
"entities": [
{
"orgIdentifierId": "<orgIdentifierId>",
"entityType": "GSTIN",
"entityValue": "27ABCDE1234F1Z5",
"businessName": "Acme Corp",
"state": "Maharashtra"
},
{
"orgIdentifierId": "<orgIdentifierId>",
"entityType": "GSTIN",
"entityValue": "29ABCDE1234F1Z5",
"businessName": "Acme Trading",
"state": "Karnataka"
}
],
"context": {
"count": 2,
"accountingPlatform": "TALLY"
}
}
}
Error Responses
Org Not Found
HTTP Status:404 Not Found
{
"ok": false,
"error": {
"code": "ORGANIZATION_NOT_FOUND",
"message": "Org not found"
}
}
Access Denied
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "ACCESS_DENIED",
"message": "Access denied: Only admin can view this details"
}
}
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"
}
}
Best Practices
Access Control
- You can view only if you are ‘admin’.
Was this page helpful?