PUT
Classify a product for GST

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Path Parameters

productId
string
required

Body

application/json

An upsert keyed by the PRODUCT in the path, so there is no POST: a product has at most one classification. BOTH FIELDS ARE REQUIRED AND NEITHER IS DEFAULTED. An omitted rate would read as 0 and make the product exempt, which is a real configuration and so indistinguishable from a bug on every later read. IT CHANGES WHAT FUTURE INVOICES CHARGE and touches no document already issued: rates are frozen into the invoice at issue time. A product this store does not own is a 404. product_id is refused in the body: the product is named by the path.

hsn_code
string
required

The HSN or SAC code, 4 to 8 digits. How many digits a return must carry is the merchant's own compliance decision, so this is stored as given rather than padded or truncated.

gst_rate_bps
integer
required

This product's rate in BASIS POINTS: 12% is 1200. It overrides the store default for every line of this product, including a rate of zero, which is how an exempt product is expressed.

Required range: 0 <= x <= 10000

Response

Success

data
object