Sisujuht

Stock returns (stockreturn)

Stock returns. Domain: Stock.

what stockreturn
Direction Output (get), Input (put)
Endpoint POST https://login.directo.ee/xmlcore/cap_xml_direct/xmlcore.asp
Schema (output) ws_tagastused.xsd
Schema (input) xml_IN_tagastused.xsd

Output (get)

Query (get)

Parameter Description
token interface token (required)
get 1
what stockreturn
number optional filter
customercode optional filter
status optional filter
project optional filter
stock optional filter
confirmed optional filter
ts changed-since (for syncing)
XML field SQL field Type Length UI label Description
number number int 9 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
order number_tellimus int Tellimuse nr
date aeg dateTime Tagastuse aeg
customercode klient_kood string 64 Kliendi kood
customername klient_nimi string 510 Kliendi nimi
comment tekst string Tekst
status staatus string 64
object objekt string 510 Objekt
project projekt string 64 Projekt
stock ladu string 64 Ladu
confirmed kinnitatud int 1 confirmed document = 1
ts ts dateTime document last changed

Rows

XML field SQL field Type Length UI label Description
itemcode artikkel string 510 Artikkel
sn seerianumber string 50 SN/Mudel
quantity kogus decimal Tagastatud
shelf riiul string 64 Riiul
object objektid string 510 Objekt
stock r_ladu string 64 Ladu
project r_projekt string 64 Projekt
bestbefore parimenne dateTime
rn reanr int NR

Input (put)

Create: send the document. Modify: requires xd_update=1 and posting the whole document. Default values (ALT.FROM): Mandatory fields.

Header

XML field SQL field Type Length Mandatory UI label Description
number number int 9 yes 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
order number_tellimus int yes Tellimuse nr Mandatory
date aeg dateTime yes Tagastuse aeg Mandatory
customercode klient_kood string Kliendi kood If missing customer code is taken from Sales order
comment tekst string Tekst
status staatus string Staatus
object objekt string Objekt
stock ladu string Ladu
country asumaa string Sihtriik
dealtype tehinguliik string Tehinguliik
project projekt string Projekt
confirm kinnita int 1 confirm document = 1

Do not send:

Rows

XML field SQL field Type Length Mandatory UI label Description
itemcode artikkel string yes Artikkel Mandatory
sn seerianumber string 50 SN/Mudel
quantity kogus decimal yes Kogus Mandatory
shelf riiul string Riiul
object objektid string Objekt
stock r_ladu string Ladu
project r_projekt string Projekt
rn reanr int yes NR Mandatory

Transport parameters

Configured on the token (interface), not sent in xmldata. PARAMETER 2 = document type.

TYPE CODE PARAMETER 1 PARAMETER 2 DESCRIPTION
XML xd_country EE STOCKRETURN Default country (origin)

Response

docid = number of the created/updated document. Error codes: Responses and error codes.

<results>
  <Result Type="0" Desc="Created" docid="100001" doctype="STOCKRETURN" submit="Stock returns"/>
</results>