GST Tax Creation API
curl --request POST \
--url https://api.pazy.io/v1.0/taxes/gstimport requests
url = "https://api.pazy.io/v1.0/taxes/gst"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.pazy.io/v1.0/taxes/gst', 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/taxes/gst",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/taxes/gst"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pazy.io/v1.0/taxes/gst")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/taxes/gst")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyTax APIs
GST Tax Creation API
Create a GST tax rate for your organization
GST Tax Creation API
curl --request POST \
--url https://api.pazy.io/v1.0/taxes/gstimport requests
url = "https://api.pazy.io/v1.0/taxes/gst"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.pazy.io/v1.0/taxes/gst', 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/taxes/gst",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/taxes/gst"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pazy.io/v1.0/taxes/gst")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/taxes/gst")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Content-Type: application/json
Request
Content-Type:application/json
Creates a custom GST rate in your organization tax master. Use the returned id as gstId when creating vendor advances or other transactions that need GST.
GST rates are scoped to an organization entity when you pass entityGstin. Resolve available GSTINs from the Company Entities API. To list rates that already exist, use the GST Taxes API.
This endpoint creates standard (non reverse-charge) percentage rates — the same shape returned by the list API.
Body Parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
name | string | Yes | 1–255 characters | Display name for the rate in Pazy (returned as label on list) |
section | string | Yes | IGST or SGST + CGST | GST component — interstate vs intrastate split |
rate | number | Yes | 0–100 | Tax percentage |
entityGstin | string | No | 15-character GSTIN | Organization entity GSTIN this rate belongs to. Omit to leave the rate unbound to an entity |
Code Examples
curl -X POST https://api.pazy.io/v1.0/taxes/gst \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "GST 18%",
"section": "IGST",
"rate": 18,
"entityGstin": "29AAJCM3528P1ZR"
}'
const response = await fetch('https://api.pazy.io/v1.0/taxes/gst', {
method: 'POST',
headers: {
Authorization: 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'GST 18%',
section: 'IGST',
rate: 18,
entityGstin: '29AAJCM3528P1ZR'
})
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/taxes/gst"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"name": "GST 18%",
"section": "IGST",
"rate": 18,
"entityGstin": "29AAJCM3528P1ZR"
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data.tax.id | string | Tax id. Pass this as gstId to transaction create APIs |
data.tax.label | string | Display name given to the tax |
data.tax.description | string | Same value as section |
data.tax.section | string | GST component e.g. IGST, SGST + CGST |
data.tax.rate | number | Tax percentage |
data.tax.rateType | string | How rate is applied — PERCENTAGE for rates created via this API |
data.tax.dateCreated | string | ISO 8601 timestamp of when the tax was created |
data.tax.entityGstin | string | null | GSTIN passed in the request, or null when omitted |
data.tax.entityGstinName | string | null | Entity display name when available; may be null on create |
Response Example
{
"ok": true,
"data": {
"tax": {
"id": "4172",
"label": "GST 18%",
"description": "IGST",
"section": "IGST",
"rate": 18,
"rateType": "PERCENTAGE",
"dateCreated": "2026-09-02T06:45:12.110Z",
"entityGstin": "29AAJCM3528P1ZR",
"entityGstinName": null
}
}
}
Error Responses
Validation Errors
HTTP Status:400 Bad Request
Returned when section is invalid or entityGstin does not match an active organization GSTIN.
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Organization entity GSTIN not found: 29AAJCM3528P1ZR"
}
}
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
Returned when the API key doesn’t have the Tax resource with the Create action enabled.
{
"ok": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Permission check failed - PERMISSION_CHECK_FAILED"
}
}
Server Errors
HTTP Status:500 Internal Server Error
{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Best Practices
- Pass
entityGstinwhen your organization has multiple GSTIN entities so the rate shows up for the right entity on list and transaction flows - Use
sectionvalues exactly as documented (IGSTorSGST + CGST) — free-text labels are rejected - After create, confirm the rate on List GST Taxes before hardcoding the id in downstream jobs
Was this page helpful?