इदमर्थकुञ्चिका। बैचAPI (३ अक्टो) समूहः। अत्र एकं फलं द्विः याचनेऽपि। कुञ्चिका, क्षेत्रम्, फललेखः। न द्विः शुल्कम्; एकफलधर्मः

English (minimizable)

After batch APIs (3 Oct), this post is a dedicated treatment of idempotency keys: client minting, scope, result stores, TTL, concurrency, write-only use, upstream provider keys and links to retry/outbox.

पूर्ण-शीर्षकम् / Full title

इदमर्थकुञ्चिका: A Metrical Codification of Idempotency Keys (with English glosses)

English · overview and topics (minimizable)

What this post is about

An idempotency key is a client-generated token that makes multiple HTTP attempts of the same intent produce one business effect.

Topics covered

  1. Retries and double-submit
  2. Client-generated stable keys
  3. Tenant + operation scope
  4. Storing and replaying results
  5. TTL on key records
  6. Concurrent first attempts
  7. Writes vs safe GETs
  8. Failed vs succeeded first try
  9. Upstream provider keys
  10. Links to retry and outbox

Sanskrit title

इदमर्थकुञ्चिका = idamartha-kuñcikā “key of same-meaning/same-effect” (idempotency key).

English

All English is in minimizable details. Sanskrit is the default open layer.

परम्परा-सन्धिः / Series links
पूर्वं / Prior अत्र / Adds न पुनः / Does not repeat
पुनःप्रयासन्यायः (१४ अगस्त) when to retry how keys make retry safe
बहिर्लेखनपटलः (२८ सितम्बे) event birth ids HTTP intent keys
बैचAPI (३ अक्टो) per-item keys general key dharma
सन्देशवितरणम् (२४ सितम्बे) OTP/send dupes notify path
इदम् key mint scope store TTL -
ग्राह्य-त्याज्य-विवेकः / Keep and avoid

ग्राह्यम् / Keep

१. ग्राहकजन्मः: client creates key before first try
२. स्थिरपुनर्योगः: same key on every retry
३. क्षेत्रभेदः: tenant and op family in scope
४. फलसंचयः: persist first success response
५. कालसीमा: TTL and storage bound
६. संघर्षनीतिः: unique constraint or lock on begin
७. प्रदातृवाहः: forward key to payment/SMS APIs

त्याज्यम् / Avoid

  • server-new key each attempt
  • one global key space for all op types
  • replay success body after partial side effect without care
अध्याय-योजना / Chapter plan
प्रकरणम् विषयः छन्दः श्लोकाः
मङ्गलं बीजं च / Opening अनुष्टुभ्
मूलतत्त्वानि / Core अनुष्टुभ्
मुख्यविधिः / Method उपजाति
रक्षा · विधिः / Guards अनुष्टुभ्
विवेक · सीमा / Judgment अनुष्टुभ्
पूर्वसन्धिः / Series links उपजाति
उपसंहारः / Close अनुष्टुभ्
पारिभाषिक-कोशः / Glossary
Modern English संस्कृतम् Note
idempotency key इदमर्थकुञ्चिका  
idempotent इदमर्थ / समफल  
side effect पार्श्वप्रभावः  
result store फलभण्डारः  
TTL जीविकालः  
double submit द्विः समर्पणम्  
fingerprint अङ्गुलिचिह्नम् optional body hash
in-progress lock प्रचलनतालः  
provider key प्रदातृकुञ्चिका  
safe method निर्भयविधिः GET/HEAD

श्लोकः १ (अनुष्टुभ्)

जाले यत्नः यदि द्विः पतति तदा कर्म द्विः मा भूत् ।
इदमर्थकुञ्चिका तस्माद् एकफलसेतुः ॥१॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
जाले यत्नः यदि द्विः पतति तदा कर्म द्विः मा भूत् । इदमर्थकुञ्चिका तस्माद् एकफलसेतुः ॥१॥

Word-for-word

संस्कृतपदम् Word-for-word English
जाले on the network
यत्नः attempt/retry
यदि if
द्विः twice
पतति falls/arrives
तदा then
कर्म action
मा भूत् must not happen
इदमर्थकुञ्चिका idempotency key
एकफलसेतुः one-fruit bridge

Gloss table

पदम् अर्थः / sense
द्विः पतति request arrives twice
कर्म द्विः side effect twice
एकफलसेतुः same-result bridge

English sense
Retries, double-clicks and client timeouts make the same logical intent hit the server more than once. An idempotency key makes those hits share one business outcome.

Context / topic
Topic: why idempotency keys exist. Links to retry treatise.

वृत्तमिति: ८-८-८-८।

श्लोकः २ (अनुष्टुभ्)

कुञ्चिका ग्राहकेन पूर्वं दीयते स्थिरा च ।
सर्वरे जननं पश्चात् विफले ॥२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
कुञ्चिका ग्राहकेन पूर्वं दीयते स्थिरा च । सर्वरे जननं पश्चात् विफले ॥२॥

Word-for-word

संस्कृतपदम् Word-for-word English
कुञ्चिका key
ग्राहकेन by the client
पूर्वम् beforehand
दीयते is given
स्थिरा stable
सर्वरे on the server
जननम् generation
पश्चात् विफले fails afterward

Gloss table

पदम् अर्थः / sense
ग्राहकेन पूर्वं client supplies first
स्थिरा stable across retries
सर्वरे जननम् server mints new each time

English sense
The client must generate the key before the first attempt and reuse it on every retry. If the server creates a new key per try, duplicates cannot be detected.

Context / topic
Topic: client-owned stable keys.

वृत्तमिति: ८-८-८-८।

श्लोकः ३ (अनुष्टुभ्)

क्षेत्रं कुटुम्बः कर्मजातिः कुञ्चिका च त्रयम् ।
सङ्कीर्णे द्विःदाने भयम् ॥३॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
क्षेत्रं कुटुम्बः कर्मजातिः कुञ्चिका च त्रयम् । सङ्कीर्णे द्विःदाने भयम् ॥३॥

Word-for-word

संस्कृतपदम् Word-for-word English
क्षेत्रम् scope
कुटुम्बः tenant
कर्मजातिः op kind
कुञ्चिका key
त्रयम् triad
सङ्कीर्णे when mixed
द्विःदाने double gift
भयम् danger

Gloss table

पदम् अर्थः / sense
कुटुम्बः tenant
कर्मजातिः operation family
सङ्कीर्णे if scopes collide

English sense
Scope keys as tenant + operation type + unique intent id so two different payments never share storage.

Context / topic
Topic: key scope. Links to multi-tenancy.

वृत्तमिति: ८-८-८-८।

श्लोकः ४ (अनुष्टुभ्)

फलाभिलिखनं प्रथमसिद्धे रक्ष्यम् ।
द्वितीये तदेव उत्तरम् ॥४॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
फलाभिलिखनं प्रथमसिद्धे रक्ष्यम् । द्वितीये तदेव उत्तरम् ॥४॥

Word-for-word

संस्कृतपदम् Word-for-word English
फलाभिलिखनम् result record
प्रथमसिद्धे when first succeeds
रक्ष्यम् must be kept
द्वितीये on the second
तदेव the very same
उत्तरम् response

Gloss table

पदम् अर्थः / sense
फलाभिलिखनम् stored response/result
द्वितीये on second request

English sense
On first success store the response (or resource id). Later requests with the same key return that record without re-executing side effects.

Context / topic
Topic: response replay store.

वृत्तमिति: ८-८-८-८।

श्लोकः ५ (उपजाति)

कालसीमा कुञ्चिकायाः मिता स्यात्
न तु अनन्ता स्मृतिः ।
अतिजीर्णे
नवीनं जन्म ॥५॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
कालसीमा कुञ्चिकायाः मिता स्यात् न तु अनन्ता स्मृतिः । अतिजीर्णे नवीनं जन्म ॥५॥

Word-for-word

संस्कृतपदम् Word-for-word English
कालसीमा time limit
कुञ्चिकायाः of the key
मिता measured
न तु अनन्ता not endless
स्मृतिः memory
अतिजीर्णे when overly aged
नवीनम् new
जन्म birth

Gloss table

पदम् अर्थः / sense
कालसीमा TTL on key records
अतिजीर्णे when too old

English sense
Idempotency records need TTL and storage bounds. Document whether an expired key starts a new intent or rejects.

Context / topic
Topic: retention of idempotency records.

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ६ (अनुष्टुभ्)

समकाले द्वौ यदि एककुञ्चिकया तदा एकः जेता ।
अपरः प्रतीक्षेत वा तुल्यफलम् ॥६॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
समकाले द्वौ यदि एककुञ्चिकया तदा एकः जेता । अपरः प्रतीक्षेत वा तुल्यफलम् ॥६॥

Word-for-word

संस्कृतपदम् Word-for-word English
समकाले at the same time
द्वौ two
एककुञ्चिकया with one key
एकः one
जेता winner
अपरः the other
प्रतीक्षेत should wait
तुल्यफलम् same fruit

Gloss table

पदम् अर्थः / sense
समकाले द्वौ two concurrent requests
एकः जेता one winner

English sense
Concurrent first attempts need a lock or unique constraint so only one side effect runs; the other waits or reads the winner result.

Context / topic
Topic: concurrent begin. Links to distributed lock.

वृत्तमिति: ८-८-८-८।

श्लोकः ७ (अनुष्टुभ्)

GET इदमर्थः स्वभावतः लेखे तु कुञ्चिका ।
सर्वकर्मसु एकन्यायो मूढः ॥७॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
GET इदमर्थः स्वभावतः लेखे तु कुञ्चिका । सर्वकर्मसु एकन्यायो मूढः ॥७॥

Word-for-word

संस्कृतपदम् Word-for-word English
GET GET
इदमर्थः idempotent
स्वभावतः by nature
लेखे on write
कुञ्चिका key
सर्वकर्मसु for all ops
एकन्यायः one rule
मूढः foolish

Gloss table

पदम् अर्थः / sense
GET इदमर्थः safe methods already idempotent
लेखे on writes

English sense
Do not require keys on pure reads. Focus on POST/PATCH that create charges, sends or irreversible state.

Context / topic
Topic: when keys are required.

वृत्तमिति: ८-८-८-८।

श्लोकः ८ (अनुष्टुभ्)

त्रुटौ प्रथमं यदि असिद्धं तदा कुञ्चिका जीवतु ।
सिद्धिलेखं विना पुनर्लेखः ॥८॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
त्रुटौ प्रथमं यदि असिद्धं तदा कुञ्चिका जीवतु । सिद्धिलेखं विना पुनर्लेखः ॥८॥

Word-for-word

संस्कृतपदम् Word-for-word English
त्रुटौ on error
प्रथमम् first
असिद्धम् not succeeded
कुञ्चिका key
जीवतु may live
सिद्धिलेखम् success write
विना without
पुनर्लेखः write again

Gloss table

पदम् अर्थः / sense
असिद्धम् failed before commit
सिद्धिलेखम् success record

English sense
If the first attempt fails before any side effect, a retry with the same key should be allowed to execute. If success was stored, never redo.

Context / topic
Topic: failed vs succeeded first attempt.

वृत्तमिति: ८-८-८-८।

श्लोकः ९ (अनुष्टुभ्)

प्रदातृकुञ्चिका बाह्ये अपि वहेत् ।
द्विः शुल्कं मा भूत् पथि ॥९॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
प्रदातृकुञ्चिका बाह्ये अपि वहेत् । द्विः शुल्कं मा भूत् पथि ॥९॥

Word-for-word

संस्कृतपदम् Word-for-word English
प्रदातृकुञ्चिका provider key
बाह्ये externally
अपि also
वहेत् should carry
द्विः शुल्कम् double fee
मा भूत् must not be
पथि on the path

Gloss table

पदम् अर्थः / sense
प्रदातृकुञ्चिका provider idempotency
द्विः शुल्कम् double charge

English sense
When calling payment or SMS providers, forward or derive a stable provider idempotency key so your retry does not double-charge upstream.

Context / topic
Topic: upstream keys. Links to email/SMS and vendor risk.

वृत्तमिति: ८-८-८-८।

श्लोकः १० (उपजाति)

पुनःप्रयासन्यायः कुञ्चिकां याचते
बहिर्पटलं जन्म रक्षति ।
उभौ मिलित्वा
द्विः कर्म नश्यति ॥१०॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
पुनःप्रयासन्यायः कुञ्चिकां याचते बहिर्पटलं जन्म रक्षति । उभौ मिलित्वा द्विः कर्म नश्यति ॥१०॥

Word-for-word

संस्कृतपदम् Word-for-word English
पुनःप्रयासन्यायः retry treatise
कुञ्चिकाम् key
याचते demands
बहिर्पटलम् outbox
जन्म birth
रक्षति guards
उभौ both
मिलित्वा together
द्विः कर्म double work
नश्यति perishes

Gloss table

पदम् अर्थः / sense
पुनःप्रयासः retry dharma
बहिर्पटलम् outbox

English sense
Retries need keys; outboxes need stable event ids. Together they stop duplicate business effects across HTTP and async paths.

Context / topic
Topic: series links to retry and outbox.

सन्धिः: यत्नः द्वारं; कुञ्चिका फलम्; पटलः जन्म

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ११ (अनुष्टुभ्)

ग्राहकजन्मः क्षेत्रं फललेखः कालः संघर्षः पञ्चकम् ।
एभिरिदमर्थकुञ्चिका एकफलसमन्विता ॥११॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
ग्राहकजन्मः क्षेत्रं फललेखः कालः संघर्षः पञ्चकम् । एभिरिदमर्थकुञ्चिका एकफलसमन्विता ॥११॥

Word-for-word

संस्कृतपदम् Word-for-word English
ग्राहकजन्मः client generation
क्षेत्रम् scope
फललेखः result record
कालः TTL
संघर्षः concurrency
पञ्चकम् five-set

Gloss table

पदम् अर्थः / sense
पञ्चकम् client mint scope store TTL concurrency

English sense
Five limbs: client-minted stable keys, scoped storage, result replay, TTL and safe concurrent first-writers.

Context / topic
Topic: checklist.

वृत्तमिति: ८-८-८-८।

श्लोकः १२ (अनुष्टुभ्)

इतीदमर्थकुञ्चिकासार एकफलसमन्वितः ।
मितं फलं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
इतीदमर्थकुञ्चिकासार एकफलसमन्वितः । मितं फलं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥

Word-for-word

संस्कृतपदम् Word-for-word English
इति thus
इदमर्थकुञ्चिकासारः idempotency-key essence
एकफलम् one fruit
मितम् measured
फलम् result
क्रियायोग्यम् operable
तन्त्रधर्मः system dharma

Gloss table

पदम् अर्थः / sense
एकफलम् one outcome
तन्त्रधर्मः platform dharma

English sense
Closing: one user intent, one business fruit, even when the network stutters.

Context / topic
Topic: close.

उपसंहारन्यायः: पूर्वं कुञ्चिकां देहि; सिद्धे फलं रक्ष; द्विः मा कुरु।

वृत्तमिति: ८-८-८-८।

श्लोकसूची / Verse index

१. Why keys
२. Client mint
३. Scope
४. Result store
५. TTL
६. Concurrency
७. Writes only
८. Fail vs success
९. Upstream
१०. Retry/outbox link
११. Five limbs
१२. Close

सन्दर्भाः / References
  1. Prior: retry 2026-08-14; outbox 2026-09-28; batch API 2026-10-03; notifications 2026-09-24.
  2. Domain: HTTP idempotency keys for side-effecting APIs.
  3. English is minimizable; Sanskrit-first default.
  4. Style: no em dash; no Oxford comma in English clauses.