User Tools

Site Tools



en:xml_direct

This is an old revision of the document!


FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

XML Direct

Introduction

Introduction XML Direct is a standardized integration interface designed to provide seamless, structured access to business-critical data through a single unified endpoint. The interface is modular and configurable, allowing organizations to select only the components relevant to their needs.

All components within the XML Direct interface follow a fixed field structure, ensuring a uniform data format across all Directo customer environments. This common structure enables faster implementation and easier maintenance, as no customer-specific development is required.

Key Features

  • Modular Architecture: Components (e.g., customers, invoices, inventory) can be enabled individually according to specific integration requirements.
  • Uniform Data Format: Field definitions and data structure are standardized across all implementations, minimizing inconsistencies.
  • Shared Development Model: Enhancements and updates are applied centrally and benefit all users, with no need for client-specific customization.
  • Secure Access via API Keys:
    • Multiple API keys can be generated and assigned to different partners.
    • Each API key can be restricted to access only specific components.
    • This provides enhanced flexibility and data security.

Implementation Considerations

Prior to implementation, it is essential to:

  • Define the scope of integration.
  • Identify the required components.
  • Ensure the technical partner has access to the necessary documentation and authentication details.

Once agreed upon, activating the XML Direct interface is straightforward and does not require any Directo-side development or configuration.

API Key

To find the interface XML key and provide it to the developer:

  1. Log in to Directo with a user who has SUPER rights
  2. Since there can be multiple API keys, you need to open the employee card for whom the key has been created. For example, open the employee card 'XML'
  3. Go to the Admin tab
  4. Go to the XML interfaces section
  5. On the line of the required interface, press the button to see the key

Access to the Interface (URL)

Access to the interface is via the POST method, form/urlencoded, to the following URL: https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore.asp

A token must be used for access (see the API Key obtained in the previous chapter). The token replaces the older interface types' appkey and database name all at once. The token must be sent via the POST method in the TOKEN variable (similar to submitting an HTML form) to the given URL to get a result. In case of an incorrect or improperly sent token, the response is <result type=„5“ desc=„Unauthorized“/>. In case token is missing the response is <err>token required</err>.

curl example

curl --location 'https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore.asp' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=••••••' \
--data-urlencode 'get=1' \
--data-urlencode 'what=xxxxx' \
--data-urlencode 'ts=xx.xx.xxxx'

Price

The price depends on the selected components.
The output of deleted documents is included in the price and is free of charge.

The price for an additional API key is €0 per month.
If multiple API keys have the same components, the fee for them is charged only once.

Example:

  • API key A contains outputs: customer and item
  • API key B contains outputs: customer and order

→ In this case, the fee is only for three unique components: customer, item, and order.

Testing

General

  • Output interfaces show all records, and restrictions can be made with query filters!
  • The functionality of input interfaces can be controlled with TRANSPORT PARAMETERS - please read more about the Transport Parameters of the input component. By default, a transport parameter with an empty or '0' value is not required.
  • Some inputs also support setting default values.

Components

Selectable components

Component (what) Input \ (put=1) Output \ (get=1)
Orders (order) x x
Invoices (invoice ) x x
Receipts (receipt) x x
Customers (customer) x x
Suppliers (supplier) x x
Items (item) x x
Items:Stock Limits (itemstocklimit) x
Items:Packages (itempackage) x
Items:Related Items (itemrelitem) x
Item classes (itemclass) x
Stock level (stocklevel) x
Stock level with serial numbers (stocklevel_sn) x
Stock level with variants (stocklevel_variant) x
Price formula rows (priceformularow) x
Purchase invoices (purchase) x x
Financial transactions (transaction) x x
Resources (resource) x x
Deleted documents x

Inputs

Invoices

what=invoice Schema

XML field SQL field UI field Explanation
session_id x for internal use at Directo side, do not send this field!
number number Invoice document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
date aeg Date ALT.FROM: current time
duedate aeg2 Due date ALT.FROM: paymentterm
transactiondate kande_aeg
vatzone maa VAT zone local = 0, EU = 1, export = 2 , ALT.FROM: customer > 0
paymentterm tingimus P-term ALT.FROM: customer , if receipt creation is used, this code also becomes the payment method of the receipt
ordernumber tellimusenr Order no.
latepaymentpenalty viivis Late payment penalty ALT.FROM: customer
object objekt Object ALT.FROM: tr.params
project projekt Project
account konto Debt account
country asumaa Destination country ALT.FROM: customer
currency valuuta Currency ALT.FROM: glob.settings > 'EUR'
currencyrate kurssbv1 Rate ALT.FROM: ECB current published rates
customercode klient_kood Customer mandatory by default!
customername klient_nimi ALT.FROM: customer
orderer_code klient_tellija
contact esindaja Their representative ALT.FROM: customer
comment kommentaar Comment
intcomment sisekommentaar Internal comment
salesman myyja Sales agent ALT.FROM: tr.params > 'XML'
language keel Language ALT.FROM: customer
customerordernumber klienditellimus Customer's order no.
email email e-mail ALT.FROM: customer
address1 aadress1 address, ! according to settings ALT.FROM: customer
address2 aadress2 address, ! according to settings ALT.FROM: customer
address3 aadress3 address, ! according to settings ALT.FROM: customer
phone telefon Phone ALT.FROM: customer
fax faks Fax
deliveryname klientnimi_lahetusel Name on delivery
deliveryaddress1 lahetusaadress1 delivery address, ! according to settings
deliveryaddress2 lahetusaadress2 delivery address, ! according to settings
deliveryaddress3 lahetusaadress3 delivery address, ! according to settings
priceformula hinnakiri Price formula
vatregno kmregnumber VAT Reg. no ALT.FROM: customer
datafield1 lisa_field1 Add. field 1, ! or according to settings
datafield2 lisa_field2 Add. field 2, ! or according to settings
datafield3 lisa_field3 Add. field 3, ! or according to settings
datafield4 lisa_field4 Add. field 4, ! or according to settings
datafield5 lisa_field5 Add. field 5, ! or according to settings
datafield6 lisa_field6 Add. field 6, ! or according to settings
datafield7 lisa_field7 Add. field 7, ! or according to settings
quotation pakkumine Offer
contractnumber leping Contract
prepayment ettemaksu_arve 1 for prepayment invoice, 0 for regular invoice
type tyyp
status staatus Status
paymenttotal laekumine_summa :!: Positive number will create receipt with same doc. number. If receipt with this number already exists, receipt will not be created and no notification will be issued
confirm kinnita “1” - confirm document
stock ladu Stock ALT.FROM: tr.params
creditedinvoice kredarve Credit invoice
asset inventar Asset
dealtype tehinguliik Transaction type
delivery lahetusaeg Delivery time
deliveryterm lahetustingimus Deliv. term. ALT.FROM: customer
deliverytermcomment lahetustingimus_komm Deliv. term.
deliverymethod lahetusviis Delivery method
deliverymethodcomment lahetusviis_komm Delivery method
manager haldur Responsible person
changestock muudaladu stock changing invoice = 1
customer_type klient_tyyp On customer card: Type company = 0, private citizen = 1, government institution = 2
customer_regno klient_regnr On customer card: Reg no
customer_class klient_klass On customer card: Class
customer_loyaltycard klient_kliendikaart On customer card: Loyalty card
rows:
XML fieldSQL fieldUI fieldExplanation
itemartikkelItem
descriptionseletusContent ALT.FROM: item
variantvariantVariant
pricehindUnit price unit price without vat
discountpross%
quantitykogusQuantity
unityhikUnit ALT.FROM: item
sumsummaSum
accountkontoAccount ALT.FROM: item > item class (depending on vatregion)
objectobjektidObject ALT.FROM: item > item class
projectprojektProject ALT.FROM: item > item class
purchasepricekuluPurchase price ALT.FROM: item
vatcodekmkVAT code ALT.FROM: customer > item > item class (depending on vatregion)
commentr_kommentaarComment
date1r_aeg1
date2r_aeg2
salesmanr_myyjaSalesperson
ordertellimus
orderrowtrn
stockr_laduStock
snseerianumberSerial no.
deliverytimelahetusaegDelivery time
customerr_klientCustomer
customernamer_klient_nimiCustomer name
text1tekst1Text1
text2tekst2Text2
text3tekst3Text3
text4tekst4Text4
constant1konstant1Constant1
constant2konstant2Constant2
constant3konstant3Constant3
constant4konstant4Constant4
shelfriiulShelf
rnrnNo.row order number in document 1 - N , ALT.FROM: random
rrrvRrrow reference for grouping, otherwise equals to rn , ALT.FROM: equals to rn
Invoice transport parameters
TYPECODEPARAMETER 1PARAMETER 2EXPLANATION
XMLxd_changestock0INVOICEStock changing invoice (Param.1 =1 means change stock)
XMLxd_autocustomer_autocode0INVOICEWhen creating a related customer, the code is created in the interface, a unique email is required and system settings for customer codes are necessary
XMLxd_update1INVOICEAllow document update if there are no related documents
XMLxd_customer_update0INVOICEPartial update of customer data (name, email, phone) or according to spec
XMLxd_objectTEST_OBJECTINVOICEDefault object if not sent
XMLxd_salesmanXMLINVOICEDefault salesperson
XMLxd_stockPLINVOICEDefault stock if not sent
XMLxd_confirm0INVOICEAutomatic document confirmation, can also be controlled with the “confirm” XML field
XMLxd_posinvoice0INVOICE1 = POS invoice
XMLxd_autocustomer0INVOICEAutomatic creation of a related customer if the customer code does not exist

To configure default invoice values, read more here

Orders

what=order Schema

Header:
XML field SQL field UI field Explanation
session_id x for internal use at Directo side, do not send this field!
number number Order document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
customercode klient_kood Customer mandatory by default!
customername klient_nimi ALT.FROM: customer
date aeg Date ALT.FROM: current time
address1 aadress1 address, ! according to settings ALT.FROM: customer
address2 aadress2 address, ! according to settings ALT.FROM: customer
address3 aadress3 address, ! according to settings ALT.FROM: customer
deliveryaddress1 lahetusaadress1 delivery address, ! according to settings
deliveryaddress2 lahetusaadress2 delivery address, ! according to settings
deliveryaddress3 lahetusaadress3 delivery address, ! according to settings
paymentterm tingimus P-term ALT.FROM: customer , if receipt creation is used, this code also becomes the payment method of the receipt
deliverymethod lahetusviis Delivery method ALT.FROM: customer
customerordernumber kliendi_tellimus Customer's order no.
email email e-mail ALT.FROM: customer
phone telefon Phone ALT.FROM: customer
comment kommentaar Comment
stock ladu Stock ALT.FROM: tr.params
object objekt Object ALT.FROM: tr.params
contact esindaja Their representative ALT.FROM: customer
datafield1 lisa_field1 Add. field 1, ! or according to settings
datafield2 lisa_field2 Add. field 2, ! or according to settings
datafield3 lisa_field3 Add. field 3, ! or according to settings
datafield4 lisa_field4 Add. field 4, ! or according to settings
datafield5 lisa_field5 Add. field 5, ! or according to settings
datafield6 lisa_field6 Add. field 6, ! or according to settings
datafield7 lisa_field7 Add. field 7, ! or according to settings
paymenttotal laekumine_summa :!: Positive number will create receipt with same doc. number. If receipt with this number already exists, receipt will not be created and no notification will be issued
vatzone maa Zone local = 0, EU = 1, export = 2 , ALT.FROM: customer > 0
priceformula hinnakiri Price formula
currency valuuta Currency ALT.FROM: glob.settings > 'EUR'
currencyrate kurssbv1 Rate ALT.FROM: ECB current published rates
vatregno kmregnumber VAT Reg. no ALT.FROM: customer
country asumaa Destination country ALT.FROM: customer
status staatus Status
delivery lahetusaeg Delivery time
customer_type klient_tyyp On customer card: Type company = 0, private citizen = 1, government institution = 2
customer_regno klient_regnr On customer card: Reg no
customer_loyaltycard klient_kliendikaart On customer card: Loyalty card
salesman myyja Sales agent ALT.FROM: tr.params > 'XML'
project projekt Project
deliveryname klient_nimi_lahetusel Name on delivery
factoring arvetasub Invoice paid by ALT.FROM: customer
deliveryterm lahetustingimus Deliv. term.
language keel Language ALT.FROM: customer
Rows:
XML field SQL field UI field Explanation
item artikkel Item
description nimetus Content ALT.FROM: item
price yhikuhind Unit price unit price without vat
quantity kogus Quantity
discount pross %
account konto Account ALT.FROM: item > item class (depending on vatregion)
vatcode kmkood VAT code ALT.FROM: customer > item > item class (depending on vatregion)
unit yhik Unit ALT.FROM: item
comment r_kommentaar Comment
variant variant Variant
deliverytime lahetusaeg Delivery time
stock r_ladu Stock
project projekt Project ALT.FROM: item > item class
ext_sum ext_sum
ext_id ext_id
rn rn No. row order number in document 1 - N , ALT.FROM: random
rr rv Rr row reference for grouping, otherwise equals to rn , ALT.FROM: equals to rn
Order transport parameters
TYPECODEPARAMETER 1PARAMETER 2EXPLANATION
XMLxd_stockPLORDERDefault stock, if not sent
XMLxd_objectVEEBORDERDefault object, if not sent
XMLxd_autocustomer1ORDERAutomatic creation of a related customer if the customer code does not exist
XMLxd_confirm0ORDERAutomatic document confirmation, this can also be controlled with the XML field “confirm”
XMLxd_update1ORDERAllow document update if there are no related documents
XMLxd_autocustomer_autocode0ORDERWhen creating a related customer, the code is created in the interface, a unique email is required and system settings for customer codes are necessary
XMLxd_customer_update0ORDERPartial update of customer data, (name, email, phone) or according to spec
XMLxd_salesmanXMLORDERDefault salesperson
XMLxd_confirmpayment1ORDERAutomatic receipt confirmation
XMLxd_paymentvatcode11ORDERVAT code for the created related receipt row, receipt is generated upon sending the “paymentamount” field, which must exist in the schema
XMLxd_order_assemble1ORDERTriggers the order assembler for items with recipes

To configure default order values, read more here

Receipts

what=receipt Schema

Header:
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
numbernumberReceipt document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
dateaegTime ALT.FROM: current time
descriptionseletusComment
paymentmodetasumisviisPaym. method
userkasutajaUser
referenceviideReference
objectobjektObject ALT.FROM: tr.params
projectprojektProject ALT.FROM: tr.params
locationarvutiLocation
confirmkinnita confirm document = 1
rows:
XML fieldSQL fieldUI fieldExplanation
invoicearvenumberInvoice no
aegraegTime ALT.FROM: receipt header
customerklient_koodCustomer ALT.FROM: invoice > order > customer by regno field
orderettemaksOrder No.
customernameklient_nimiText ALT.FROM: invoice > order > customer by regno field
paymenttasutiPaid ALT.FROM: in case of base currency = received field
bankcurrencyvaluuta_pCurr. received ALT.FROM: glob.settings > 'EUR'
receivedsumma_pAmount R
currencyratekurss_pRate R ALT.FROM: ECB current published rates
paymentfeeteenustasuS-Fee
vatcodekmkVAT code ALT.FROM: tr.params
paymentfeecurrencyvaluuta_teenusS-Fee curr.
descriptionselgitusExplanation
regnoregReg number/PC ALT.FROM: customer
bankaccountarveldusarveBank account
objectsobjektidObject ALT.FROM: invoice > order
accountr_kontoAccount
fineviivisPenalty
rnrnNo.row order number in document 1 - N , ALT.FROM: random

Transactions

what=transaction Schema

Header:
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
numbernumberNumber document number/ID, mandatory; With combination of field “type” it must be unique for each document and remain same if more than one transaction of the same document is necessary
dateaeg2Time
referenceviideReference
commentseletusExplanation
typetyypType ALT.: FIN
rows:
XML fieldSQL fieldUI fieldExplanation
accountkontoAccount
objectobjektObjects
descriptionsisuContent ALT.FROM: account
vatcodekmkoodVAT code
quantitykogusQuantity
debitamountbaas1deebetDebit
creditamountbaas1kreeditCredit
currencydebitvaluutadeebetCurr. debit
currencycreditvaluutakreeditCurr. credit
currencyrateb1kursileRate ALT.FROM: ECB current published rates
currencyvaluutaCurrency ALT.FROM: glob.settings > 'EUR'
dater_aegTime
supplierhankijaSupplier
customerklientCustomer
projectprojektProject
rnrnNo.row order number in document 1 - N , ALT.FROM: random

Customers

  • When posting and modifying, code and email are always required!

what=customer Schema

Customers
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
codekoodCode document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
namenimiName
objectobjektObject
address1aadress1address, ! according to settings
address2aadress2address, ! according to settings
address3aadress3address, ! according to settings
deliveryaddress1lahaadress1address, ! according to settings
deliveryaddress2lahaadress2address, ! according to settings
deliveryaddress3lahaadress3address, ! according to settings
countymaakondCounty
countryasumaaCountry
contactkontaktRepresentative
phonetelefonPhone
emailemailE-mail mandatory
regnoregnrReg no
vatregnokmregnrVAT reg no
noticemargukiriNotices yes = 1
birthdayklient_synnipaevBirthday
genderklient_suguGender female = 1, male = 0
classklassClass
typeklient_tyypType company = 0, private citizen = 1, government institution = 2
loyaltycardkliendikaartLoyalty card also used for personal ID code
deliverynamenimi_lahetuselName on delivery
deliverymodelahetusviisDeliv. method
alerthoiatusWarning
factoringarvetasubInvoice paid by
faxfaksFax
commentkommentaarComment
paytermtingimusPay. term.
vatzonemaaVAT zone local = 0, EU = 1, export = 2
languagekeelLanguage
salesmanmyyjaSalesperson
bankpankBank
bankaccountarveldusarveAcct. no
urlURLUrl
statusstaatusStatus
accountmanagerkliendihaldurManager
dealtypetehinguliikTransaction type
creditlimitlimiitLimit
priceformulahinnakiriPrice formula
specialpriceformulahinnavalem_eriSpecial offers
discountaleDiscount %
destinationsihtriikDestination
firstnameeesnimi
lastnameperenimi
vatcodekmkoodVAT code
extcodevaline_koodExternal code
deliveryinvoicelah_arveShipment Shipment and Invoice = 1, Shipment = 0
currencyvaluutaCurrency
closedsuletud
Additional fields:
XML fieldSQL fieldUI fieldExplanation
codekood
contentsisuContent
paramparamParameter
Customer transport parameters
TYPE CODE PARAMETER 1 PARAMETER 2 EXPLANATION

Suppliers

  • When posting and modifying, code is always required!

what=supplier Schema

suppliers:
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
codekoodCode document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
namenimiName
contactkontakt
address1aadress1
address2aadress2
address3aadress3
phonetelefon
faxfaks
commentkommentaar
paymenttasumine
vatregiontasu
bankaccountpangakonto
debtaccountvkonto
expenseaccountkulukonto
factoringarvetasub
currencyvaluuta
countrymaa
objectobjekt
languagekeel
classklass
deliverytermlahting
deliverymodelahviis
vatregnokmregnr
alerthoiatus
vatcodekmkood
regnoregnr1
ppaccountekonto
bycustomerklient
lskontolskonto
emailemail
referenceviide
closedsuletud
dealtypetehinguliik
originsaatjariik
normtimenorm_aeg
trancosttransakulu
skypeskype
discountale
proceedersmenetlejad
prefilledeeltaida
stockladu
proceedertempaltemenetlejad_mall
referencemandatoryviide_kohustuslik
typehank_tyyp
purchasinggroupostugrupp
countymaakond
suppliers additional fields:
XML fieldSQL fieldUI fieldExplanation
codekood
contentsisuContent
paramparamParameter

Items

  • When filling out the item card, the interface fills the fields according to the rules mandatory

what=item Schema

Items
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
codekoodCode document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
namenimiName
classklassClass
barcoderibakoodBarcode
areacodepiirkonnakoodOrigin
unityhikUnit
salespricebaashindSales price without VAT
accountlocalkonto_myykSales Domestic
accounteukonto_myyk_EUSales EU
accountexportkonto_myyk_eksportSales Exp
vatcodeKMkoodVAT Domestic
vatcodeeuKMkood_EUVAT EU
vatcodeexportKMkood_eksportVAT non-EU
typetyypType ALT.FROM: tr.params, cannot be updated. 0=service; 1=stock item; 2=rental item
minlevelminimaaltaseMin level
shelfriiulikoodShelf
weightkaalWeight
volumemahtVolume
warrantygarantiiWarranty
package1yhikumuut1In package 1
package2yhikumuut2In package 2
sntrackingSN_jalgimineSerial no. cannot be updated. 0=without sn tracking; 1=serial no tracking; 2=batch no tracking
costostuhindPurchase price
objectobjektObject
reciperetseptRecipe
recipetorowsretsept_ridadeksRecipe does not apply
alerthoiatusWarning
closedsuletudClosed closed = 1, open = 0
descriptionpikktekstDescription
vatprice1hind_okonlineAdd. price 1 (customizable) with local VAT
vatprice2hind_delfiAdd. price 2 (customizable) with local VAT
vatprice3soodus_hind1Discount price 1 (customizable) with local VAT
vatprice4soodus_hind2Discount price 2 -customizable) with local VAT
vatpricehind_tavalineRegular price ALT.FROM: salesprice + local vat
priorityprioriteetPriority
urlurlURL
supplierhankija_koodSupplier
supplieritemhankija_artikkelSupp. item
maxlevelmaksimaaltaseMax level
abcabcABC class
cn8codecn8_koodCN8 code
cnkoguscnkogusCN quantity
vatcodeeu2KMKood_EU2VAT EU 2
vatcodeeu3KMKood_EU3VAT EU 3
vatcodeconcernKMKood_kontsernVAT concern
accounteu2konto_myyk_EU2Sales EU 2
accounteu3konto_myyk_EU3Sales EU 3
accountconcernkonto_myyk_kontsernSales concern
snclasssn_klassSN class
normarrivaltimenorm_aegNormal arrival time
replacementasendusReplacement
snrulesn_reegelSN rule
projectprojektProject
variantsvariandidVariant cannot be updated. 0=no; 1=yes
autosnauto_snAuto SN
specialprice1kaibeta_hind1Item add. price w/o VAT 1 (customizable)
specialprice2kaibeta_hind2Item add. price w/o VAT 2 (customizable)
specialprice3kaibeta_hind3Item add. price w/o VAT 3 (customizable)
specialprice4kaibeta_hind4Item add. price w/o VAT 4 (customizable)
specialprice5kaibeta_hind5Item add. price w/o VAT 5 (customizable)
specialprice6kaibeta_hind6Item add. price w/o VAT 6 (customizable)
specialprice7kaibeta_hind7Item add. price w/o VAT 7 (customizable)
specialprice8kaibeta_hind8Item add. price w/o VAT 8 (customizable)
heightkorgusHeight
widthlaiusWidth
depthsygavusDepth
grossweightkaal_brutoGross weight
giftcertkinkekaartGift card
manufacturertootjaManufacturer
Items additional fields:
XML fieldSQL fieldUI fieldExplanation
codekood
contentsisuContent
paramparamParameter
Items packages:
XML fieldSQL fieldUI fieldExplanation
classpakendi_klassClass
typepakendi_tyypType
heightkorgusHeight
widthlaiusWidth
lengthpikkusLength
volumemahtVolume
qtykogusPack. qty
packageweightpakendi_kaalPackage weight
productweighttoote_kaalProduct weight
totalweightkaal_kokkuTOTAL weight
totalvolumemaht_kokkuTOTAL volume
barcoderibakoodBarcode
commentkommentaarComment
shelfriiulShelf
Items - supplier items:
XML fieldSQL fieldUI fieldExplanation
supplierhankijaSupplier
supplieritemhankija_artikkelSupp. item
namenimiName
pricehindPurchase price
normarrivaltimenorm_aegNormal arrival time
objectobjektObject
variantvariantVariant
variantavariantaVariantA - (customizable)
variantbvariantbVariantB - (customizable)
variantcvariantcVariantC - (customizable)
variantdvariantdVariantD - (customizable)
variantevarianteVariantE - (customizable)
variantfvariantfVariantF - (customizable)
variantgvariantgVariantG - (customizable)
varianthvarianthVariantH - (customizable)
salespricemyygihindSales price without VAT
salesmyyk ALT.FROM: tr.params, cannot be updated , sales item = 1, supplier item = 0
Items - minmax:
XML fieldSQL fieldUI fieldExplanation
stockladuStock
shelfriiulShelf
variantvariantVariant
minlevelmin_kogusMIN
maxlevelmax_kogusMAX
Item transport parameters
TYPE CODE PARAMETER 1 PARAMETER 2 EXPLANATION
XML xd_supplieritemtype 0 ITEM 0 = supplier item; 1 = sales item
XML type 1 ITEM 1 = stock item

Purchase Invoices

what=purchase Schema

Header
XML fieldSQL fieldUI fieldExplanation
session_idx for internal use at Directo side, do not send this field!
numbernumberNumber document number/ID, mandatory; It must be unique for each document and remain same if more than one transaction of the same document is necessary
dateaegInvoice time ALT.FROM: current time
duedatetas_aegDue time
sumsummaTo be paid sum with vat
supplierinvoicenohankija_arveSupplier invoice
paymenttermtingimusPay. term. ALT.FROM: supplier
suppliercodehankija_koodSupplier
suppliernamehankija_nimi ALT.FROM: supplier
bankaccountpangakonto ALT.FROM: supplier
referenceviideReference number ALT.FROM: supplier
transactiontimekande_aegOper. time
creditaccountkred_kontoCred. account ALT.FROM: supplier > glob.settings
factoringarve_tasubInvoice paid by
currencyvaluutaCurrency ALT.FROM: glob.settings > 'EUR'
currencyratekurssbv1Rate ALT.FROM: ECB current published rates
vatzonemaaVAT Zone (hidden field) local = 0, EU = 1, export = 2 , ALT.FROM: supplier > 0
commentkommentaarComment
vatarvestatudkmVAT total
objectobjektObject ALT.FROM: supplier > tr.params
bankcodepangakoodBank code
creditpurchasekredostCred. purch.
purchaseorderostutellimusPurchase order
projectprojektProject
emailemaile-mail ALT.FROM: supplier
stockreceiptsissetulekStock receipt
countryasumaaOrigin country ALT.FROM: supplier
prepaymentettemaksPrepayment
statusstaatusStatus
typetyypType
dividedsumjagatav_summaDivisible sum
vatdatekm_aegVAT time ALT.FROM: date > current time
reclamationreklamatsioonReclamation
reclamationcommentrekl_selgitusRecl. explanation
assetinventarAsset
datafield1lisa_field1
datafield2lisa_field2
datafield3lisa_field3
datafield4lisa_field4
datafield5lisa_field5
datafield6lisa_field6
datafield7lisa_field7
intcommentsisekommentaarInternal comment
supplier_classhankija_klassClass
supplier_vatcountryhankija_maa_tasuVAT-zone local = 0, EU = 1, export = 2 , ALT.FROM: customer > 0
supplier_regnohankija_regnr1Reg no 1
supplier_vatregnohankija_kmregnrVAT reg no
supplier_typehankija_tyypType
confirmkinnitaState “1” - confirm document
rows
XML fieldSQL fieldUI fieldExplanation
accountkontoAccount
objectobjektObject ALT.FROM: project
namesisuContent ALT.FROM: account
linetotalwovatsummaSum
vatcodekmkoodVAT code ALT.FROM: supplier > account > object
projectprojektProject
customerklient_koodCustomer
itemartikkelItem
quantitykogusQuantity
date1r_aeg1Start
date2r_aeg2End
contractlepingContract
userkasutajaUser
oidoidOID
orderrntrn
assetr_inventarAsset
pricemyygihindSales price
constant1konstant1
constant2konstant2
constant3konstant3
constant4konstant4
text1tekst1
text2tekst2
text3tekst3
text4tekst4
intcommentr_sisekommentaarInternal comment
vatsumkmVAT
rnrnNo.
attachments
XML fieldSQL fieldUI fieldExplanation
name attachment_name
description attachment_kirjeldus
code kood for updating existing attachments, do not send this field for new attachments
sharepoint_link cloud_preview_query external Sharepoint attachment link
gdrive_link cloud_gdrive external Google Drive attachment link
ext_linkcloud_ext_link external attachment link, must be full external link starting with
http://
Purchase invoice transport parameters
TYPE CODE PARAMETER 1 PARAMETER 2 EXPLANATION
XML xd_autosupplier 1 PURCHASE Automatic creation of a related supplier if the supplier code does not exist, a unique reg. number is a prerequisite
XML xd_autosupplier_autocode 0 PURCHASE When creating a related supplier, the code is created in the interface, a unique reg. number is required and system settings for supplier codes are necessary
XML xd_update 0 PURCHASE Allow document update if there are no related documents
XML supplier_update 0 PURCHASE Partial update of supplier data, (email, … ) fields need to be specified in the spec
XML xd_object VEEB PURCHASE Default object, if not sent
XML xd_confirm 0 PURCHASE

Resources

what=resource Schema

Header:
XML fieldSQL fieldUI fieldExplanation
session_idx
ext_unique_idext_unique_id
numbernumber
dateaeg
commentkommentaar
customervaik_klient_kood
employeevaik_tegija
stockladu
projectprojekt
assetinventar
datafield1lisa_field1
datafield2lisa_field2
datafield3lisa_field3
datafield4lisa_field4
datafield5lisa_field5
datafield6lisa_field6
datafield7lisa_field7
objectobjekt
confirmkinnita
Rows:
XML fieldSQL fieldUI fieldExplanation
itemartikkel
quantitykogus
dateaeg
descriptionnimetus
pricehind
discountale
commentkommentaar
eventevent
purchasepricefifo
unityhik
employeetegija
invoicedarvega
contractleping
timewindow1aeg_aken1
timewindow2aeg_aken2
projectprojekt
sumsumma
customerklient_kood
customernameklient_nimi
stockr_ladu
vatcodekmk
contactkontakt
objectobjektid
closedsuletud
initialqtykogus_alg
finishedqtykogus_tehtud
stoppedpeatutud
customerqtyklient_kogus
snsn
constant1konstant1
constant2konstant2
constant3konstant3
constant4konstant4
assetr_inventar
capitalassetpohivara
shelfriiul
departmentosakond
text1tekst1
text2tekst2
text3tekst3
text4tekst4
deletekustuta
rnrn

Outputs

Items (Items)

  • what=item Schema
    Filters: class,code,type,barcode,supplier,supplieritem,closed,ts
Item stock limits (Item stock limits)
  • what=itemstocklimit Schema
    Filters: code,stock,ts
Item packages (Item packages)
  • what=itempackage Schema
    Filters: code,ts
Item relations (Item relations)
  • what=itemrelitem Schema
    Filters: code,ts

Customers (Customers)

  • what=customer Schema
    Filters: code,loyaltycard,regno,email,phone,closed,ts

Suppliers (Suppliers)

  • what=supplier
  • Filters: code,regno,email,closed,ts

Stock levels (Stock levels)

  • what=stocklevel Schema
  • what= stocklevel_sn Schema
  • what=stocklevel_variant Schema
  • Filters: code,stock,ts

Price formula rows (Price formula rows)

  • what=priceformularow Schema
    Filters: class,code,ts

Item classes (Item classes)

  • what=itemclass Schema
    Filters: code,master

Invoices (Invoices)

  • what=invoice Schema
    Filters: number,customercode,transactiondate,date1,date2,ts, ordernumber

Orders (Orders)

  • what=order Schema
    Filters: number,date1,date2,ts, projekt, customerordernumber, stock, status

Financial transactions (Transactions)

  • what=transaction Schema
    Filters: number,date1,date2,ts

Receipts (Receipts)

  • what=receipt Schema
    Filters: number,date1,date2,ts

Purchase Invoices (Purchase)

  • what=purchase Schema
    Filters: number,date1,date2,supplier,confirmed,status,ts

Resources (Resources)

  • what=resource Schema
  • Filters: number,confirmed,ts

Deleted documents (Deleted documents )

  • what=delete Schema
    Filters: number,code,document,ts
en/xml_direct.1754288182.txt.gz · Last modified: 2025/08/04 09:16 by toomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki