Vendor Search API
curl --request GET \
--url https://api.pazy.io/v1.0/vendor/searchimport requests
url = "https://api.pazy.io/v1.0/vendor/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/vendor/search', 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/vendor/search",
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/vendor/search"
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/vendor/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/vendor/search")
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_bodyVendor APIs
Vendor Search API
Search vendors by GSTIN, PAN, or name. Returns up to 20 matching results.
Vendor Search API
curl --request GET \
--url https://api.pazy.io/v1.0/vendor/searchimport requests
url = "https://api.pazy.io/v1.0/vendor/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/vendor/search', 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/vendor/search",
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/vendor/search"
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/vendor/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/vendor/search")
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
Query Parameters
At least one ofgstin, pan, or name must be provided.
| Parameter | Type | Required | Description |
|---|---|---|---|
gstin | string | No | Exact GSTIN (15 characters) to search for |
pan | string | No | Exact PAN (10 characters) to search for |
name | string | No | Partial or full vendor name to search for (case-insensitive) |
Code Examples
# Search by GSTIN
curl -X GET "https://api.pazy.io/v1.0/vendor/search?gstin=29ABCDE1234F1Z5" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Search by PAN
curl -X GET "https://api.pazy.io/v1.0/vendor/search?pan=ABCDE1234F" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Search by name
curl -X GET "https://api.pazy.io/v1.0/vendor/search?name=ABC+Suppliers" \
-H "Authorization: Api-Key YOUR_API_KEY"
// Search by GSTIN
const params = new URLSearchParams({ gstin: '29ABCDE1234F1Z5' });
const response = await fetch(`https://api.pazy.io/v1.0/vendor/search?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/vendor/search"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
# Search by GSTIN
params = { "gstin": "29ABCDE1234F1Z5" }
response = requests.get(url, headers=headers, params=params)
result = response.json()
Success Response
HTTP Status:200 OK
Returns up to 20 vendors matching the search criteria.
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the search results |
data.vendors | array | List of matching vendors |
data.vendors[].vendorId | string | Unique slug identifier for the vendor (use this as vendorId in PO APIs) |
data.vendors[].name | string | Vendor display name |
data.vendors[].gstin | string | Vendor GSTIN (null if not set) |
data.vendors[].pan | string | Vendor PAN (null if not set) |
Response Example
{
"ok": true,
"data": {
"vendors": [
{
"vendorId": "vendor_identifier",
"name": "ABC Suppliers",
"gstin": "29ABCDE1234F1Z5",
"pan": "ABCDE1234F"
}
]
}
}
Empty Results
If no vendors match the search criteria, an empty array is returned:{
"ok": true,
"data": {
"vendors": []
}
}
Error Responses
Missing Search Parameters
HTTP Status:400 Bad Request
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "At least one of gstin, pan, or name is required"
}
}
Invalid GSTIN Format
HTTP Status:400 Bad Request
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed: /query/gstin: must NOT have more than 15 characters"
}
}
Invalid PAN Format
HTTP Status:400 Bad Request
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed: /query/pan: must NOT have more than 10 characters"
}
}
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
- Provide at least one of
gstin,pan, orname— the API returns a400if none are supplied gstinandpanrequire exact matches (15 and 10 characters respectively)namesupports partial matching — searchingABCwill matchABC Suppliers,ABC Trading Co., etc.- The
vendorIdin the response is the slug to use when creating or updating purchase orders via the PO Creation API or PO Update API - Results are capped at 20 — use more specific search terms if needed
Was this page helpful?