API कुंजियाँ और स्कोप
कोई कुंजी क्या पढ़ और लिख सकती है, और उसे बनाने वाले व्यक्ति से कौन-सी सीमाएँ मिलती हैं।
Authorization: Bearer fx_live_…
हर कुंजी जिन नियमों का पालन करती है
- कुंजी एक बार दिखाई जाती है; केवल उसका SHA-256 हैश रखा जाता है
- कुंजी केवल वही क्षेत्र कवर कर सकती है जो उसका निर्माता खोल सकता है; सभी क्षेत्रों वाली कुंजी केवल वर्कस्पेस मालिक के लिए है
- कुंजी अपने निर्माता की शाखाओं और कंपनियों के भीतर काम करती है, जैसे बैक ऑफ़िस में वह व्यक्ति; इससे बने रिकॉर्ड उसी व्यक्ति की शाखा में जाते हैं
- निर्माता निष्क्रिय या हटाए जाने पर कुंजी काम करना बंद कर देती है
- कुंजियाँ समाप्त हो सकती हैं और कभी भी रद्द की जा सकती हैं; हर अनुरोध अनुरोध लॉग में है
कुंजी पहचानना
हर कुंजी fx_live_ से शुरू होती है। कुंजियों की सूची उसके पहले 14 अक्षर दिखाती है, ताकि पूरी कुंजी देखे बिना कुंजियाँ अलग पहचानी जा सकें।
अगर कोई कुंजी लीक हो जाए
- उसे तुरंत Admin → Integrations & API में रद्द करें; अगले अनुरोध से वह काम नहीं करेगी
- उन्हीं स्कोप के साथ नई कुंजी बनाएँ और अपने सिस्टम अपडेट करें
- अनुरोध लॉग में अनजान कॉल देखें
- अगर कुंजी लिख सकती थी, तो उसके बनाए रिकॉर्ड जाँचें
नीचे का संदर्भ OpenAPI दस्तावेज़ की तरह अंग्रेज़ी में है।
स्कोप
customers:read | List and read customers |
customers:write | Create customers and update their contact details |
quotations:read | List and read quotations (with items) |
quotations:write | Create draft quotations |
invoices:read | List and read invoices (with items and payments) |
invoices:write | Create draft invoices |
orders:read | List and read shop orders |
inquiries:read | List and read leads |
inquiries:write | Create leads (goes through the same notifications as the website form) |
products:read | List and read products with stock |
webhooks:read | Read the webhook event catalog and delivery log |
payments:read | List and read invoice payments |
stock:read | Read stock locations and stock levels |
stock:write | Add or remove stock (adjustments, write-offs) |
appointments:read | List and read appointments |
pos:read | List and read till sales and refunds |
tasks:read | List and read tasks |
tasks:write | Create tasks and change them (status, due date, priority) |
attachments:write | Upload photos and PDFs (optionally onto a task) |
sensors:write | Upload readings of sensor devices (temperature, humidity, fuel level) — Sensors & cold chain |
catalog:read | Read the catalog: products, product categories, services and bookable services |
bookings:read | Read appointments and free time slots |
bookings:write | Book appointments (same checks as online booking) |
webhooks:write | List, create and delete webhook endpoints |
अगला: सैंडबॉक्स वर्कस्पेस
नमूना डेटा वाले निजी डेमो वर्कस्पेस पर API आज़माएँ। वहाँ आप जो भी करें, बाहर की दुनिया तक नहीं पहुँचता।