User Tools

Site Tools



en:xml_direct

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:xml_direct [2025/08/04 09:16] toomasen:xml_direct [2025/12/18 12:50] (current) – [Access to the Interface (URL)] toomas
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
- 
 ======XML Direct ====== ======XML Direct ======
 =====Introduction ===== =====Introduction =====
Line 39: Line 37:
 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>''. 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 **+{{page>en:xmlcore#general_technical_requirements}} 
 + 
 +====curl example ====
 <code> <code>
 curl --location 'https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore.asp' \ curl --location 'https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore.asp' \
Line 49: Line 49:
 </code> </code>
  
 +
 +**put**
 +<code>
 +url --location 'https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore_maht.asp' \
 +--header 'Content-Type: application/x-www-form-urlencoded' \
 +--data-urlencode 'token=••••••' \
 +--data-urlencode 'put=1' \
 +--data-urlencode 'what=order' \
 +--data-urlencode 'xmldata=<?xml version="1.0" encoding="utf-8"?>
 +<orders>
 +    <order number="100034" date="2024-07-11T00:00:00" vatzone="0" paymentterm="K" object="xx,WEB,XML,WEBSHOP" currency="EUR" currate="1.000000000" customercode="TEST1" customername="Test klient OÜ" salesman="XML" deliverymethod="KULLER" customerordernumber="#1" email="xx.yyy@directo.ee" stock="PL" country="EE" phone="+372xxxxxx" address1="Mõisa tee 4" address2="10101, Tallinn" address3="Eesti" deliveryaddress1="Mõisa 4" deliveryaddress2="10101, Tallinn" deliveryaddress3="Eesti" deliveryname="deliveryname3" factoring="001" deliveryterm="CFR" language="eng" deliverymethodcomment="Testing field" text1="Testing field 2" text2="Testing field 3">
 +        <rows>
 +            <row item="0001" price="37.5" quantity="1" sum="37.5" rn="1" rr="1"/>
 +            <row item="0002" price="20.83" quantity="1" sum="20.83" rn="2" rr="2"/>
 +        </rows>
 + <attachments>
 + <attachment>
 + <data>VGVzdA==</data>
 + <name>Test.txt</name>
 +      </attachment>
 +    </attachments>
 +    </order>
 +</orders>'
 +</code>
  
 =====Price ====== =====Price ======
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