G-Ledger

حساب الأستاذ — لكل القطاعات
REST API v1

G-Ledger Public API v1

Connect your external systems (Odoo, Bayzat, Workday, etc.) directly to G-Ledger via REST API

Base URL

https://app.g-ledger.com/api/v1/

Authentication

All requests require an API key sent in the Authorization header as a Bearer Token. Get your key from Settings.

Authorization: Bearer glk_your_api_key_here

Endpoints

MethodEndpointDescription
GET/api/v1/accountsList chart of accounts
GET/api/v1/journal-entriesList journal entries
POST/api/v1/journal-entriesCreate journal entry
GET/api/v1/customersList customers
POST/api/v1/customersCreate customer
GET/api/v1/vendorsList vendors
POST/api/v1/vendorsCreate vendor
GET/api/v1/productsList products
POST/api/v1/productsCreate product
GET/api/v1/invoicesList invoices
POST/api/v1/invoicesCreate invoice
GET/api/v1/employeesList employees
GET/api/v1/webhooksList available webhook events
POST/api/v1/webhooksRegister webhook to receive events

Response Format

All responses are JSON with a data field containing the results and a total field for count.

{ "data": [...], "total": 42, "page": 1, "limit": 50, "pages": 1 }

Pagination

Endpoints that support pagination accept page and limit parameters. Maximum limit is 100.

GET /api/v1/journal-entries?page=2&limit=25

Code Examples

GET Example
curl -X GET "https://app.g-ledger.com/api/v1/accounts" \
  -H "Authorization: Bearer glk_your_api_key_here" \
  -H "Content-Type: application/json"
POST Example
curl -X POST "https://app.g-ledger.com/api/v1/journal-entries" \
  -H "Authorization: Bearer glk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "2026-03-30",
    "description": "Sales revenue",
    "lines": [
      { "accountId": "acc_cash", "debit": 1150, "credit": 0 },
      { "accountId": "acc_revenue", "debit": 0, "credit": 1000 },
      { "accountId": "acc_vat", "debit": 0, "credit": 150 }
    ]
  }'

Error Codes

CodeDescription
401Unauthorized — invalid or missing API key
400Bad Request — missing or invalid data
404Not Found — resource does not exist
429Too Many Requests — wait before retrying
500Server Error — try again later

Rate Limiting

100 requests per minute per API key. When exceeded, you will receive a 429 Too Many Requests response.

Ready to Integrate?

Sign up now and get your API key in one minute