Skip to main content
Vendor Search API
curl --request GET \
  --url https://api.pazy.io/v1.0/vendor/search

Authentication

All requests require an API key in the request headers. Headers:
Authorization: Api-Key YOUR_API_KEY

Request

Query Parameters

At least one of gstin, pan, or name must be provided.
ParameterTypeRequiredDescription
gstinstringNoExact GSTIN (15 characters) to search for
panstringNoExact PAN (10 characters) to search for
namestringNoPartial 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"

Success Response

HTTP Status: 200 OK Returns up to 20 vendors matching the search criteria. Response Fields:
FieldTypeDescription
okbooleanIndicates whether the request was successful
dataobjectContains the search results
data.vendorsarrayList of matching vendors
data.vendors[].vendorIdstringUnique slug identifier for the vendor (use this as vendorId in PO APIs)
data.vendors[].namestringVendor display name
data.vendors[].gstinstringVendor GSTIN (null if not set)
data.vendors[].panstringVendor 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, or name — the API returns a 400 if none are supplied
  • gstin and pan require exact matches (15 and 10 characters respectively)
  • name supports partial matching — searching ABC will match ABC Suppliers, ABC Trading Co., etc.
  • The vendorId in 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