Vendor Taxation Update API
Vendor APIs
Vendor Taxation Update API
Correct a GSTIN or PAN already recorded against a vendor
Vendor Taxation Update API
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Replaces a tax identifier the vendor already holds. The identifier being changed is selected by the type query parameter — a GSTIN or a PAN — and the body carries both the current value (oldValue) and its replacement (newValue).
oldValue is not optional bookkeeping: it identifies which record to update. A vendor can hold several GSTINs, so the value you are replacing is how Pazy picks the row. For PAN, oldValue acts as a confirmation check against the stored PAN. In both cases a mismatch rejects the request.
This endpoint edits in place — the identifier keeps its record, so anything already linked to it stays linked. To add a new identifier instead, use the Vendor Taxation Creation API.
Path Parameters
Query Parameters
Body Parameters
Unknown properties are rejected with
400 VALIDATION_ERROR — they are not silently ignored.
Values are matched case-sensitively against upper-case formats. Send
29ABCDE1234F1Z5, not 29abcde1234f1z5 — a lower-case newValue is rejected as an invalid format, and a lower-case oldValue will not match the stored record.Updating a GSTIN
type=GSTIN applies the following checks, in order. The first one that fails rejects the request and nothing is written.
Accepted GSTIN formats:
- The standard 15-character GSTIN —
^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}[CDSZ][0-9A-Z]{1}$, for example29ABCDE1234F1Z5 - Any 15-character value beginning with
99, used for UIN-style registrations
Duplicate GSTIN is not raised for a GSTIN held by another vendor — the per-vendor check (GSTIN already exists for this vendor) always applies regardless.
Updating a PAN
type=PAN applies the same vendor, access, and state checks, then:
The PAN is stored encrypted at rest, and there is no transaction-usage restriction on editing it — unlike GSTIN, a PAN can be corrected even after the vendor has been transacted with.
Once a vendor has a GSTIN, its PAN is derived from that GSTIN and can no longer be edited on its own. Correct the GSTIN instead.
What Happens After the Write
Once the change is committed, Pazy runs a few follow-up steps:- Verification.
newValueis checked against the GST portal (for GSTIN) or the PAN service (for PAN), and the result is returned asisVerifiedin the response — and stored on the record, replacing the previous verification state. A value that cannot be verified is still saved. - Audit trail. An
UPDATEentry recording both the before and after values is written against the vendor with sourceAPI, visible through the Vendor Audit Trail API. - Accounting sync. If an accounting integration is connected, the changed tax identifier is pushed to it.
200 OK and the new value remains saved.
Code Examples
cURL
Success Response
HTTP Status:200 OK
Response Fields:
Response Example — GSTIN Updated
Response Example — PAN Updated, Not Verified
Error Responses
Invalid GSTIN Format
HTTP Status:400 Bad Request
Invalid PAN Format
HTTP Status:400 Bad Request
GSTIN Is in Use
Returned when the GSTIN being replaced is already referenced by an invoice or a vendor advance. HTTP Status:400 Bad Request
Duplicate GSTIN
Returned when another vendor in your organization already holdsnewValue, or when this vendor already holds it.
HTTP Status: 400 Bad Request
PAN Mismatch
Returned whennewValue’s embedded PAN differs from the PAN of the identifiers the vendor already holds. A single vendor cannot span two PANs — create a separate vendor for the other legal entity.
HTTP Status: 400 Bad Request
oldValue Does Not Match
For type=GSTIN, the vendor holds no GSTIN equal to oldValue:
HTTP Status: 404 Not Found
type=PAN, the vendor has no PAN at all:
HTTP Status: 404 Not Found
type=PAN, the vendor has a PAN but it is not the one you sent:
HTTP Status: 400 Bad Request
PAN Cannot Be Edited
Returned when a PAN update is attempted on a vendor that has a GSTIN. HTTP Status:400 Bad Request
Tax Identifier Belongs to Your Own Business
Returned whennewValue resolves to one of your own organization’s PANs.
HTTP Status: 400 Bad Request
Vendor Not Active
Returned when the vendor is in any state other thanACTIVE or APPROVAL_PENDING — for example a disabled vendor.
HTTP Status: 400 Bad Request
Validation Error
Returned before any processing when the request does not match the schema — a missing or unsupportedtype, a missing or empty oldValue / newValue, or an unknown property.
HTTP Status: 400 Bad Request
Vendor Not Found
HTTP Status:404 Not Found
Access Denied
Returned when the caller is neither an admin / bookkeeper nor the vendor’s owner. HTTP Status:403 Forbidden
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
The API key must carry vendor update permission. HTTP Status:403 Forbidden
Internal Error
Returned when the change could not be persisted. The write is a single transaction, so the old value is left intact and the call is safe to retry. HTTP Status:500 Internal Server Error
Best Practices
- Fetch the current GSTIN / PAN with the Vendor Details API and send it verbatim as
oldValue— it selects the record to change, and a stale value fails the request - Send both values in upper case — a lower-case
newValueis rejected as an invalid format, and a lower-caseoldValuewill not match - Use this endpoint to correct a mistake, not to onboard a new registration. To add another GSTIN, use the Vendor Taxation Creation API
- Expect GSTIN edits to be blocked once the vendor has been transacted with — check for existing invoices and advances before planning a correction, and add a new GSTIN instead when the old one is in use
- The PAN of a GST-registered vendor is not editable. Correct the GSTIN and the PAN follows from it
- Treat
isVerified: falseas “saved but unconfirmed”, not as a failure. Note that a successful update replaces the stored verification state, so re-verifying a previously verified identifier with an unreachable service leaves the record unverified - Review changes afterwards through the Vendor Audit Trail API — each update records both the old and the new value