API 密钥与权限范围
密钥可以读取和写入哪些数据,以及它从创建者那里继承的分支和权限限制。
Authorization: Bearer fx_live_…
每个密钥都遵守的规则
- 密钥只显示一次;只存储其 SHA-256 哈希
- 密钥只能覆盖其创建者能打开的区域;全区域密钥仅限工作区所有者
- 密钥在其创建者的分支和公司范围内工作,与该人员在后台一样;它创建的记录归入该人员的分支
- 创建者被停用或删除后,密钥停止工作
- 密钥可以设置过期,并可随时撤销;每个请求都记录在请求日志中
识别密钥
每个密钥都以 fx_live_ 开头。密钥列表显示其前 14 个字符,无需查看完整密钥即可区分。
密钥泄露时
- 立即在 管理 → 集成与 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。您在那里所做的一切都不会到达外部世界。