Abacus Web API
A REST service used to transfer purchase/sales invoices and vouchers from your agency and operator applications into Abacus. Protected with a token, supports JSON and XML bodies.
How it works
The Abacus Web API lets agency and operator software read accounting account definitions and transfer purchase/sales invoices and collection/payment vouchers into Abacus. All requests are authorized with a Bearer token.
| Base address | {{baseUrl}} — specific to your installation |
|---|---|
| Authentication | OAuth (Microsoft.Owin) — Bearer token |
| Data format | JSON or XML (invoice transfer accepts both) |
| Character set | UTF-8 |
Before starting the integration, obtain your username, password and connection details and your base address from the Abacus team.
Getting a token
You obtain an access token by sending a POST to the /token endpoint with your credentials. Use the returned access_token in the Authorization header of all subsequent requests.
# Request — body (form)
POST {{baseUrl}}/token
username=PRGRUSER&password=PRGPASWORD&grant_type=password&connection=PRGCONNECTION
// Response { "access_token": "4ZVKa96Egt0Ep1MkQUXVKb9NrDsvMfAtS245AN4dL1hi...", "token_type": "bearer", "expires_in": 86399 }
For subsequent requests:
GET {{baseUrl}}/api/values/getintaccounts
Authorization: Bearer ACCESS_TOKEN
Tokens are time-limited (expires_in seconds ≈ 1 day). When it expires, get a new token via /token.
Accounting Definitions
Before transferring invoices, read the account code, user, currency and cost center definitions and map them. The Code field is generally used for mapping.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/values/getintaccounts | Accounting account codes (Code for mapping). |
| GET | /api/values/Geinttusers | Accounting users. |
| GET | /api/values/getintcurrencies | Currencies (USD, EUR, TRY…). |
| GET | /api/values/getcostaccounts | Cost centers. |
| GET | /api/values/InsertCard?code1=&code2=&code3=&accountname= | Creates a new account code; the Code in the response is the newly created code. |
| POST | /api/values/UpdateAccCard | Create a detailed account/customer card (address, tax, e-invoice info). |
// GET /api/values/getintaccounts — sample response [ { "Id": 338, "Code": "120.08.235", "Name": "YAZ TUR" }, { "Id": 689, "Code": "100.01.001", "Name": "MUHASEBE TL KASA" } ]
Invoice / Voucher Transfer
All purchase/sales invoices and collection/payment vouchers are sent to a single endpoint. The transaction type is determined by the DocType and IsSlip fields in the body. The body can be JSON or XML.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/values/updateintegration | Transfers an invoice/voucher. The id in the response is the accounting voucher number — keep it. |
| GET | /api/values/integrationreturn?SlipNo=900 | Reverses a transferred voucher (SlipNo = previous id). |
Example — Sales invoice (JSON)
POST {{baseUrl}}/api/values/updateintegration
Authorization: Bearer ACCESS_TOKEN
{
"Tarih": "2025-01-17",
"CariKod": "120.01.024",
"EvrakNo": "123456789",
"Kur": 3.45,
"DovizCinsiString": "USD",
"DocType": 1,
"IsSlip": 0,
"Kaynak": "Sejour",
"KayitEdenString": "Sejour",
"EACustName": "Zeytindalı yazılım",
"EAEmail": "sample@company.com",
"EAIdNo": "9300199600",
"Detay": [
{
"HesapKod": "600.01.002",
"DovizCinsiString": "USD",
"DovizTutar": 109.8,
"Kdv": 10,
"Kur": 29.5481,
"ResNo": "PX061022",
"ResServiceName": "ADORA GOLF HOTEL",
"ResGuestName": "ALİ VELİ",
"GirisTarihi": "2017-01-11",
"CikisTarihi": "2017-01-12"
}
]
}
Example — Sales invoice (XML)
<?xml version="1.0" encoding="UTF-8"?>
<Icmal>
<Tarih>2017-01-17</Tarih>
<CariKod>120.01.024</CariKod>
<EvrakNo>SGB2017000000066</EvrakNo>
<Kur>3,45</Kur>
<DovizCinsiString>USD</DovizCinsiString>
<DocType>1</DocType>
<IsSlip>0</IsSlip>
<Kaynak>Sejour</Kaynak>
<KayitEdenString>Sejour</KayitEdenString>
<Detay>
<HesapKod>600.01.002</HesapKod>
<DovizCinsiString>USD</DovizCinsiString>
<DovizTutar>109,8</DovizTutar>
<Kdv>0</Kdv>
<Kur>3,45</Kur>
</Detay>
</Icmal>
Response
{
"id": 2500,
"error": "",
"GuidId": "05b34756-cbf2-472f-b223-a379c56f5059"
}
id: The accounting voucher number; keep it for reversal. error: Empty/null means the transfer succeeded, otherwise it is the error message.
DocType & IsSlip
The type of document you send is determined by these two fields:
| Transaction | DocType | IsSlip |
|---|---|---|
| Sales Invoice | 1 | 0 |
| Sales Return Invoice | 2 | 0 |
| Purchase Invoice | 3 | 0 |
| Purchase Return Invoice | 4 | 0 |
| Collection Voucher | 3 | 1 |
| Payment Voucher | 1 | 1 |
Query & Preview
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/values/GetInvoiceReportX | Report of sent invoices (date and document number range). |
| PUT | /api/values/GetSlipListX | Voucher list (GuidId + voucher range). |
| GET | /api/default/GetInvoiceHtml?eguideid= | HTML preview of the invoice. |
| GET | /api/default/GetInvoiceByte?eguideid= | PDF (byte) preview of the invoice. |
// POST /api/values/GetInvoiceReportX — body { "DateBegin": "2024-01-01T00:00:00", "DateEnd": "2024-12-31T00:00:00", "VoucherNoBegin": 1, "VoucherNoEnd": 100 }
Icmal & Detay fields
Fields of the Icmal (invoice header) and Detay (line) models used in invoice transfer. ✅ indicates required fields.
Icmal (invoice header) fields
| Field | Description | Type | Required |
|---|---|---|---|
Tarih | Invoice date | DateTime | ✅ |
CariKod | Finance parent account code | string | ✅ |
Kur | Exchange rate (e.g. 36.5544 or 0) | decimal | ✅ |
DovizCinsiString | Currency (USD, EUR…) | string | ✅ |
DocType | 1:Sales, 2:Sales return, 3:Purchase, 4:Purchase return | byte | ✅ |
IsSlip | 1:Voucher, 0:Invoice | byte | ✅ |
Kaynak | Source (Sejour, biziclick, tourvisio) | string | ✅ |
KayitEdenString | Username who recorded it | string | ✅ |
Detay | Invoice detail lines | List | ✅ |
EvrakNo / EvrakSeri | Document number / series | string | ❌ |
Aciklama | Invoice description | string | ❌ |
IsEInv | Is it an e-invoice? | bool? | ❌ |
EACustName | Buyer title | string | ❌ |
EAAddress | Buyer address | string | ❌ |
EAEmail | Buyer email | string | ❌ |
EAIdNo | Buyer tax/ID number | string | ❌ |
EATaxOffice | Buyer tax office | string | ❌ |
TicketNo | Ticket number | string | ❌ |
Attachments | Attachment name/path | string | ❌ |
Detay (line) fields
| Field | Description | Type | Required |
|---|---|---|---|
HesapKod | Finance account code | string | ✅ |
DovizTutar | Currency amount (line total) | decimal | ✅ |
Kdv | VAT rate | int | ✅ |
Kur | Exchange rate | decimal | ✅ |
Aciklama1 / Aciklama2 | Line description | string | ❌ |
GirisTarihi / CikisTarihi | Booking check-in / check-out date | DateTime? | ❌ |
ResNo | Booking number | string | ❌ |
ResInfo | Booking pax info | string | ❌ |
ResServiceName | Service name (e.g. hotel name) | string | ❌ |
ResGuestName | Guest name | string | ❌ |
ResCountry | Guest country | string | ❌ |
MasrafMerkezi / MasrafMerkeziId | Cost center | string / int? | ❌ |
TLTutar | Amount in TRY | decimal? | ❌ |
F1…F6 | Custom fields (customer name, voucher, room type…) | string | ❌ |
Let's start the integration
Get your username, password and connection details; try the endpoints right away with the ready-made requests in the collection.