المصروفات

إنشاء المصروفات لا يُحتسب في العداد (مجاني) لكنه يتطلب باقة API نشطة. مع accountCode (دليل إستونيا) تُشتق الفئة تلقائيًا؛ ومع taxRate يُحسب الصافي والضريبة تلقائيًا.

نقاط النهاية

POST/expensesالصلاحية: write:expenses

ينشئ مصروفًا (بحالة APPROVED).

مثال طلب

curl -X POST -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  https://corpenza.com/api/external/accounting/expenses -d '{
  "description": "GitHub subscription",
  "amount": 48.80,
  "taxRate": 24,
  "vatIncluded": true,
  "accountCode": "40644",
  "vendor": "GitHub",
  "vendorCountry": "US"
}'

مثال استجابة

{
  "id": "exp_...",
  "accountCode": "40644",
  "netAmount": 39.35,
  "taxAmount": 9.45,
  "status": "APPROVED"
}
GET/expensesالصلاحية: read:expenses

قائمة المصروفات.