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.

Overview

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
AuthenticationOAuth (Microsoft.Owin) — Bearer token
Data formatJSON or XML (invoice transfer accepts both)
Character setUTF-8
i

Before starting the integration, obtain your username, password and connection details and your base address from the Abacus team.

Authentication

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.

Reference Data

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.

MethodEndpointDescription
GET/api/values/getintaccountsAccounting account codes (Code for mapping).
GET/api/values/GeinttusersAccounting users.
GET/api/values/getintcurrenciesCurrencies (USD, EUR, TRY…).
GET/api/values/getcostaccountsCost 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/UpdateAccCardCreate 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" }
]
Core Integration

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.

MethodEndpointDescription
POST/api/values/updateintegrationTransfers an invoice/voucher. The id in the response is the accounting voucher number — keep it.
GET/api/values/integrationreturn?SlipNo=900Reverses 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"
}
i

id: The accounting voucher number; keep it for reversal. error: Empty/null means the transfer succeeded, otherwise it is the error message.

Document Types

DocType & IsSlip

The type of document you send is determined by these two fields:

TransactionDocTypeIsSlip
Sales Invoice10
Sales Return Invoice20
Purchase Invoice30
Purchase Return Invoice40
Collection Voucher31
Payment Voucher11
Query

Query & Preview

MethodEndpointDescription
POST/api/values/GetInvoiceReportXReport of sent invoices (date and document number range).
PUT/api/values/GetSlipListXVoucher 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
}
Data Models

Icmal & Detay fields

Fields of the Icmal (invoice header) and Detay (line) models used in invoice transfer. ✅ indicates required fields.

Icmal (invoice header) fields
FieldDescriptionTypeRequired
TarihInvoice dateDateTime
CariKodFinance parent account codestring
KurExchange rate (e.g. 36.5544 or 0)decimal
DovizCinsiStringCurrency (USD, EUR…)string
DocType1:Sales, 2:Sales return, 3:Purchase, 4:Purchase returnbyte
IsSlip1:Voucher, 0:Invoicebyte
KaynakSource (Sejour, biziclick, tourvisio)string
KayitEdenStringUsername who recorded itstring
DetayInvoice detail linesList
EvrakNo / EvrakSeriDocument number / seriesstring
AciklamaInvoice descriptionstring
IsEInvIs it an e-invoice?bool?
EACustNameBuyer titlestring
EAAddressBuyer addressstring
EAEmailBuyer emailstring
EAIdNoBuyer tax/ID numberstring
EATaxOfficeBuyer tax officestring
TicketNoTicket numberstring
AttachmentsAttachment name/pathstring
Detay (line) fields
FieldDescriptionTypeRequired
HesapKodFinance account codestring
DovizTutarCurrency amount (line total)decimal
KdvVAT rateint
KurExchange ratedecimal
Aciklama1 / Aciklama2Line descriptionstring
GirisTarihi / CikisTarihiBooking check-in / check-out dateDateTime?
ResNoBooking numberstring
ResInfoBooking pax infostring
ResServiceNameService name (e.g. hotel name)string
ResGuestNameGuest namestring
ResCountryGuest countrystring
MasrafMerkezi / MasrafMerkeziIdCost centerstring / int?
TLTutarAmount in TRYdecimal?
F1…F6Custom 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.