IntegService API Guide

IntegService is the REST service that shares data from SGO, DBHSOFT's sales and distribution software, with external systems. Your ERP, accounting or e-commerce system uses it to pull slips and invoices, create orders, and read or write customer, payment, product, price and stock data.

Every method works the same way: first get a token with your user name and password, then send that token in the Authorization header of every request. What you can see depends on the permissions set up for your account (method role, distributor, slip type, balance). Requests and responses are JSON.

If you are new, read Overview, Authentication and Permissions in that order, then go to the page of the method you need. Each method page lists the address, the request fields (required ones are marked), a sample request and a sample response.

Contents

Overview

What the service does, address prefixes, test/live environments and the common response envelope.

1. Authentication (getting a token)

Getting a 30-day token with user name and password, and sending it with requests.

2. Permissions

Method role, distributor, slip type and balance permissions, which decide what data you see.

3. Slip export request

Exporting slips by date range and filters with getinv: request fields and what is required.

4. Example requests

Ready-to-use curl and JSON samples for getting a token and exporting slips.

5. Response structure

Field-by-field description of slips, customers, items and discounts in the export response.

6. Error codes and common situations

HTTP status codes, error messages and fixes for common problems.

7. Invoices and orders

Reading, creating, revising, cancelling slips and orders, and checking their status.

8. Customers, reports and properties

Customer cards, adding/updating customers, account statement report and property lists.

9. Payments

Reading and writing collections, payments, service invoices and balance adjustments.

10. Products

Product card, unit, price, property, translation and suggested order methods.

11. Stocks and token check

Warehouse and distributor stock, past stock report and token validity check.


DBHSOFT · IntegService API Guide · Version 1.0

Overview

Every request goes through the same three steps 1. Get a token POST /api/v1/account/ authenticate Valid for 30 days 2. Permission check Role · Distributor Slip type · Balance Unauthorized: 401 / 403 3. Call the method Authorization: Bearer <token> JSON request · JSON response When the token expires, /api/v1/account/check returns a new one, or call authenticate again.

IntegService is the REST service that exposes slip, customer, payment, product and stock data in SGO to external systems. All methods work with the same token and permission rules (sections 1 and 2); sections 3–6 describe the slip export method, and sections 7–11 describe the other methods.

The slip export service returns invoices, waybills and returns issued in SGO, together with their line items and discounts, as JSON. Usage takes two steps: first obtain a token with your username and password, then query slips with that token.

GroupAddress prefixSection
Getting a token{base_url}/api/v1/account/1
Slip export (getinv, getinvxml){base_url}/api/v1/integ/invoices/3–6
Invoices and orders{base_url}/api/v1/integ/invoices/7
Customers, reports, properties{base_url}/api/v1/integ/custs/, /reports/, /props/8
Payments{base_url}/api/v1/integ/payments/9
Products{base_url}/api/v1/integ/metas/10
Stocks and token check{base_url}/api/stocks/, /api/v1/account/check11

{base_url} is the service address provided to you (e.g. separate addresses for the test and production environments). All requests and responses are sent and received with Content-Type: application/json.

Test and production environments. The service has separate addresses and separate users for test and production. The database you connect to is determined by the user: a test user sees test data, a production user sees production data. Validate your integration in the test environment first.

Common response structure. Most methods return the same envelope:

FieldDescription
successWhether the operation succeeded (true / false)
messageResult message; warnings are appended to the end of this text
info.company, info.countryCompany and country code the token belongs to
dataThe actual data (object or list)
countNumber of records returned; some methods always return 0, so check the data list for the record count

Fields whose value is empty (null) are omitted from the response entirely. Dates in responses are in yyyy-MM-dd HH:mm:ss format. In requests, send dates as yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss; the only exceptions are methods whose field description specifies a different format (gg-aa-yyyy, i.e. dd-MM-yyyy).

1. Authentication (getting a token)

Obtain a token before querying slips; the token is valid for 30 days and is sent in the Authorization header with every request.

POST {base_url}/api/v1/account/authenticate

FieldTypeRequiredDescription
usernametextYesService username provided to you
passwordtextYesUser password
companytextYesCompany code (e.g. DBH-TEST)
countrytextYesCountry code (e.g. TR)

Example request:

{
  "username": "servis_kullanici",
  "password": "********",
  "company": "DBH-TEST",
  "country": "TR"
}

Example response:

{
  "success": true,
  "message": "New Token",
  "info": { "company": "DBH-TEST", "country": "TR" },
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expired": "2026-12-18 13:45:00",
    "expires_in": "2591999.5"
  },
  "count": 0
}
Response fieldDescription
data.tokenToken to use in subsequent requests
data.expiredTime the token expires (UTC)
data.expires_inRemaining time, in seconds

Send the token with every subsequent request in this header (the Bearer prefix is optional): Authorization: Bearer <token>. Copy the token without quotation marks; if a " remains at the start or end, the request is rejected with 401.

2. Permissions

The data a service user can see is restricted by four separate permissions; the permissions are configured for you when your account is set up. If a permission is not defined, no restriction is applied in that area.

PermissionWhat it restrictsAffected methodsWhat happens without it
Role (method) permissionWhich methods you can callAll methods; Integration.Invoices.GetInv for slip export403 — Your role is not authorized.
Distributor permissionWhich distributors' data you can seegetinv, getinvxml, getall, getOutletListFull, payment query methodsUnauthorized codes are removed from the result (see below)
Slip type permissionWhich slip types you can readgetall403 — Your slip type operation is not authorized for: <tip>.
Balance permissionCustomer balance fieldsgetOutletListFullBalance fields are omitted from the response entirely

How the distributor permission is applied:

  • If you do not send dist_codes, only slips of the distributors you are authorized for are returned.
  • Any unauthorized or inactive codes among those you send are removed from the query and a warning is appended to the response message: Warning Inactive and unauthorized distributor codes = 001,002.
  • If none of the codes you send are authorized, the response is 204 No Content.

Balance permission: Without this permission, the getOutletListFull response does not contain the OutletBalance, OutletOpenBalance, OutletEPoint, OutletCheckBalance and OutletBondBalance fields. Other customer fields are unchanged.

If you need changes to your permission definitions, contact your service provider; changes take effect within 1 hour at the latest.

3. Slip export request

getinv returns the slips within the given date range that match the filters. Five fields are required; if any is missing, the request is rejected with 400.

POST {base_url}/api/v1/integ/invoices/getinv

Headers: Authorization: Bearer <token> and Content-Type: application/json

FieldTypeRequiredDescription
doc_typenumberYesSlip type, 1–10 (table below)
start_datedateYesStart date, inclusive. The old dd-MM-yyyy format is not accepted. Format: 2026-10-01 or 2026-10-01T00:00:00
end_datedateYesEnd date, exclusive. For October 1–31, send 2026-11-01
exportednumber listYesTransfer status: 0 = not yet retrieved, 1 = previously retrieved. [0,1] for both
doc_statusnumber listYesSlip status: 0 = Canceled, 1 = Approved (printed), 2 = Unapproved, 3 = Pending
dist_codestext listNoDistributor codes. If empty, all distributors you are authorized for
outlet_codetextNoCustomer code
outlet_integ_codetextNoCustomer's integration code 1
outlet_integ_code_2textNoCustomer's integration code 2
vkntextNoCustomer's tax number
doc_notextNoSlip number (e.g. TST0001)
e_invnumber listNoE-document type: 0 = e-archive, 1 = e-invoice. Not applied if left empty
ettntextNoETTN number of the e-document
dell_notextNoShipment number
limitnumberNoMaximum number of slips to return. 0 or empty = server upper limit (default 5000)
update_exportedtrue/falseNoDefault true: returned slips are marked as "exported". Send false to retrieve the same slips again

Slip types (doc_type):

ValueSlip typeEnglish name
1Sales invoiceSales Invoice
2Purchase invoiceBuy Invoice
3Return invoice from customer (intact goods)Return Invoice From Outlet
4Return invoice from customer (damaged goods)Corrupt Return Invoice From Outlet
5Return invoice to headquarters (intact goods)Return Invoice To Headquarter
6Return invoice to headquarters (damaged goods)Corrupt Return Invoice To Headquarter
7Sales waybillSales Waybill
8Shipment waybillShipment Waybill
9Warehouse transfer (intact goods)Stock Transfer
10Warehouse transfer (damaged goods)Corrupt Stock Transfer

Warning: update_exported is on by default. When you pull new slips with exported: [0], those slips are marked and will not be returned by the next [0] query. If you only want to look, send update_exported: false.

XML output (getinvxml). If you call {base_url}/api/v1/integ/invoices/getinvxml with the same body, the slips are returned as XML. The XML text is in the data field of the response; the fields and rules are the same as for getinv. Systems that transfer data to accounting software via XML can use this address.

4. Example requests

Getting a token (curl):

curl -X POST "{base_url}/api/v1/account/authenticate" \
  -H "Content-Type: application/json" \
  -d '{"username":"servis_kullanici","password":"********","company":"DBH-TEST","country":"TR"}'

Sales invoices not yet retrieved (October 2026, approved):

curl -X POST "{base_url}/api/v1/integ/invoices/getinv" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "doc_type": 1,
    "start_date": "2026-10-01",
    "end_date": "2026-11-01",
    "exported": [0],
    "doc_status": [1],
    "limit": 100
  }'

Retrieving a single slip again without marking it:

{
  "doc_type": 1,
  "start_date": "2026-10-19",
  "end_date": "2026-10-20",
  "exported": [0, 1],
  "doc_status": [0, 1, 2, 3],
  "dist_codes": ["D001"],
  "doc_no": "TST0001",
  "update_exported": false
}

A customer's return invoices (by tax number):

{
  "doc_type": 3,
  "start_date": "2026-01-01",
  "end_date": "2027-01-01",
  "exported": [0, 1],
  "doc_status": [1],
  "vkn": "1234567890",
  "update_exported": false
}

5. Response structure

The response returns slips under data.slips; each slip contains customer information (outlets), line items (items) and each item's discounts (discounts). Amounts are in TRY; unless stated otherwise, they exclude VAT.

Example response (abbreviated, slip TST0001):

{
  "success": true,
  "message": "The transaction is successful.",
  "info": { "company": "DBH-TEST", "country": "TR" },
  "data": {
    "slips": [
      {
        "dist_code": "D001",
        "slip_type": "Normal",
        "slip_id": 100001,
        "slip_number": "TST0001",
        "canceled_slip_value": "Printed",
        "slip_date": "2026-10-19 18:05:00",
        "outlet_name": "DBH TEST MÜŞTERİ",
        "store_code": "91",
        "pay_type_code": 3,
        "gross_amount": 2376.0,
        "total_discount": 1171.28,
        "vat": 12.05,
        "gross_total": 1216.77,
        "due_date": "2026-11-09 00:00:00",
        "seller_code": "175",
        "outlets": { "branch": { "central_code": "C0001", "central_name": "DBH TEST MÜŞTERİ", "tax_no": "1234567890" } },
        "items": [
          {
            "item_no": 2,
            "product_code": "P0002",
            "product_name": "TEST ÜRÜN B 20'li KL",
            "quant": 40.0,
            "product_unit_price": 17.82,
            "row_price": 712.8,
            "price": 361.416,
            "product_real_unit_price": 9.0354,
            "unit": "Koli",
            "vat": 1.0,
            "discounts": [
              { "item_no": 2, "code": "Cust", "sign_discount": "Customer", "type": "Percent", "discount_rate": 0.03, "discount_val": 21.384, "total_price": 712.8 },
              { "item_no": 2, "code": "EPoint", "sign_discount": "E Point", "type": "Price", "discount_rate": 0.4773, "discount_val": 330.0, "total_price": 691.416 }
            ]
          }
        ]
      }
    ],
    "failedSlips": []
  },
  "count": 1
}

General fields

FieldDescription
successWhether the operation succeeded
messageResult message; a warning is appended if there are unauthorized distributors or failed slips
countNumber of slips returned
data.slipsSlips
data.failedSlipsSlips that could not be built: slip_id, slip_number, dist_code, error. An error in one slip does not block the others

Slip (slips[])

FieldDescription
dist_codeDistributor code
slip_typeSlip kind (Normal, Return, etc.)
slip_idUnique ID of the slip in the system
slip_numberSlip number
canceled_slip_valueSlip status: Canceled (canceled), Printed (approved), Unconfirmed (unapproved), Waiting (pending)
slip_dateSlip date and time
slip_codeAlternate number of the slip (e-document number, etc.)
outlet_name, tax_office, tax_codeCustomer name, tax office, tax number
store_code, store_nameSource warehouse
store_code2, store_name2Destination warehouse (for transfers)
pay_type_codePayment type code
gross_amountGross amount (before discounts)
total_discountTotal discount amount
vatTotal VAT amount
gross_totalTotal payable for the slip (after discounts, including VAT)
due_dateDue date
del_code, veh_codeDelivery person and vehicle code
seller_code, seller_integ_codeSales representative code and integration code
slip_explanation, slip_explanation2Slip notes
outlets.head, outlets.branchHead office and branch customer information (codes, address, channel, tax details)

Item (items[])

FieldDescription
item_noLine item sequence number
product_code, product_nameProduct code and name
quantQuantity, in pieces (5 cases × 12 = 60)
unitUnit used on the slip (Koli = case, Adet = piece)
product_unit_priceList price per piece
row_priceLine gross amount (quant × product_unit_price)
priceLine net amount (after all discounts, excluding VAT)
product_real_unit_priceNet price per piece (price / quant)
vatVAT rate, percent (1.0 = 1%)
minimum_value, defined_one_value, defined_box_value, defined_package_valueThe product's unit definitions
deposit1 if the product carries a deposit
discountsDiscounts applied to the item, in order of application

Discount (discounts[])

FieldDescription
code, sign_discountDiscount code and name (Cust = customer discount, EPoint = e-points discount)
typePercent (percentage), Price (amount), Free (free of charge)
discount_rateDiscount rate, as a fraction (0.03 = 3%)
discount_valDiscount amount
total_priceAmount this discount was applied to (after previous discounts)

Discounts are applied in sequence: in the example, the 3% customer discount deducts TRY 21.38 from 712.80, and the e-points discount deducts TRY 330.00 from the remaining 691.42; the line net amount becomes TRY 361.42.

Customer (outlets.head = head office, outlets.branch = branch)

FieldDescription
integration_code1, integration_code2Customer's integration codes
central_code, central_nameCustomer code and name
city, town, adress, post_codeProvince, district, address (the field name is returned with this spelling), postal code
type_code, type_nameCustomer type
channel_code, channel_nameChannel
national_chain_outlets, national_chain_outlets_code, national_chain_outlets_nameNational chain information
telephone, fax_numberContact details
tax_no, tax_officeTax number and tax office
related_personContact person
seasonal_outletSeasonal customer
tax_free1 = tax-exempt customer

Other item fields

FieldDescription
product_typeProduct type
weight, volumeProduct weight and volume (dm³)
minimum_unit, minimum_valueProduct's unit and sub-unit values
defined_one_value, defined_box_value, defined_package_valuePiece, box and case unit names
deposit0 = no deposit, 1 = product with deposit

Legacy TXT/XML transfer codes. If you transfer data to accounting software using the legacy TXT/XML format, the field mappings are:

JSON fieldLegacy codeJSON fieldLegacy code
dist_codeDISTCODEitem_noKALEMNO
slip_typeFISTIPIproduct_codeURUNKODU
slip_idFISIDproduct_nameURUNADI
slip_numberFISNOquantMIKTAR
canceled_slip_valueIPTALproduct_unit_priceBIRIMFIYAT
slip_dateTARIHrow_priceSATIRTOPLAMI
slip_codeMUSKODUpriceFIYAT
outlet_nameMUSADIunitBIRIM
tax_officeVERGIDAIRESIvatKDV
tax_codeVERGINOproduct_typeTIPI
store_code, store_code2DEPOKODU, DEPOKODU2weightAGIRLIK
pay_type_codeODEMETIPIvolumeHACIM
gross_amountTOPLAMBRUTminimum_unitUNITE
total_discountTOPLAMISKONTOminimum_valueALTBIRIM
vatTOPLAMKDVdefined_one_valueBIRIM0
gross_totalTOPLAMNETdefined_box_valueBIRIM1
due_dateVADETARIHIdefined_package_valueBIRIM2
del_codeDAGITICIKODUdepositDEPOZITO
veh_codeARACKODUdiscounts[].codeKODU
seller_codeSATISTEMSILCISIKODUdiscounts[].sign_discountADI
slip_explanationFISACIKLAMAdiscounts[].discount_rateORAN
slip_explanation2FISACIKLAMA2discounts[].total_priceTUTAR

6. Error codes and common situations

HTTP codeMessageCauseWhat to do
200The transaction is successful.Operation succeeded—
200... slip(s) failed, see FailedSlipsSome slips could not be builtForward the errors in the data.failedSlips list to your service provider
200Warning Inactive and unauthorized distributor codes = ...Some of the distributor codes sent are unauthorized or inactiveCheck the codes; slips for the other distributors have been returned
204(empty response)No slips match the criteria, or none of the distributors sent are authorizedCheck the date range and the exported and doc_status filters
400Request değerleri boş (request values are empty)One of the required fields is missing (doc_type, start_date, end_date, exported, doc_status)Add the missing field
400Format error including the field nameA field was sent with the wrong type (e.g. text instead of a number, invalid date)Send the field using the type in the table
401Invalid or missing token.Token missing, expired or copied incorrectlyGet a new token; make sure there are no quotation marks at the start or end
403Your role is not authorized.The user is not authorized to call this methodAsk your service provider for the Integration.Invoices.GetInv permission

Frequently asked questions

  • The same slip does not come back in the second query. Because update_exported is on by default, the slip was marked as "exported" in the first query. To retrieve it again, send exported: [0, 1].
  • quant differs from the quantity shown on screen. quant is always in pieces; the screen may show cases. Number of cases = quant / pieces per case.
  • Slips on the end date are not returned. end_date is exclusive; send the following day.

7. Invoices and orders

These methods read, create, revise and change the status of slips (invoices, orders, waybills). All of them are POST, with the address prefix {base_url}/api/v1/integ/invoices.

MethodAddressFunctionRequired role
getall/getallReturns not-yet-retrieved slips with their line itemsIntegration.Invoices.Get
bill/billCreates a new slipIntegration.Invoices.bill
Revise`` (prefix, no suffix)Revises existing slips (list)Integration.Invoices.Update
cancel/cancelCancels a slip by number and distributorIntegration.Invoices.Cancel
cancelbyid/cancelbyidCancels a slip by IDIntegration.Invoices.CancelByIDInv
confirmbyid/confirmbyidApproves a slipIntegration.Invoices.ConfirmByIDInv
unconfirmbyid/unconfirmbyidSets a slip to unapprovedIntegration.Invoices.UnconfirmByIDInv
getInvStatus/getInvStatusReturns the status and dates of slipsIntegration.Invoices.GetInvStatus

The Integration.Invoices role grants access to all of these methods.

Slip types (invShapes and targetSlipType; written in upper case, exactly as shown)

NameMeaningCustomer and seller code
BUYORDERPurchase order placed with headquartersNot required
BUYORDEROUTLETDETAILEDPurchase order with customer detailsRequired
ORDERCustomer sales orderRequired
VOLUMETRICORDERVolumetric orderRequired
NCORDERCentral-type orderRequired
AVAILABILITYAvailability recordRequired
SALESINVOICESales invoiceRequired
HOTSALESINVOICEHot sale (van sales) invoiceRequired
BUYINVOICEFROMHEADQUARTERPurchase invoice from headquartersNot required
BUYINVOICEPurchase invoiceRequired
SERVICEINVOICEService invoiceRequired
RETURNINVOICETOHEADQReturn invoice to headquarters (intact goods)Not required
CORRUPTRETURNINVOICETOHEADQReturn invoice to headquarters (damaged goods)Not required
NCRETURNINVOICETOHEADQCentral-type return invoice to headquartersRequired
RETURNINVOICEFROMOUTLETReturn invoice from customer (intact goods)Required
CORRUPTRETURNINVOICEFROMOUTLETReturn invoice from customer (damaged goods)Required
SALESWAYBILLSales waybillRequired
HOTSALESWAYBILLHot sale (van sales) waybillRequired
NCWAYBILLCentral-type waybillRequired
BUYWAYBILLPurchase waybillNot required
RETURNWAYBILLFROMOUTLETReturn waybill from customer (intact goods)Required
CORRUPTRETURNWAYBILLFROMOUTLETReturn waybill from customer (damaged goods)Required

Slip statuses (docStatus): Canceled = canceled, Printed = numbered/approved, Unconfirmed = unapproved, Waiting = approved, pending.

Methods in this chapter

7.1 getall

Slip type and distributor permissions apply (section 2). If a slip type you are not authorized for is requested, 403 is returned.

FieldTypeRequiredDescription
startDatedateYesStart, inclusive
endDatedateYesEnd, exclusive
invShapestext listNoSlip types; default ["BUYORDER"]
distCode / distCodestext / text listNoDistributor codes
limitnumberNoMaximum number of slips; empty = 5000
exportedtrue/falseNoIf empty, only slips not yet retrieved; true = previously retrieved slips
includeUnconfirmedtrue/falseNotrue = unapproved slips are also returned
ignoreSellerLocktrue/falseNotrue = mobile orders of sellers who have not closed their day are also returned
{ "startDate": "2026-11-01", "endDate": "2026-11-18", "invShapes": ["BUYORDER", "ORDER"], "distCodes": ["1001"], "limit": 500 }

For each slip, the response contains idInv, shapeName, docStatus, invoiceNumber, distCode, evDate, shipmentDate, customer and branch information (customerCode, customerName, customerBranchCode), sellerCode, warehouse information, amounts (gross, discount, kdv, price), notes, items[] (metaCode, amount, idUnit, unitName, unitPrice, realPrice, discount, itemNo) and gainedDiscs[] (discount code, name, amount and percentage).

Warning: Returned slips are marked as "retrieved" and will not be returned on the next call. To retrieve the same slips again, send exported: true.

7.2 bill (creating a slip)

FieldTypeRequiredDescription
distCodetextYesDistributor code
centralCodetextYesHead office code
invoiceNumbertextYesSlip number; for non-order types it must be unique within the distributor
evDatedateYesSlip date
itemslistYesLine items (below)
targetSlipTypetextNoSlip type; default BUYINVOICEFROMHEADQUARTER
customerCode or customerIntegCodetextDepends on slip typeOne of them is required for the "Required" types in the table
sellerCode or sellerIntegCodetextDepends on slip typeSame rule as the customer code
fromStockCode, toStockCodetextNoSource and destination warehouse; default warehouse if empty
invoiceNumberOthertextNoSecond number; default invoiceNumber
docStatustextNoPrinted, Unconfirmed or Waiting; determined by type if empty
paymentTypetextNoPayment type; default cash
gross, discount, kdv, price, weight, volumenumberNoHeader amounts; written as sent, the server does not recalculate them
explanation, explanation2textNoNotes

Leave the idInv and cancelReason fields empty for a new slip; they are used for revisions. Additional header fields: custDisRat1 (customer discount, %), priceCurr (promissory note amount), rebateDis (signage discount). Weight is in grams, volume in dm³.

Line items (items[])

FieldTypeRequiredDescription
metaCodetextYesProduct code
amountnumberYesQuantity, in the idUnit unit; must be greater than 0
idUnitnumberYes*Unit: 0 piece, 1 box, 2 case; must be defined for the product
sapUnittextNoUnit short name; if filled, it is used instead of idUnit
itemNotextYesItem number; an empty string ("") may be sent
explanationtextYesLine note; an empty string ("") may be sent
unitPricenumberNoUnit price; if 0, the product's list price
realPricenumberNoNet line amount; if empty, calculated from price, quantity and discounts
unitKdvRat, unitKdvRat2numberNoVAT rates, as a fraction (0.18)
unitDisRat2–unitDisRat4numberNoAdditional user discount rates
unitTaxBase, taxnumberNoUnit tax base and tax amount; 0 if empty
firstAmountnumberNoInitially entered quantity; default amount
batchtextNoBatch; the product is looked up by the code metaCode-batch
disc[]listNoLine discounts (below)

* If sapUnit is not sent.

Line discounts (items[].disc[])

FieldTypeRequiredDescription
discCodetextYesDiscount code
discNametextYesDiscount name
discRatenumberNoDiscount rate, between 0 and 1 (0.05 = 5%)
discAmountnumberNoDiscount amount
discOrderNonumberNoOrder of application
{ "distCode": "1001", "centralCode": "C1001", "invoiceNumber": "F2026000123", "evDate": "2026-11-18 10:00:00", "targetSlipType": "ORDER", "customerCode": "M001", "sellerCode": "S01", "items": [ { "metaCode": "P100", "amount": 10, "idUnit": 2, "unitPrice": 120, "unitKdvRat": 0.18, "itemNo": "10", "disc": [ { "discCode": "D1", "discName": "Campaign", "discRate": 0.05, "discAmount": 60, "discOrderNo": 1 } ] } ] }

In the response, data.idInv is the ID of the created slip.

HTTPMessageCause
400Target slip type is not foundInvalid targetSlipType
400The <kod> Distributor Code was not found!Distributor does not exist
400Customer is not found / Seller is not foundCustomer or seller code not sent for a type that requires it
400Duplicate invoice: InvNo = X, Dist Code = Y!Slip number already used
400<kod> Product Code value/s not found!Product does not exist
400The unit of idUnit <n> of the product with code <kod> was not found!Unit is not defined for the product
400DiscRate must be between 0-1Invalid discount rate
400The DistCode field is required. etc.Required field missing

7.3 Revise (updating an existing slip)

POST {base_url}/api/v1/integ/invoices — the body is a list. Each element carries the same fields as bill; in addition, idInv (the slip to revise) is required. The old slip is closed and a new slip linked to it is created in its place; the slip type is taken from the old slip. For non-order types, a new invoiceNumber must be sent.

[ { "idInv": 605090001, "distCode": "1001", "centralCode": "C1001", "invoiceNumber": "SIP-778", "items": [ { "metaCode": "P100", "amount": 8, "idUnit": 2, "unitPrice": 120, "unitKdvRat": 0.18 } ] } ]

The response is a list with a separate result for each element; data.idInv is the ID of the new slip. If any element fails, the response is 400, but successful elements remain saved. If idInv is missing, IDInv value must be sent! is returned; if it is not found, Invoice is not found: <id> is returned.

7.4 Cancellation and approval

MethodBodyResult
canceldistCode (required), invoiceNumber (required), cancelReason (optional cancellation reason code)Cancels a slip created through this service
cancelbyididInv (required), cancelReason (optional)Cancels the slip
confirmbyididInv (required)Approves the slip: Printed if it has a number, otherwise Waiting
unconfirmbyididInv (required)Sets the slip to Unconfirmed
{ "distCode": "1001", "invoiceNumber": "F2026000123", "cancelReason": "IPTAL01" }
{ "idInv": 605090001 }

A successful response message shows the slip that was processed: The transaction is successful.- idInv: 605090001.

HTTPMessageCause
400No records found with the receipt number X or distributor code Y.cancel: slip not found
400The receipt number X of the Y distributor code has been canceled already.cancel: slip already canceled
400Slip could not be found!No slip found with the ID
400Unauthorized operation!confirmbyid/unconfirmbyid: slip is canceled or already numbered

7.5 getInvStatus

Returns the status of slips; it does not mark slips as "retrieved".

FieldTypeRequiredDescription
startDate, endDatedateYes*Date range, end exclusive
invShapestext listNoSlip types; default ["BUYORDER"]
idInvnumberNoSingle slip
limitnumberNoEmpty = 5000

* If idInv is not sent.

{ "startDate": "2026-11-01", "endDate": "2026-11-18", "invShapes": ["BUYORDER"] }

For each slip, the response returns idInv, createDate (creation date), confirmDate (last modification date) and docStatus.

8. Customers, reports and properties

These methods read customer cards, add or update customers, and return the customer account report and property definitions. All of them are POST.

MethodAddressFunctionRequired role
GetOutletList/api/v1/integ/custs/GetOutletListCustomer list (with route and seller)Integration.Custs.GetOutletList
getOutletListFull/api/v1/integ/custs/getOutletListFullFull customer card, properties and routesIntegration.Custs.GetOutletListFull
GetSaleOutletWise/api/v1/integ/custs/GetSaleOutletWiseSales quantity by customer and dayIntegration.Custs.GetSaleOutletWise
customer/api/v1/integ/custs/customerAdds or updates a customerIntegration.Custs.Customer
getCustomerAccountCumulativeReport/api/v1/integ/reports/getCustomerAccountCumulativeReportCumulative customer account reportIntegration.Reports.GetCustomerAccountCumulativeReport
list/api/v1/integ/props/listProperty definitions and valuesIntegration.Props.GetProps

Methods in this chapter

8.1 GetOutletList and getOutletListFull

FieldTypeRequiredDescription
distCodestext listNoDistributor codes
{ "distCodes": ["194"] }
  • GetOutletList returns code, name, address, GPS, contact person, distributor, route and seller information for each customer. A customer with more than one route is returned on a separate row for each route. If the result is empty, data: [] is returned.
  • getOutletListFull returns the full customer card: codes, tax details, type and channel, status (Active/Passive/Disabled), credit information (creditLimit, creditCode, creditControlStatus), payment type, payment term, contact and address, GPS, balances, customerProperties[] (property code and value) and customerRoutes[] (seller, route, visit day and frequency). If the result is empty, 204 is returned.
  • Distributor and balance permissions apply to getOutletListFull; for users without the balance permission, the outletBalance, outletOpenBalance, outletEPoint, outletCheckBalance, outletBondBalance fields are not returned (section 2). The distributor permission is not applied to GetOutletList.

8.2 GetSaleOutletWise

FieldTypeRequiredDescription
startDatedateYesStart, inclusive
finishDatedateYesEnd, exclusive
distCodestext listNoDistributor codes
{ "startDate": "2026-10-01", "finishDate": "2026-11-01", "distCodes": ["194"] }

Each row in the response contains distributorId, outletId, monthNo (short month name, e.g. Oct), saleDate and sdCases (net sales after returns, in cases). If a date is missing, 422 and Parameter (StartDate) cannot be null. are returned.

8.3 customer (adding and updating customers)

The customer is looked up by distributorCode and code. If not found, it is added; if found, only the fields sent are updated. The customer code cannot be changed with this method.

FieldTypeRequiredDescription
distributorCodetextYesDistributor code
codetextYesCustomer code
nametextFor new customersLegal name
shortNametextFor new customersShort name
customerTypetextFor new customersCustomer type name (same as the name defined in the system)
creditCodetextFor new customersAdvance = prepaid, Cash = cash, Deferred = on credit terms
paymentTypetextFor new customersCash, Credit Card, Bank Transfer, Check, Bond, Open Account
creditStatustextNoUnlimited, Warning, Error
creditLimit, dueDaysnumberNoCredit limit, payment term in days
mainCustomerCodetextNoHead office customer it belongs to
integrationCode, integrationCode2textNoIntegration codes
sellerDistributorCode, sellerCodetextNoSales representative of the card
taxOffice, taxNo, idNo, taxTypeNametextNoTax office, tax number, national ID number, tax class
countryName, cityName, townNametextNoAddress, using the names defined in the system
address1, address2, postCodetextNoAddress
workTel1, mobileTel1, email etc.textNoContact details
gpsCoordX, gpsCoordYnumberNoLongitude, latitude
passive, dontSell, disabledtrue/falseNoPassive, do not sell, disabled

Values must be written exactly, including case and spaces; an unrecognized value falls back to the default (Cash, Advance, Unlimited). For a new customer, date fields that are not sent take today's date.

{ "distributorCode": "194", "code": "C-1001", "name": "Örnek Gıda Ltd.", "shortName": "Örnek Gıda", "customerType": "Bakkal", "creditCode": "Deferred", "paymentType": "Open Account", "creditLimit": 50000, "dueDays": 30, "cityName": "İstanbul", "townName": "Kadıköy", "sellerDistributorCode": "194", "sellerCode": "001" }

The response returns the record that was sent. For a new customer with a missing field, 400 is returned with You must send Credit Code, You must send Payment Type, You must send Customer Type, You must send Name for Customer or You must send Short Name for Customer.

8.4 getCustomerAccountCumulativeReport

Field names use underscores.

FieldTypeRequiredDescription
start_datetextYesPeriod start, gg-aa-yyyy (dd-MM-yyyy), inclusive
end_datetextYesPeriod end, gg-aa-yyyy (dd-MM-yyyy), exclusive
limitnumberYesNumber of accounts to return (maximum 50000); if not sent, the account list comes back empty
dist_codestext listYesDistributor codes
consider_chain_storesnumberYes0 = per branch, 1 = aggregate under the chain head office
outlet_codestext listNoCustomer codes
outlet_shape_codes, outlet_shape_namestext listNoCustomer type
outlet_passivesnumber listNo1 = passive customers
seller_codes, seller_integ_codestext listNoSales representative
route_daysnumber listNoRoute day, 0 = Monday
acc_statusnumberNo0 = no debt, 1 = in debt
max_rec_depttrue/falseNotrue: last collection and last invoice dates are also calculated
{ "dist_codes": ["194"], "start_date": "01-10-2026", "end_date": "01-11-2026", "limit": 1000, "consider_chain_stores": 0, "acc_status": 1, "max_rec_dept": true }

The response contains five lists: customers (customer card), customerDists (distributors), customerAccounts (revolve carried over, debt period debit, receivable period credit, balance balance, sales turnover, credit_limit, risk, max_receivable_date, max_dept_date), customerSellers and sellers.

8.5 props/list

Keys in the body are case-sensitive; they must be written exactly as shown below.

FieldTypeRequiredDescription
distcodetextYesAn active distributor code
subjecttextYesProperty subject, e.g. Cust (customer), Meta (product)
{ "distcode": "194", "subject": "Cust" }

The response is a list without an envelope: for each property, propCode, propName and its possible values (items[]). If a key is missing, 400 is returned with Discode Value Is Required! or subject Value Is Required!.

9. Payments

The payment methods read and write collection, payment, service invoice and balance adjustment records. All methods are POST, with the address prefix {base_url}/api/v1/integ/payments/.

MethodFunctionRequired role
getPayReturns collection/payment slips with their line items (legacy format, underscore field names)Integration.Payments.GetPayments
GetPaymentReturns collection/payment slips with their line itemsIntegration.Payments.GetPayment
GetServiceInvoiceReturns service invoicesIntegration.Payments.GetServiceInvoice
BalanceEqualizingReturns balance adjustment recordsIntegration.Payments.BalanceEqualizing
addAdds a collection/payment slipIntegration.Payments.Add
UpdateUpdates a collection/payment slipIntegration.Payments.Update
CancelCancels a slipIntegration.Payments.Cancel
AddServiceInvoiceAdds a service invoiceIntegration.Payments.AddServiceInvoice
UpdateServiceInvoiceUpdates a service invoiceIntegration.Payments.UpdateServiceInvoice

The Integration.Payments role grants access to all of these methods. The distributor permission applies to the read methods (section 2).

Common codes

FieldValues
directionCollection = collection, Payment = payment
paymentTypeCash = cash, CreditCard = credit card, BankTransfer = bank transfer, Check = check, Bond = promissory note

Values are case-sensitive; an unrecognized value is treated as Collection and Cash.

Read methods mark records as "exported". getPay, GetPayment, GetServiceInvoice and BalanceEqualizing mark the records they return. When you call again with exported: false, the next page is returned. Records that are updated or canceled revert to "not exported" and are returned again.

Methods in this chapter

9.1 getPay

FieldTypeRequiredDescription
start_datetextYesStart, format gg-aa-yyyy (dd-MM-yyyy, e.g. 01-01-2026), inclusive
end_datetextYesEnd, format gg-aa-yyyy (dd-MM-yyyy), exclusive
exportednumber listYes0 = not retrieved, 1 = retrieved
doc_statusnumber listYes0 = canceled, 1 and 3 = valid
dist_codestext listNoDistributor codes
outlet_code, outlet_integ_code, outlet_integ_code_2, vkntextNoCustomer filters
doc_notextNoLinked invoice number
receipt_notextNoReceipt number
is_servicenumberNo0 = no filter, 1 = service, 2 = balance adjustment
doc_typenumberNo1 cash, 2 credit card, 3 bank transfer, 4 check, 5 promissory note; if given, only items of that type are returned
seller_code, seller_integ_codetextNoSales representative
limitnumberNoMaximum number of records; empty = server limit (5000)
{ "dist_codes": ["131"], "start_date": "01-01-2026", "end_date": "01-02-2026", "exported": [0], "doc_status": [1, 3], "limit": 100 }

For each record, the response contains pay_id, dist_code, outlet_code, outlet_name, collection_date, receipt_number, dir (COLLECTION/PAYMENT), shape (NORMAL/CHECK/BONDS), price, seller_code, is_service and line items (pay_items[]: doc_type, pay_type_name, amount, document_no, due_date, bank, branch).

9.2 GetPayment, GetServiceInvoice, BalanceEqualizing

All three use the same request fields.

FieldTypeRequiredDescription
startDatedateYes*Start, inclusive (2026-01-01)
endDatedateYes*End, exclusive
directiontextYes (GetPayment, GetServiceInvoice)Collection / Payment. GetServiceInvoice always returns collections, but the field must still be sent
exportedtrue/falseNoDefault false: only records not yet retrieved. true: only retrieved records
distCodestext listNoDistributor codes
idPaynumberNoFetches a single record; if given, the date and exported filters are not used
limitnumberNoMaximum number of records; empty = 5000

* Required if idPay is not sent.

{ "distCodes": ["131"], "startDate": "2026-01-01", "endDate": "2026-02-01", "exported": false, "direction": "Collection", "limit": 500 }
MethodMain fields in the response
GetPaymentidPay, distCode, evDate, receiptNo, sellerCode, customerCode, dir (1 collection, 2 payment), idInv, docStatus, isCanceled, items[] (paymentType, price, documentNo, dueDate, bank, bankOffice)
GetServiceInvoiceidPay, distCode, evDate, invoiceNumber, customerCode, price, serviceType
BalanceEqualizingidPay, distCode, evDate, invoiceNumber, customerCode, price, direction (Decrease/Increase), type (e.g. Decrease Balance)

9.3 add and Update (writing collections/payments)

FieldTypeRequiredDescription
idPaynumberOnly UpdateSlip to update. Ignored in add; the new ID is returned in the response
distCodetextYesDistributor code
customerCodetextYesCustomer code
evDatedateYesDocument date
itemslistYesLine items; the slip amount is the sum of the items
items[].paymentTypetextNoPayment type (Common codes)
items[].pricenumberNoItem amount
items[].explanationtextNoItem note
sellerCodetextNoSales representative
receiptNumbertextNoReceipt number
directiontextNoDefault Collection
explanationtextNoNote
idInvnumberNoLinked invoice ID
{ "distCode": "131", "customerCode": "M001", "sellerCode": "S01", "evDate": "2026-01-15", "receiptNumber": "TH-12", "direction": "Collection", "items": [ { "paymentType": "Cash", "price": 1000 }, { "paymentType": "CreditCard", "price": 500 } ] }

The response returns the record you sent inside data; for add, idPay is the ID of the new slip. Update deletes and rewrites the line items, and makes a canceled slip valid again.

9.4 Cancel

FieldTypeRequiredDescription
idPaynumberYesSlip to cancel
{ "idPay": 5013 }

A canceled slip is returned again by the read methods with isCanceled: true.

9.5 AddServiceInvoice and UpdateServiceInvoice

FieldTypeRequiredDescription
idPaynumberOnly UpdateServiceInvoiceRecord to update
distCodetextYesDistributor code
customerCodetextYesCustomer code
evDatedateYesDate
serviceTypetextYesService name; must exactly match a service name defined in the system
pricenumberNoAmount
invoiceNumbertextNoInvoice number; if filled, the record is created as approved, otherwise as pending
sellerCode, explanation, idInv—NoRepresentative, note, linked invoice
{ "distCode": "131", "customerCode": "M001", "evDate": "2026-01-20", "invoiceNumber": "HZ-1", "price": 250, "serviceType": "Raf Kirası" }

Errors: The read methods use the codes in section 6. On error, the write methods (add, Update, Cancel, AddServiceInvoice, UpdateServiceInvoice) return 400 with only the error text; if items is not sent, the text is Object reference not set to an instance of an object.

10. Products

The product methods read and write the product card, its units, prices, properties and translations. Address prefix: {base_url}/api/v1/integ/metas.

MethodHTTP method and addressFunctionRequired role
Product listPOST /getmetalistAll products, with their unitsIntegration.Metas.Post
Single productGET /{idMeta}A single product by product IDIntegration.Metas.GetById
Product unitsPOST /metaunitsUnits of a productIntegration.Metas.GetMetaUnits
Save productPOST `` (prefix, no suffix)Adds or updates products (list)Integration.Metas.Save
Delete productDELETE /{idMeta}Permanently deletes a productIntegration.Metas.Delete
Deactivate / activatePOST /delistDeactivates or activates a productIntegration.Metas.DeList
Read pricesGET /prices/{idDist}/{idMeta}Price records of a productIntegration.Metas.GetMetaPrices
Write pricesPOST /pricesAdds or updates prices (list)Integration.Metas.AddMetaPrices
Read propertiesPOST /getpropProperties of a productIntegration.Metas.GetMetaProps
Write propertyPOST /addpropAdds a property value to a productIntegration.Metas.AddMetaProps
Write translationPOST /translateProduct name translation (list)Integration.Metas.Translate
Suggested orderPOST /suggestedOrderUploads a suggested product list for a customerIntegration.Metas.SuggestedOrder

The Integration.Metas role grants access to all of these methods. If a product code includes a batch, it is written in the form CODE-BATCH, e.g. P0001-ABC. Language codes: en, tr, ru, ar, id, ro, de, fr, dk, vn, th, my, fa.

Methods in this chapter

10.1 Reading products (getmetalist, single product, metaunits)

getmetalist body:

FieldTypeRequiredDescription
isoCodetextNoLanguage of product names; default en. The key must be written exactly as isoCode
{ "isoCode": "tr" }

For each product, the response returns idMeta, metaCode, genericCode, batch, name, shortName, kdvRatio, weight, volume, barcode, disabled, price, buyPrice, unitCase, dontSell and units[] (idUnit, amount, name, shortName). Inactive products are listed too. The single product method returns the same fields without units; if the product is not found, data is not returned.

metaunits body:

FieldTypeRequiredDescription
distCodetextYesDistributor code
metaCodetextYesProduct code
{ "distCode": "TEST", "metaCode": "P0001" }

10.2 Saving products

The body is a list. The product is looked up in the distributor by metaCode (and batch, if any); if not found, it is added, and if found, it is updated. Fields not sent in an update are reset, so send all fields of the product.

FieldTypeRequiredDescription
distCodetextYesDistributor code
metaCodetextYesProduct code
batchtextNoBatch; if filled, the product code becomes metaCode-batch
name, shortNametextNoProduct name and short name
idMetaShapenumberNo1 normal, 2 promotional, 3 consignment, 4 competitor
idMinUnit, idDefUnitnumberNoSmallest and default unit: 0 piece, 1 box, 2 case
kdvRatio, kdvRatio2numberNoVAT rate, as a fraction (0.20 = 20%)
weight, volume, palette, unitCase, subUnit, fullCase, alcoholRate, epointnumberNoPhysical and logistics information
barcodetextNoBarcode
noStock, isFinancial, dontSell, fractional, dayMetaControlnumberNo1 = yes, 0 = no
dayMetaLifenumberNoShelf life, in days
disabledtrue/falseNoUpdate only: true = inactive
units[]listNoUnits: idUnit, amount (quantity in the smallest unit), name, shortName
dic[]listNoName translations: lang, value

Price fields are not written by this method; use /prices for prices.

[{ "distCode": "TEST", "metaCode": "P0001", "idMetaShape": 1, "idMinUnit": 0, "idDefUnit": 2, "name": "Ürün A", "shortName": "ÜrnA", "kdvRatio": 0.2, "barcode": "869000000001", "dic": [{ "lang": "en", "value": "Product A" }], "units": [{ "idUnit": 0, "amount": 1, "name": "Adet", "shortName": "AD" }, { "idUnit": 2, "amount": 12, "name": "Koli", "shortName": "KL" }] }]

The response contains a separate result for each product; an error in one product does not block the others. If at least one product fails, the response is 400 and the failed product is marked with success: false.

10.3 Deleting and deactivating

  • Delete (DELETE /{idMeta}) permanently deletes the product together with its stock and unit records; it cannot be undone. To only remove the product from sale, use delist.
  • The delist body is a list:
FieldTypeRequiredDescription
distCodetextYesDistributor code
metaCodetextYesProduct code (CODE-BATCH for batch products)
disabledtrue/falseNotrue = deactivate, false = activate
[{ "distCode": "TEST", "metaCode": "P0001", "disabled": true }]

10.4 Prices

GET /prices/{idDist}/{idMeta} returns the product's price records: firstDate, lastDate, price, buyPrice, normalReturnPrice, corruptReturnPrice, advicePrice, ruleNo.

The POST /prices body is a list:

FieldTypeRequiredDescription
distCodetextYesDistributor code
metaCodetextYesProduct code (without batch)
firstDatedateYesFirst day the price is valid
buyPricenumberYesPrice; written as both the sales and the purchase price
normalReturnPrice, corruptReturnPrice, advicePricenumberNoIntact-goods return, damaged-goods return, recommended price
batchtextNoIf filled, the price is written to the batch product; if the batch does not exist, it is created from the main product
degreenumberNoPrice level
customerFilterShape, customerFilterValuetextTogetherRestricts the price to a customer group (e.g. DISTRIBUTOR GROUP and the group code). If both are empty, it is a general price
[{ "distCode": "DBH-TEST", "metaCode": "P0004", "firstDate": "2026-09-01", "buyPrice": 100, "normalReturnPrice": 100, "corruptReturnPrice": 90, "advicePrice": 120, "degree": 1 }]

The server calculates the end date: when a new price starts, the previous price of the same product is closed, and the latest price remains open-ended. If you send more than one period for the same product in a list, they are ordered by firstDate. If an element fails, processing stops; elements before it remain saved.

10.5 Properties and translations

The getprop body is { "distCode", "metaCode" }. The addprop body:

FieldTypeRequiredDescription
distCodetextYesDistributor code
metaCodetextYesProduct code
props[].propCodetextYesProduct property code defined in the system
props[].valueCodetextYesValue code, at most 50 characters
props[].nametextNoName of the value
{ "distCode": "TEST", "metaCode": "P0003", "props": [{ "propCode": "Category", "valueCode": "41", "name": "Atıştırmalık" }] }

The value is also written to the product's batch variants. The translate body is a list: distCode, metaCode, lang and value (translation text) are required.

[{ "distCode": "TEST", "metaCode": "P0001", "lang": "en", "value": "Product A" }]

10.6 Suggested order (suggestedOrder)

The body is a list. The previous suggestion list for the same customer and type is deleted and the new one is written.

FieldTypeRequiredDescription
distCodetextYesDistributor code
outletCodetextYesCustomer code
typeCodetextYes1 core, 2 strategic, 3 opportunity
weekStartDate, weekEndDatedateYesWeek for which the list is valid
metaCodeTargets[].metaCodetextYesProduct code, at most 10 characters
metaCodeTargets[].targetCountnumberNoSuggested quantity
metaCodeTargets[].targetUnitnumberNoUnit: 0 piece, 1 box, 2 case
[{ "distCode": "D001", "outletCode": "M0002", "typeCode": "1", "weekStartDate": "2026-11-23", "weekEndDate": "2026-11-29", "metaCodeTargets": [{ "metaCode": "P0005", "targetCount": 5, "targetUnit": 1 }] }]

The response is always 200. message gives the number of successful and failed rows; data lists the codes that were not found (e.g. "999: meta code bulunamadı!", i.e. meta code not found).

Customer-specific product integration methods are outside the scope of this guide.

11. Stocks and token check

The stock methods use a different address prefix: {base_url}/api/stocks/ (without /v1/integ).

MethodHTTP methodFunctionRequired role
PastStockMonitoringReportByProductPOSTA distributor's historical stock, broken down by product and warehouseIntegration.Stocks.GetPastStockMonitoringReportByProduct
GetWarehouseStockPOSTProduct stocks per warehouse (case/box/piece)Integration.Stocks.GetWarehouseStock
GetDistSalesPOSTMonthly sales and return quantities of all distributorsIntegration.Stocks.GetDistSales
GetDistStockGETCurrent stocks of all distributorsIntegration.Stocks.GetDistStock
account/checkPOSTValidates the token and renews it if expiredNo role required

Methods in this chapter

11.1 PastStockMonitoringReportByProduct

Field names use underscores. Stock is calculated from movements before the given day; that day's movements are not included.

FieldTypeRequiredDescription
dist_codetextYesA single distributor code; must be authorized and active
stock_daytextYesgg-aa-yyyy, gg/aa/yyyy or gg.aa.yyyy (day-month-year)
meta_disablednumber listYes0 = active products, 1 = disabled products; [] = all
limitnumberNoMaximum number of rows; empty = 5000
product_ownertextNoHO = headquarters products only; default D = no filter
stock_codes, meta_codes, seller_codestext listNoWarehouse, product and sales rep filters
{ "dist_code": "228", "stock_day": "03-11-2026", "limit": 1000, "meta_disabled": [0], "product_owner": "HO", "stock_codes": ["91"] }

In the response, data.meta_stocks[] contains, for each product, meta (meta_code, meta_name) and stocks[] (store_code, store_name, seller_code, package cases, piece total pieces, liter, kilogram, sell_price and buy_price total amounts). 400 is returned in cases such as an invalid or unauthorized distributor or a missing date.

11.2 GetWarehouseStock

FieldTypeRequiredDescription
datedateNoIf given, stock before that date; otherwise current stock
distCodestext listNoDistributor codes
productCodestext listNoProduct codes
showOnlyAvailableStocktrue/falseNotrue = non-zero stocks only
{ "date": "2026-11-01", "distCodes": ["228"], "productCodes": ["P0006"], "showOnlyAvailableStock": true }

Each row in the response contains distributorCode, warehouseCode, warehouseName, productCode, productName, evDate, unit3Amount/unit3Name (case), unit2Amount/unit2Name (box), unit1Amount/unit1Name (piece), volume and weight.

11.3 GetDistSales and GetDistStock

GetDistSales body:

FieldTypeRequiredDescription
startDatedateYesStart, inclusive
endDatedateYesEnd, inclusive; if no time is given, 00:00 of that day is used (send 2026-10-31T23:59:59)
{ "startDate": "2026-10-01", "endDate": "2026-10-31T23:59:59" }

GetDistStock takes no parameters (GET). Both methods return the same fields: material (product code), customer (distributor code), salesorg, distR_CHAN, date (first day of the month), koli (cases), adet (pieces not making up a full case) and kg. Sales are summed as positive and returns as negative. These two methods return all distributors; the distributor permission is not applied.

11.4 account/check

POST {base_url}/api/v1/account/check — there is no body; the token is sent in the Authorization header.

StatusResponse
Token validsuccess: true, message: "Valid Token", the same token and expiry time in data
Token expiredmessage: "New Token" and a new token in data. In this case success is returned as false; use the new token
Token invalid400, message: "Invalid token." — call authenticate again

The service's translation and log methods (/translate, /logs, /api/v2/log) are for internal systems and are outside the scope of this guide. The stockposition and stockmovement methods are specific to a particular customer integration; if you need them, ask your service provider for separate documentation.