Wafeq API:中东地区会计与电子发票 - Openclaw Skills
作者:互联网
2026-04-18
什么是 Wafeq API?
Wafeq API 技能为 Wafeq 平台提供了功能齐全的参考和集成工具集。Wafeq 是专门为中东(特别是阿联酋和沙特阿拉伯)量身定制的领先会计解决方案。它使开发人员和自动化代理能够与 Wafeq REST API 交互,以管理业务财务的各个方面,从生成标准和简化的税务发票到跟踪支出以及生成实时财务报表。通过利用 Openclaw Skills,您可以简化会计工作流程,并通过自动化的数据处理和管理确保符合地区税务法规。
下载入口:https://github.com/openclaw/skills/tree/main/skills/yordilorenzo/wafeq
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install wafeq
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 wafeq。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Wafeq API 应用场景
- 针对阿联酋和沙特阿拉伯的税务合规性,自动化 B2B 和 B2C 电子发票。
- 使用批量发票创建接口,将电子商务销售与 Wafeq 同步。
- 通过程序化记录账单和支出,管理应付账款。
- 为高级数据分析生成实时的损益表或资产负债表。
- 自动将报价单转换为发票,并记录未结余额的付款。
- 通过 Openclaw Skills 环境配置,使用 API 密钥或 OAuth2 令牌对 Wafeq 平台进行身份验证。
- 使用特定的实体 ID 前缀(如 cnt_ 或 inv_)识别目标资源,例如联系人、账户或发票。
- 执行标准 CRUD 操作或专门用于税务机关报告和 PDF 下载的接口。
- 利用幂等性密钥确保安全重试,并防止财务记录中的重复交易。
- 处理分页结果,以将大型数据集(如历史交易或客户列表)同步到您的本地环境中。
Wafeq API 配置指南
要开始使用此技能,请从您的 Wafeq 账户设置中获取 API 密钥。在终端中设置环境变量:
export WAFEQ_API_KEY='your-key-here'
或者,您可以在本地配置文件中配置该密钥,以启用 Openclaw Skills 访问 API:
{
"skills": {
"entries": {
"wafeq-api": {
"apiKey": "your-key-here"
}
}
}
}
Wafeq API 数据架构与分类体系
该技能通过带前缀的实体 ID 和遵循地区会计标准的结构化 JSON 有效负载来组织数据。主要资源包括:
| 资源 | ID 前缀 | 描述 |
|---|---|---|
| 联系人 | cnt_ | 客户和供应商档案 |
| 账户 | acc_ | 会计科目表和银行分录 |
| 发票 | inv_ | 标准及简化税务发票 |
| 账单 | bil_ | 供应商发票和记录的支出 |
| 付款 | pay_ | 针对发票的已记录付款 |
所有来自 Openclaw Skills 集成的响应都包含标准的分页元数据:count、next、previous 和 results。
name: wafeq-api
description: Complete Wafeq accounting & e-invoicing API reference for the Middle East (UAE, Saudi Arabia). Use when building integrations with Wafeq, creating/managing invoices (standard, simplified, bulk), contacts, accounts, bills, expenses, credit/debit notes, payments, payslips, quotes, items, files, manual journals, reports (P&L, balance sheet, cash flow, trial balance), branches, cost centers, employees, projects, warehouses, or any task involving the Wafeq REST API.
metadata: {"openclaw":{"emoji":"??","homepage":"https://wafeq.com","primaryEnv":"WAFEQ_API_KEY","requires":{"env":["WAFEQ_API_KEY"]}}}
Wafeq API Skill
Complete API reference for the Wafeq accounting and e-invoicing platform.
Setup
To use this skill, you need a Wafeq API key:
- Log in to Wafeq
- Go to Settings → API Keys (direct link)
- Create a new API key
- Set the environment variable:
Or configure inexport WAFEQ_API_KEY='your-key-here'~/.openclaw/openclaw.json:{ "skills": { "entries": { "wafeq-api": { "apiKey": "your-key-here" } } } }
?? Security: Never hardcode your API key in code, prompts, or skill files. Always use the
WAFEQ_API_KEYenvironment variable or configure it viaskills.entries.wafeq-api.apiKeyin~/.openclaw/openclaw.json.
You can validate your setup by running scripts/setup.sh from the plugin root.
Quick Reference
- Base URL:
https://api.wafeq.com/v1/ - Auth (API Key):
Authorization: Api-Key $WAFEQ_API_KEY— get keys athttps://app.wafeq.com/c/api-keys - Auth (OAuth2):
Authorization: Bearer— contact Wafeq for client credentials - Idempotency:
X-Wafeq-Idempotency-Key:on POST/PUT/PATCH/DELETE (1hr cache, replayed response includesX-Wafeq-Idempotent-Replayed: true) - Pagination:
?page=1&page_size=25— response:{ count, next, previous, results[] } - Content-Type:
application/json - Currency codes: ISO 4217 (full list in references/enums.md)
- Entity IDs: Prefixed strings (e.g.
cnt_...,acc_...,inv_...)
Standard CRUD Pattern
Most resources follow: POST /{resource}/, GET /{resource}/, GET /{resource}/{id}/, PUT /{resource}/{id}/, PATCH /{resource}/{id}/, DELETE /{resource}/{id}/. Some also have GET /{resource}/{id}/download/ for PDF.
Line items are nested: /{resource}/{parent_id}/line-items/ with the same CRUD pattern.
Reference Files
| File | Contents |
|---|---|
| references/core-concepts.md | Authentication (API Key + OAuth2), idempotency, error handling, quickstart guide, invoice creation walkthrough, use cases (B2B, B2C, e-commerce, expense management) |
| references/enums.md | All 18 enum types: currencies, statuses, classifications, tax types, discount types, languages |
| references/invoices.md | Standard invoices, invoice line items, bulk invoices (api-invoices), simplified invoices, simplified invoice line items — full CRUD + schemas |
| references/accounts-banking-contacts.md | Chart of accounts, bank accounts, bank ledger transactions, bank statement transactions, contacts, beneficiaries — full CRUD + schemas |
| references/bills-expenses-notes.md | Bills, bill line items, expenses, credit notes, credit note line items, bulk credit notes, debit notes, debit note line items — full CRUD + schemas |
| references/quotes-payments-remaining.md | Quotes, payments, payment requests, payslips, items, files, manual journals, journal line items, reports (balance sheet, P&L, cash flow, trial balance), organization, tax rates, branches, cost centers, employees, projects, warehouses — full CRUD + schemas |
Common Workflows
Create and Send an Invoice
- Create contact:
POST /contacts/ - Get revenue account:
GET /accounts/?classification=REVENUE - Get tax rates:
GET /tax-rates/ - Create invoice:
POST /invoices/(withline_items,contact,currency,invoice_date,invoice_due_date,invoice_number) - Report to tax authority:
POST /invoices/{id}/tax-authority/report/ - Download PDF:
GET /invoices/{id}/download/
Bulk Send Invoices (E-Commerce / High Volume)
POST /api-invoices/bulk_send/with array of invoice objects includingchannelsfor email delivery- Response:
{ "queued": N } - Generate summary:
GET /api-invoices/summary/
Record Expense
- Get expense account:
GET /accounts/?classification=EXPENSE - Create expense:
POST /expenses/withpaid_through_account,contact,date,currency,tax_amount_type,line_items
Record Payment Against Invoice
POST /payments/withinvoice_paymentsarray linking to invoice IDs and amounts
Generate Financial Reports
- Balance Sheet:
GET /reports/balance-sheet/?currency=SAR&date=2025-12-31 - Profit & Loss:
GET /reports/profit-and-loss/?currency=SAR&date_after=2025-01-01&date_before=2025-12-31 - Cash Flow:
GET /reports/cash-flow/?currency=SAR&date_after=2025-01-01&date_before=2025-12-31 - Trial Balance:
GET /reports/trial-balance/?from_date=2025-01-01&to_date=2025-12-31
Quote to Invoice Conversion
- Create quote:
POST /quotes/ - Convert to invoice:
POST /quotes/{id}/invoice/
Important Notes
- Tax authority reporting is available for invoices, simplified invoices, and credit notes via
POST /{resource}/{id}/tax-authority/report/ - Simplified invoices are for B2C transactions (no buyer tax registration required)
- Standard invoices are for B2B transactions
- Place of supply field is UAE-specific (emirate codes or
OUTSIDE_UAE) - Use
referencefields as unique identifiers to prevent duplicate creation
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Axum Code Review: 自动化 Rust Web 框架审计 - Openclaw Skills
美股 IPO 扫描器:早期信号发现 - Openclaw Skills
中国照明采购:LED 与智能照明情报 - Openclaw Skills
Agent Matchmaking: 自主发现与信任匹配 - Openclaw Skills
TweetNugget:精选技术与哲学语录 - Openclaw Skills
河南油田 PPT 生成器:专业演示文稿自动化 - Openclaw Skills
BS Detector:从长消息中提取核心真相 - Openclaw Skills
腾讯云智能顾问:云架构管理 - Openclaw Skills
落地页构建器:自动化 HTML 与转化优化 - Openclaw Skills
ToolDeck:个人 AI 工具与服务数据库 - Openclaw Skills
AI精选
