tenancy

POST /v1/orgs/{orgId}/billing-currency

Change what this organization is invoiced in.

ټول tenancy پای ټکي

تصدیق‌هویت

یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د billing.payment.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.

چیرته چې ستاسو د سازمان آی ډي ځي

دا پای ټکی ستاسو د سازمان آی ډي په خپله په URL کې د orgId په توګه اخلي. دا په لاره کې ځای پرځای کړئ — هیڅ سرلیک یا پوښتنې پیرامیټر شتون نلري چې د دې پرځای کار وکړي.

ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.

هڅه وکړئ

د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.

curl -X POST https://api.zinndigital.com/v1/orgs/{orgId}/billing-currency \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "currency": <string> }'

ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ

تفصیلات

⚖️ Owner ruling 2026-08-31 (W37-V). A customer may re-denominate their own organization. Three things happen and they are deliberately different: 1. **Invoices already issued are frozen.** An invoice is a legal document with a number; its currency, FX stamps and tax treatment stay as issued, for ever. ⚠️ An invoice that is still DUE keeps its old currency and will be collected in it — `invoices_left_in_old_currency` reports how many, so the screen can say so rather than let the customer discover it on a bill. 2. **Live subscriptions re-price from the CATALOGUE**, not by FX-converting the locked price. The catalogue's per-currency price is the number a page displayed and the business chose; a converted one would be invented and would drift on every rate move. A subscription whose plan has no price in the target currency is left in its original currency and counted in `subscriptions_unpriced` — never zeroed. 3. **Wallet credit is converted** at the day's rate, per purse, as a draw-down in the old currency plus a grant in the new sharing one reference. Credit is held per `(org, currency)` and currencies are never mixed, so leaving it would strand real money the customer could no longer spend. ⛔ A dedicated route rather than a field on `PATCH /v1/orgs/{orgId}`: a rename writes one column, this moves money. It requires `billing.payment.manage` — the person who may correct a typo in the account name is not necessarily the person who may re-denominate the balance. An org you cannot reach answers 404, not 403. ⭐ Send `dry_run: true` to get exactly these numbers **without** applying anything. The preview runs the real conversion inside a transaction it then rolls back, so it cannot disagree with the commit.

پارامترونه

نومډولاړیندا څه شی دی
orgId (path)UuidهوOrganization ID (UUIDv7).

د غوښتنې بدن

نومډولاړیندا څه شی دی
currencystringهوISO-4217, the currency to invoice this organization in from now on. Must be one we can actually charge — enabled in the registry, not policy-blocked, and presentable by at least…
dry_runbooleanنهCompute the change and report it **without applying it**. ⭐ The preview runs the real conversion in a transaction it rolls back, so the figures a customer confirms are the figur…

ځواب

نومډولاړیندا څه شی دی
dry_runbooleanهوTrue when nothing was applied.
from_currencystringهو
to_currencystringهو
ratestringهوUnits of `to_currency` per unit of `from_currency`, to ten decimal places. ⛔ A **string**: JSON has no decimal type, and a float here would be the one place in this path that br…
convertedConvertedPurse[]هوThe purses that moved. A purse whose balance rounds to zero in the target currency is **left alone** and is absent here — debiting it would destroy the customer's credit.
subscriptions_repricedintegerهوLive subscriptions now priced from the catalogue in the new currency.
subscriptions_unpricedintegerهوLive subscriptions whose plan has **no** price in the target currency. Left untouched in their original currency — never converted, never zeroed.
invoices_left_in_old_currencyintegerهوIssued invoices keeping the old currency, by design. Includes any still due.

تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي

401 · 403 · 404 · 422 · 429