Agentic API & Open Accounting Service
For Accountancy and Bookkeeping Processes
AI-Compatible REST API
Electronic document and financial reporting infrastructure built to the OpenAPI 3.0 standard for developers, external assistants (LLMs) and ERP integrations.
The system Vergi Merkezi | Mali Müşavirlik works in full sync with the client dashboard. You can manage bookkeeping, income/expense tracking and e-Invoice (e-Fatura) operations in JSON format through standard HTTP endpoints.
Integration model
The API uses JSON-based requests and standard HTTP methods. You choose whether to use ChatGPT, Claude, a corporate bot or a custom script on the client side; the same contract (OpenAPI 3) applies on the server side.
Any compatible HTTP client can make calls using a token; there is no dependency on a particular vendor.
Professional services are provided under 3568 sayılı Kanun, the applicable professional rules and the Personal Data Protection Law (KVKK). Professional Assurance
What Can You Do?
Accounting & Electronic Documents
Accounting & E-Invoice
You can list and approve incoming e-Invoices (inbox), issue new invoices, and record receipts and payments. You can officially submit drafts to GİB as e-Invoices (e-Fatura) with a single command.
Financial Reporting
Financial Reporting
Trial balances, income statements, balance sheets, VAT (KDV) summaries, customer/supplier, bank and cash statements, aged receivables/payables and cash flow reports are returned as JSON. The assistant can interpret and summarize this data.
Regulatory Compliance
Regulatory Compliance
Accountancy services are provided under 3568 sayılı Kanun and professional rules. Entries made through the API rely on the configured chart of accounts and user-entered data; automated regulatory advice is not provided.
Why interactive documentation instead of a static PDF?
Traditional e-invoicing and accounting API documentation in Türkiye usually consists of long, static files intended only for developers to read. Our "living" Swagger UI documentation provides modern infrastructure optimized for both developers and search/generative AI (GEO/SEO) engines:
- Instant Testing (Try it out): You do not need to write code to see how an accounting endpoint described on the page works. You can test it live with your own data.
- Compatible with LLMs and AI Agents: The infrastructure is designed to be machine-readable under the OpenAPI 3.0 standard so AI assistants such as ChatGPT, Claude and Perplexity can understand it and perform operations on their own.
- Always Up to Date (Single Source of Truth): PDFs become outdated, but Swagger UI directly reflects the system's live code. When tax legislation or API parameters change, the documentation synchronizes immediately.
Information: You can freely read the guide and inspect the data schemas (JSON) without a password. Only when you want to perform an actual electronic document or report operation using "Try it out" will you be asked, for your security, to enter the API token from your Client Dashboard via the lock icon.
Using the dashboard and the API
Typical differences for the same account (summary)
| Feature | Traditional Software | Via API |
|---|---|---|
| Data entry | Web interface | HTTP client or agent |
| Access | Browser | Programmatic (with a token) |
| Language | Interface language | Documentation and API are primarily in Turkish; the assistant's language is set on the client side |
| Reports | Dashboard views | JSON report endpoints |
| Integration | — | REST, OpenAPI 3, Bearer |
Connect your own AI
Connect your ChatGPT or Claude to the portal and issue invoices through conversation. There is no additional program to install.
The portal also works as an MCP (Model Context Protocol) server. This is a shared standard for connecting AI assistants to a system. Once you configure the portal in your assistant, you do not need to write code: describe what you want in everyday language, and the assistant performs the required operation in the portal.
Who pays for the AI?
You do. You use your own ChatGPT or Claude subscription; the portal only provides the data and operations. The portal therefore charges no additional AI fee for the connection. Sending electronic documents deducts document credits as usual.
1. Connection details
| Server address | https://dijital.vergimerkezi.com.tr/api/v1/mcp |
| Transport | Streamable HTTP (JSON-RPC 2.0) |
| Authentication | Authorization: Bearer <token> |
| Token | Get it from the «AI Agents API» section of your profile page; it is the same token used for the REST API. |
2. Configure your assistant
In the Claude desktop app, add the following entry to the configuration file (replace <token> with your own token):
{
"mcpServers": {
"vergi-merkezi": {
"type": "http",
"url": "https://dijital.vergimerkezi.com.tr/api/v1/mcp",
"headers": {
"Authorization": "Bearer <token>"
}
}
}
}
Other assistants that support custom connectors require the same three details: server address, Bearer as the authentication type and your token. Menu names may vary by product and version; if you get stuck contact us, and we can set up the connection together.
3. What can you say after connecting?
Issue an invoice
«Issue a consulting invoice for 12.000 TL to Ahmet Ticaret.»
Check recipient
«Is this tax number registered for e-Fatura?»
Report
«How is my profit this year? Show it by month.»
Account (Customer/Supplier)
«What is Mehmet Ltd's balance? Generate its account statement.»
AI cannot issue invoices on its own
- The assistant first prepares a draft. At this stage, nothing is sent to GİB and no credits are used.
-
You are shown a summary of the draft. To send it, you must provide the confirmation phrase given to you by the assistant (such as
GÖNDER-42). The assistant cannot generate this phrase itself. - A submitted electronic document cannot be recalled; read the summary before confirming.
- Submission is rejected if you have no credits left, the document has already been sent, or the document is a purchase invoice.
- Document deletion also requires two steps and is unavailable for closed periods.
Tools available to the assistant
| Subject | Tools |
|---|---|
| Companies and master records | get_companies, lookup_caris, lookup_items, lookup_bank_accounts, lookup_cash_registers, lookup_chart_of_accounts |
| Accounting | get_accounting_categories, record_invoice_draft, confirm_draft, update_document, propose_delete, confirm_delete, record_collection, record_payment |
| Report | get_reports_summary, get_reports_documents, get_reports_vat, get_cari_statement |
| Electronic Documents | get_einvoice_readiness, check_einvoice_recipient, create_sales_invoice_draft, send_einvoice, get_einvoice_status |
The current list is always available in the assistant; it reads the tool catalog when it connects. Electronic document tools work only for companies with e-Invoice (e-Fatura), e-Archive invoice (e-Arşiv) or electronic self-employment receipt (e-SMM) services enabled.
Technical Documentation
API address, authentication and endpoints — with code examples
1. API base address (Base URL)
Send all requests to this address. Adjust it to your environment.
https://dijital.vergimerkezi.com.tr/api/v1
2. Authentication
The token belongs to your client account; there is no separate token per company. Two options: (A) In the client dashboard, select Profile — «Create new token». (B) Programmatically: POST https://dijital.vergimerkezi.com.tr/api/v1/auth/login is used to send your email and password; the response returns data.token . Each successful login generates a new token and invalidates the previous one. With every request, include Authorization: Bearer <token> as a header.
Authorization: Bearer YOUR_API_TOKEN
3. Endpoint summary
| Method | Path | Description |
|---|---|---|
| POST | /auth/login | Get a Bearer token using email/password (throttled; previous token invalidated) |
| GET | /agent/companies | Companies linked to this account (then use company_id in requests) |
| GET | /agent/products | Product/service and credit list |
| POST | /agent/orders | Create an order (returns checkout_url) |
| GET | /agent/orders/{id} | Order status |
| — Company formation application — | ||
| GET | /agent/formation | Formation application list |
| POST | /agent/formation | Create a new formation application |
| GET | /agent/formation/{id} | Application status |
| — Reference data (customer/supplier / bank / cash / inventory / chart of accounts) — | ||
| GET | /agent/lookup/caris | Customer/supplier list (search, type?, has_balance?) |
| POST | /agent/lookup/caris | Create a customer/supplier account |
| GET | /agent/lookup/caris/{id} | Single customer/supplier account details |
| GET | /agent/lookup/bank-accounts | Bank accounts (currency?) |
| GET | /agent/lookup/cash-registers | Cash accounts (currency?) |
| GET | /agent/lookup/items | Inventory record / product-service (search, type?) |
| POST | /agent/lookup/items | Create an inventory record |
| GET | /agent/lookup/chart-of-accounts | Chart of accounts — company using balance-sheet accounting (root_type?, search?) |
| — Accounting entries — | ||
| GET | /agent/accounting/categories | Expense categories (invoice recording) |
| POST | /agent/accounting/record-invoice | Record an invoice directly (no confirmation) |
| POST | /agent/accounting/record-invoice-draft | Create draft → user confirmation → confirm-draft (recommended) |
| POST | /agent/accounting/confirm-draft/{id} | Finalize the draft (document_id) |
| POST | /agent/accounting/propose-delete/{id} | Propose deletion: returns a summary + confirmation phrase |
| POST | /agent/accounting/confirm-delete/{id} | Confirm deletion — confirmation phrase required |
| GET | /agent/accounting/document/{id} | Single document details (?company_id=) |
| PATCH | /agent/accounting/document/{id} | Update a draft/pending document |
| POST | /agent/accounting/record-collection | Record a receipt (supports Idempotency-Key) |
| POST | /agent/accounting/record-payment | Record a payment (supports Idempotency-Key) |
| POST | /agent/accounting/record-cash-transaction | Cash inflow/outflow |
| POST | /agent/accounting/record-bank-transfer | Transfer between bank accounts |
| POST | /agent/accounting/record-stock-movement | Inventory movement |
| — Statements and reports — | ||
| GET | /agent/lookup/cari-statement | Customer/supplier account statement |
| GET | /agent/lookup/bank-statement | Bank statement |
| GET | /agent/lookup/cash-statement | Cash account statement |
| GET | /agent/reports/trial-balance | Trial balance (company_id, year, month?) |
| GET | /agent/reports/income-statement | Income statement / profit (company_id, year) |
| GET | /agent/reports/vat | VAT (KDV) summary (company_id, year, month?) |
| GET | /agent/reports/summary | Annual summary with monthly income/expenses/net |
| GET | /agent/reports/documents | Document list (date range, type filter) |
| GET | /agent/reports/aged-receivables | Aged receivables |
| GET | /agent/reports/aged-payables | Aged payables |
| GET | /agent/reports/balance-sheet | Balance sheet summary |
| GET | /agent/reports/cash-flow | Cash flow summary |
4. Code example: Company list (cURL)
First, the Bearer token verifies the client's identity; the response returns the companies linked to that account. In order, accounting and report requests, use the company's id from this list as company_id. Successful response body: success, data (e.g. data.companies).
curl -s -X GET "https://dijital.vergimerkezi.com.tr/api/v1/agent/companies" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
5. Code example: Record an invoice in accounting (cURL)
Example to send when the assistant says «record this invoice». Obtain company_id with GET companies.
Note: This endpoint records the document directly; there is no user confirmation. If you want user confirmation, use the record-invoice-draft + confirm-draft flow.
curl -s -X POST "https://dijital.vergimerkezi.com.tr/api/v1/agent/accounting/record-invoice" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company_id": 1,
"type": "gider",
"invoice_date": "2026-06-15",
"amount": 1180.00,
"supplier_name": "Örnek Tedarikçi A.Ş.",
"supplier_tax_id": "1234567890",
"invoice_no": "FTR-2026-001",
"category": "other",
"description": "Ofis malzemeleri",
"matrah": 1000.00,
"kdv_amount": 180.00,
"kdv_rate": 18
}'
6. Code example: Draft → Confirmation flow
First create a draft, show the summary to the user, and finalize it with confirm-draft after confirmation.
# 1) Create a draft
curl -s -X POST "https://dijital.vergimerkezi.com.tr/api/v1/agent/accounting/record-invoice-draft" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"company_id":1,"type":"gider","invoice_date":"2026-06-15","amount":1180}'
# Response (inside data): document_id, draft_summary, confirm_url
# 2) Finalize after user confirmation (id = document_id)
curl -s -X POST "https://dijital.vergimerkezi.com.tr/api/v1/agent/accounting/confirm-draft/DOCUMENT_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN"
No request body is needed. Use the same Bearer token as the user who created the draft (the document matches user_id).
7. Code example: Document deletion — two-step confirmation
The assistant can never delete a document in a single step. It first obtains the document summary and confirmation phrase using propose-delete and shows them to the user; if the user confirms, confirm-delete completes the deletion.
# 1) Propose deletion (returns document summary + confirmation phrase, DOES NOT DELETE)
curl -s -X POST "https://dijital.vergimerkezi.com.tr/api/v1/agent/accounting/propose-delete/DOCUMENT_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Response: data.confirm_phrase = "SİL-DOCUMENT_ID"
# Show this phrase to the user and obtain confirmation.
# 2) Delete after user confirmation
curl -s -X POST "https://dijital.vergimerkezi.com.tr/api/v1/agent/accounting/confirm-delete/DOCUMENT_ID" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirmation": "SİL-DOCUMENT_ID"}'
Returns 422 if the confirmation phrase does not match or the period is closed. Finalized (posted) period entries cannot be deleted.
8. Code example: Annual summary report (income/expenses/net)
Used for questions such as «What is my annual profit?» or «June status». Applies to all company types.
curl -s -X GET "https://dijital.vergimerkezi.com.tr/api/v1/agent/reports/summary?company_id=1&year=2026" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Response inside data: monthly[] (income, expense, net for each month), total_income, total_expense, total_net.
9. Code example: Python (requests)
import requests
BASE = "https://dijital.vergimerkezi.com.tr/api/v1"
TOKEN = "YOUR_API_TOKEN"
headers = {"Authorization": f"Bearer {TOKEN}", "Accept": "application/json"}
# Company list
r = requests.get(f"{BASE}/agent/companies", headers=headers)
companies = r.json()["data"]["companies"]
# Annual summary (first company)
cid = companies[0]["id"]
r = requests.get(f"{BASE}/agent/reports/summary", params={"company_id": cid, "year": 2026}, headers=headers)
summary = r.json()["data"]
10. OpenAPI and discovery
- Interactive documentation (Swagger UI): https://dijital.vergimerkezi.com.tr/api/v1/docs — Endpoints grouped by tags, testing (Try it out) and deep linking.
- OpenAPI 3.0 (raw JSON): https://dijital.vergimerkezi.com.tr/api/v1/openapi.json — Endpoint list and request/response schemas.
- Discovery: https://dijital.vergimerkezi.com.tr/.well-known/agent-api — Machine-readable JSON summary.
Quick start (3 steps)
- Log in — Client login takes you to the dashboard.
- Create a token — In your profile, under «AI Agents API»: the token belongs to your client account and is valid for all linked companies. Select «Create new token» or «Email me the token».
- Configure your assistant — In your Custom GPT, Claude or integration, set Base URL =
https://dijital.vergimerkezi.com.tr/api/v1and Authorization: Bearer <token>; select the company in API calls usingcompany_id.
If you do not want to write code, instead of step 3 see «Connect your own AI» for instructions: configure the portal once in ChatGPT or Claude, then do the rest through conversation.
If you do not have an account, start with apply or contact to proceed.