Data for filtering (StorageQuery object)

JSON:

Receive all Sent Documents (“statuses”: 2,3)

{
  "archive": false,
  "statuses": [
    2,
    3
  ],
  "type": [
    {
      "type": 0,
      "title": "all",
      "description": "all"
    },
    {
      "type": 0,
      "title": "all",
      "description": "all"
    }
  ],
  "exchangeStatus": [],
  "extraParams": [],
  "tags": [],
  "loadComments": true,
  "loadTags": true,
  "loadStatuses": true,
  "direction": {
    "type": "EQ",
    "sender": [
      "9864066822430"
    ],
    "receiver": []
  },
  "family": 12
}

Receive all incoming documents (“statuses”: 4,5) from the specified sender/-s (sender:gln)

{
  "archive": false,
  "statuses": [
    4,
    5
  ],
  "type": [
    {
      "type": 0,
      "title": "all",
      "description": "all"
    },
    {
      "type": 0,
      "title": "all",
      "description": "all"
    }
  ],
  "exchangeStatus": [],
  "extraParams": [],
  "tags": [],
  "loadComments": true,
  "loadTags": true,
  "loadStatuses": true,
  "direction": {
    "type": "EQ",
    "sender": [
      "9864067620417"
    ],
    "receiver": [
      "9864066822430"
    ]
  },
  "family": 12
}

Get all Archival documents. As incoming and sent documents become archived, all statuses are indicated, recipient / sender = own GLN

{
  "archive": true,
  "statuses": [
    2,
    3,
    4,
    5,
    6
  ],
  "type": [
    {
      "type": 0,
      "title": "all",
      "description": "all"
    },
    {
      "type": 0,
      "title": "all",
      "description": "all"
    }
  ],
  "exchangeStatus": [],
  "extraParams": [],
  "tags": [],
  "loadComments": true,
  "loadTags": true,
  "loadStatuses": true,
  "direction": {
    "type": "OR",
    "sender": [
      "9864066822430"
    ],
    "receiver": [
      "9864066822430"
    ]
  },
  "family": 12
}

Table 2 - Parameters description of object StorageQuery

Parameter

Mandatory/Optional

Format

Description

Object StorageQuery

extraParams

List<ExtraQueryParameters>

array of objects;

multiExtraParams

List<ExtraQueryParameters>

array of objects;

type

M

List<XDocType>

array of objects; document types list: 0 - all types, 1/2/3 … and more - specific document type

statuses

M

List<Integer>

array; a list of statuses (states) of documents according to which the selection will take place:

  • 0 - all

  • 1 - open (drafts)

  • 2 - sent (sent-Sender)

  • 3 - delivered (delivered-Sender)

  • 4 - inbox (incoming-Recipient)

  • 5 - read (read-Recipient)

  • 6 - error

  • 7 - deleted

extraStatuses

List<Integer>

array; extrastatuses list

tags

List<Long>

array; tag

exchangeStatus

O

List<Integer>

array; document flow status

docs

List<Long>

array; documents

docUUIDs

List<UUID>

array; unique document identifiers

partners

List<Long>

array; counterparty identifiers

families

List<Integer>

array; service attribute (family)

  • 1 - EDI+UZD

  • 7 - ETTN

direction

M

Direction

object; document flow direction; specified Sender, Recipient and the connection between them in terms of document selection

limit

O

Limitation

object; selection filter (data output settings)

orderBy

O

OrderBy

filter document by it date or description

groupBy

O

String

united by chain / document id

number

O

String

document number

family

O

int

service

  • 1 - EDI

  • 2 - UZD

  • 4 - CERTIFICATS

  • 6 - ATS

  • 7 - ETTN

  • 8 - DISTRIBUTION

  • 9 - SIMPLEDOC (Vilnyi)

  • 10 - TENDER

  • 11 - AGREEMENT

  • 12 - OPENPRICE (Have Product)

partnerId

Long

retail network id

chainHash

String

the hash value obtained by chain processing

docHash

String

the hash value obtained by document processing

docDate

O

DateTimeRange

object; the date which is specified in the document (according to Kyiv time relative to UTC in UNIX-timestamp format) from / to

docCreate

O

DateTimeRange

object; document creation date (according to Kyiv time relative to UTC in UNIX-timestamp format) from / to

docRead

O

DateTimeRange

object; date of reading the document (according to Kyiv time relative to UTC in UNIX-timestamp format) from / to

docChanged

O

DateTimeRange

object; the date of the last change of the document (according to Kyiv time relative to UTC in UNIX-timestamp format) from / to

archive

Boolean

mark of an archival feature presence in a document

important

boolean

important document mark

visible

boolean

visibility mark

loadBody

boolean

mark of the body presence in a document

loadComments

boolean

mark of the comments presence in a document

loadStatuses

boolean

mark of the statuses presence in a document

loadTags

boolean

mark of the tags presence in a document

loadChain

boolean

mark of the chains presence in a document

loadAttachments

boolean

mark of the attachments presence in a document

Table 3 - Parameters description of object ExtraQueryParameters

Parameter

Mandatory/Optional

Format

Description

Object ExtraQueryParameters

operator

enum (AND, OR)

type

M

enum (EQUALS, EQUALS_UUID, EQUALS_MD5, LIKE, MORE, MORE_EQ, LESS, LESS_EQ, IN)

fieldName

String

parameter name

value

String

parameter id

Table 4 - Parameters description of object Direction

Parameter

Mandatory/Optional

Format

Description

Object Direction

type

enum (EQ, OR, IN)

sample type; possible values: EQ/OR/IN

  • EQ - select documents with same mentioned sender and receiver parameter only;

  • OR - select documents with mentioned sender OR receiver parameter only;

  • IN - select documents with mentioned sender OR receiver parameter which is one of those specified in the sender and receiver arrays

sender

О/Н

List<String>

array; senders; senders GLN - mandatory, but may be empty if the GLN receiver array is specified

receiver

О/Н

List<String>

array; receivers; receivers GLN - mandatory, but may be empty if the GLN sender array is specified

Table 5 - Parameters description of object Limitation

Parameter

Mandatory/Optional

Format

Description

Object Limitation

offset

O

int

offset the first element of the list relative to the upper limit of the sample (by default 0)

count

O

int

sampling limit (amount)

Table 6 - Parameters description of object DateTimeRange

Parameter

Mandatory/Optional

Format

Description

Object DateTimeRange

startTimestamp

long

the beginning of the time range

finishTimestamp

long

end of time range

Table 7 - Parameters description of object XDocType

Parameter

Mandatory/Optional

Format

Description

Object XDocType

param-desc

type

int

document / ticket type id

title

String

document / ticket name

description

String

document / ticket description

Table 8 - fieldName parameters description (object ExtraQueryParameters)

Parameter id

Parameter name

Mandatory/Optional

Format

Description

1

created_from

UUID

document or chain ID

2

is_signed

TINYINT

signing mark

  • 0 - without signature;

  • 1 - signed

3

encrypted

TINYINT

encryption mark

4

comdoc_reestr_id

INT

factoring Register id (on the basis of a commercial document)

5

comdoc_reestr_is_active

TINYINT

activity note of the factoring agreement

6

ftpex_file_name

VARCHAR

the name of the file sent via FTP

7

ftpex_file_date

INT

the document date / time of sending via FTP

8

inv_date

INT

invrpt document date (Inventory Report)

9

inv_num

VARCHAR

invrpt document number (Inventory Report)

11

sub_doc_type_id

INT

document subtype id ( subtype_description )

12

sub_status_id

INT

document status id (in more detail); characterizes the state of the document chain

13

action

VARCHAR

status / state of the document according to the user’s actions;

For EDI:

ORDER (document type):

  • 0 - original (O)

  • 1 - replacement (R)

  • 2 - deletion (D)

  • 3 - order fictitiousness (F)

RETANN:

  • 1 - RETANN document sent

  • 2 - RETINS sent in response

PRICAT (document type):

  • 9 - price list (full)

  • 13 - EDIN price list request

  • 15 - for EDIN Distribution service

  • 19 - EDIN 2.0 price list request

  • 51 - response to the price list

  • 21 - addition to the existing price list

  • 99 - price list refusal

COACSU (document type):

  • 49E - original document

  • 397 - document at response

CONDRA:

  • 1 - sent

  • 2 - accepted by the other party

  • 3 - denied by the other party

  • 4 - revoked by the sender

For Vilnyi:

  • 0 - Pending signing

  • 1 - Partially signed (for Sender)

  • 1 - Awaiting signature of the recipient (for the Recipient)

  • 1 - Signed (for the Recipient, if the parameter is_signed = 1 in the document)

  • 2 - Signed

  • 3 - Rejected by the recipient

  • 4 - Rejected by the sender

  • 5 - Completed

  • Copy - sub_status_id = 1

For ETTN:

  • 101 - document without errors (status);

  • 102 - document with errors (status)

14

buyer_uuid

VARCHAR

sender of the document

15

consignee_uuid

VARCHAR

consignee

16

consignor_uuid

VARCHAR

consignor

17

customer_uuid

VARCHAR

buyer

18

performer_uuid

VARCHAR

performer

19

supplier_uuid

VARCHAR

supplier

20

delivery_place_uuid

VARCHAR

place of delivery

21

contract_date

VARCHAR

date of contract

22

contract_number

VARCHAR

contract number

23

delivery_date

O

INT

delivery date

24

order_number

O

VARCHAR

order number

25

order_date

INT

order date

26

return_date

INT

return date

27

summ

VARCHAR

amount including VAT

28

parent_chain_hash

MD5

chain hash

29

period

VARCHAR

deadline for signing the document

31

trans_id

VARCHAR

transaction id

32

ttn

VARCHAR

number of the consignment note

33

doc_start_date

VARCHAR

the beginning of the document signing period

34

doc_end_date

VARCHAR

the deadline for document signing

35

delivery_note_number

VARCHAR

tax invoice number

42

contract_gln

VARCHAR

delivery place GLN at the goods agreement (Agreem-> Comdoc)

43

doc_date

INT

date from document

44

delivery_agreement_number

VARCHAR

number of agreements

45

delivery_agreement_date

INT

date of agreement

46

varn

VARCHAR

legally significant document id

47

other_info

TEXT

additional data

48

sub_doc_date

INT

document subtype date

49

sub_doc_number

VARCHAR

document subtype number

50

doc_error

TEXT

working with the document error

51

doc_info

TEXT

comment to the document

52

old_doc_id

INT

document id

53

sub_status_date

INT

document status date (document chain status)

54

from_doc_id

INT

the serial number of the document in the chain

56

doc_num

VARCHAR

document number

57

sender

VARCHAR

sender GLN

58

recipient

VARCHAR

recipient GLN

59

file_name

VARCHAR

name of the attached file (attachment)

60

xml_hash

VARCHAR

content hash of the document

61

answer_doc_id

INT

COMDOC id which is sent in response

80

identifier

VARCHAR

document ID in the client system

82

compound_number

VARCHAR

component number

85

doc_process

TINYINT

87

users

VARCHAR

88

basis_doc_subtype

INT

base document subtype

89

basis_doc_number

INT

base document number

90

basis_doc_date

INT

base document date

summ_without_tax

INT

amount without VAT

tax_summ

INT

VAT amount

summ

INT

amount including VAT

129

receiving_note_number

VARCHAR

Reception notification number (DOCUMENTINVOICE … ReceivingAdviceNumber)

137

branch_uuid

VARCHAR

«branch supplies» uuid (АТБ COMDOC+DESADV)

parent_doc_uuid

VARCHAR

uuid initial e-TTN (recorded when replacing the sent draft)

139

format_version

VARCHAR

version number (field C_DOC_VER) from Tax Invoice (DECLAR) or Adjustment to Tax Invoice (DECLARj12)

142

parent_docs_match

INT

0 - comdoc_007 with changed data for reconciliation by desadv; 1 - comdoc_007 with correct / unchanged data for reconciliation on desadv

149

post_start_date

[yyyy-MM-dd]

eadline date for Metro 7a documents

153

review_deadline_date

[yyyy-MM-dd]

deadline for review for Metro 7b documents (ReviewDeadlineDate)

sign_hash

VARCHAR

signature hash

draft_date_created

INT

draft creation date

carrier_b_uuid

BINARY

carrier identifier

consignee_b_uuid

BINARY

consignee identifier

consignor_b_uuid

BINARY

shipper ID

external_doc_id

INT

id TTN document in the Central Base

Table 9 - DocType parameters description (object XDocType)

Type

Name

Description

0

all

all

1

invoice

Invoice

2

orders

Order

3

recadv

Receipt notification

4

desadv

Shipment notification

5

ordrsp

Order confirmation

6

pricat

Price List

7

comdis

Commercial discussion

10

declar

Tax invoice

11

insdes

Delivery instructions

13

slsrpt

Sales report

14

invrpt

Inventory report

15

coacsu

The act of mutual reconciliation

17

iftmin

Інструкція про транспортування

18

retann

Return notification

19

iftmbf

Application for transportation

20

partin

Contractor information for the supplier

21

mscons

Report on provided services

25

retins

Return instructions

28

comdoc

Commercial document

29

declarj12

Adjustments to the tax invoice

30

condra

Unstructured document

35

metro7a

Annex to the contract 7A

39

metro7b

Annex to the contract 7B

40

prodlist

Electronic specification

41

agreem

Commodity coordination

42

iftmbc

Confirmation of the application for transportation

59

documentinvoice

Consignment note

67

doccorinvoice

Adjustment to the consignment note

98

quotes

Addition to the Shipment Notice

111

transhipment

The act of goods reloading

117

acceptance

Act of acceptance-transfer

113

booking

Application for transportation

114

bookingconfirmation

Confirmation of transportation

112

completion

Act of work performed

118

docinvoiceact

Act of provided services (Metro)

119

discrepancy

The act of disagreement

120

contrl

Shipment report

121

ttn

Electronic consignment note (e-TTN)

122

simple_doc

Vilnyi service document

123

reload

Act of overload

124

disagreement

Act of disagreement to e-TTN

125

adjustment

Act of adjustment

126

warehouse_change

Act of change of destination

127

unload_storage

Act of unloading at the intermediate warehouse

128

load_storage

Act of loading in the intermediate warehouse

129

ettn_stop

Act of forced termination of TTN

130

resealing

The act of resealing

131

load_reject

Act of refusal to download

132

ttn_ecmr

ETTN (v3)

133

reload_ecmr

Act of overload (v3)

134

disagreement_ecmr

Act of disagreements (v3)

135

consignee_change_ecmr

Act of change of destination (v3)

136

storage_delivery_ecmr

Act of unloading at an intermediate warehouse (v3)

137

adjustment_ecmr

Act of adjustment (v3)

138

storage_pickup_ecmr

Act of loading in intermediate storage (v3)

139

resealing_ecmr

Act of resealing (v3)

140

load_reject_ecmr

Act of load rejection (v3)

141

stop_ecmr

Act of forced termination of e-ttn (v3)

Table 10 - Description of COMDOC subtypes

Commercial document subtype

sub_doc_type_id

Name and description

005

5

Defects Certificate (COMDOC_005)

006

6

Delivery document/Goods Delivery Note (COMDOC_006)

007

7

Receive document/Goods Received Note (COMDOC_007)

008

8

Product specification (COMDOC_008)

009

9

Certificate of Nonconformity/Non-conformance Report (COMDOC_009)

011

11

Notice of Return/Return notification (COMDOC_011)

012

12

Return Delivery Note (COMDOC_012)

013

13

Works Acceptance Certificate (COMDOC_013)

015

15

Offset Certificate (COMDOC_015)

016

16

Invoice (COMDOC_016)

018

18

Services Acceptance Certificate (COMDOC_018)

019

19

Annulment (COMDOC_019)

021

21

Notice of Refusal to Sign Document (COMDOC_021)

022

22

Dispatch invoice/Note for Internal Handling (COMDOC_022)

023

23

Transportation services specification (COMDOC_023)

024

24

Acquiring accountant report (COMDOC_024)

025

25

Acquiring account (COMDOC_025)

026

26

Summary of services (COMDOC_026)

027

27

Goods invoice/Consignment note (COMDOC_027)

028

28

Application for forwarding service (COMDOC_028)

029

29

Act of mutual settlements reconciliation (COMDOC_029)

030

30

Claim (COMDOC_030)

031

31

Returnable packaging invoice (COMDOC_031)

032

32

Acceptance-transfer act (Annex 8) (COMDOC_032)

033

33

Act of acceptance-transfer (Annex 9) (COMDOC_033)

034

34

The act of disagreement to the Act of transfer (COMDOC_034)

035

35

Act of acceptance of goods for the consignment note (COMDOC_035)

036

36

Adjustment act (COMDOC_036)

Invoice subtipe (DOCUMENTINVOICE.DocumentFunctionCode)

sub_doc_type_id

Name and description

TN

0

Commodity invoice / Invoice by quantity (for Metro and Leroy Merlin)

СTN

1

Corrective commodity invoice

TN

1

Invoice by quantity

PRN

2

Price invoice

DRN

3

Sales Invoice