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 চেষ্টা করুন। সেখানে যা করেন তা বাইরের জগতে পৌঁছায় না।