reseller
PUT /v1/reseller/ai/credits/settings
When to warn you your pool is low, and whether to refill it automatically.
प्रमाणन
बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास reseller.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।
जहां आपकी संगठन आईडी आती है
यह एंडपॉइंट org_id को एक क्वेरी पैरामीटर के रूप में लेता है। इसे छोड़ दें और कॉल आपकी पूरी टेनेंसी सबट्री को कवर करेगी; कॉल को किसी एक संगठन तक सीमित करने के लिए इसे भेजें।
आपकी ऑर्गनाइजेशन आईडी आपके डैशबोर्ड पर एपीआई कीज़ स्क्रीन पर, की के ठीक बगल में मौजूद है। यह आपके द्वारा की जाने वाली हर कॉल में समान आईडी होती है।
इसे आज़माएँ
कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।
curl -X PUT https://api.zinndigital.com/v1/reseller/ai/credits/settings \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "low_pool_threshold_micros": <integer>, "auto_buy_enabled": <boolean> }'साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें
विवरण
`low_pool_threshold_micros` of `0` means "work it out from what I actually allocate" — two allocations' worth of head-room, which means the same thing to a reseller moving thousands and to one with three clients. `auto_buy_enabled` is **off** unless you switch it on: it charges your card without anybody clicking, so it is never a default. `auto_buy_monthly_cap_micros` of `0` means four packs' worth of the pack you chose — a cooldown is not a ceiling. Saving clears any standing low-pool notice, so a new threshold warns you again at the new line. Requires `reseller.manage`.
पैरामीटर
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
org_id (query) | Uuid | नहीं | Which of your organizations this applies to. |
अनुरोध बॉडी
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
low_pool_threshold_micros | integer | हाँ | `0` = derive it from what you allocate. |
auto_buy_enabled | boolean | हाँ | Buy a pack from Zinn® automatically when your pool cannot cover a client's purchase. Off unless you turn it on — it charges your card with nobody watching. |
auto_buy_pack_code | string | नहीं | Blank = the smallest pack that covers the shortfall, resolved when it fires. |
auto_buy_monthly_cap_micros | integer | नहीं | `0` = four of the chosen pack. A cooldown is not a ceiling. |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
low_pool_threshold_micros | integer | हाँ | — |
auto_buy_enabled | boolean | हाँ | — |
auto_buy_pack_code | string | हाँ | — |
auto_buy_monthly_cap_micros | integer | हाँ | — |
is_low | boolean | हाँ | — |
त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है
401 · 403 · 404 · 422 · 429