Document data (XDoc object)

JSON:

{
  "body": {
    "forms": {
      "json": {
        "type": {
          "id": 2,
          "name": "json"
        }
      }
    }
  },
  "attachments": [],
  "comments": [],
  "doc_id": 3941,
  "doc_uuid": "fc6296d7-40e1-4cf4-ae9e-c040beb919e1",
  "uuidSender": "9864067620417",
  "uuidReceiver": "9864066822430",
  "uuidReceivers": [
    "9864066822430"
  ],
  "docNumber": "7",
  "dateCreated": 1648287768,
  "dateChanged": 1648287768,
  "dateRead": 1649187415,
  "docDate": 1648245600,
  "chain_id": 1149,
  "chain_uuid": "d5593160-2c85-4a67-b9c8-95682073bb09",
  "family": 12,
  "hash": "2678393BC4D98F4BCAB3CF4F88B4BEF4",
  "type": {
    "type": 2,
    "title": "orders",
    "description": "Заказ"
  },
  "status": {
    "status": 5,
    "title": "read"
  },
  "exchange_status": "000000000000000000000000",
  "is_archive": false,
  "chain": {
    "id": 1149,
    "uuid": "d5593160-2c85-4a67-b9c8-95682073bb09",
    "packageID": 0,
    "type": 0,
    "docsCount": 1,
    "lastInDocID": 3941,
    "lastOutDocID": 0,
    "partnerId": 0,
    "important": false,
    "status": {
      "status": 5,
      "title": "read"
    },
    "visualStatus": 0,
    "archive": false,
    "childs": [],
    "hash": "47A129833ADD5EA463A9000F17B699A0"
  },
  "extraFields": {
    "buyer_uuid": "9864067620417",
    "doc_num": "7",
    "lardi_trans_status": "2",
    "order_number": "7",
    "lardi_trans_id": "240743363238",
    "supplier_uuid": "9864066822430",
    "delivery_place_uuid": "9864067620417",
    "order_date": "1648245600",
    "delivery_date": "1648501200",
    "partner_id": "0",
    "sender": "9864067620417",
    "doc_date": "1648245600",
    "draft_date_created": "1648287768",
    "recipient": "9864066822430"
  },
  "tags": [],
  "statuses": [],
  "multiExtraFields": {}
}

Table 1 - Parameters description of object XDoc

Parameter

Format

Description

Object XDoc

body

XDocBodyForms

object; documents body

attachments

List <XDocAttachment>

array of objects; attachments (may not be used)

comments

XDocCommentsList

object (include an array of objects); list of comments

doc_id

long

document id

doc_uuid

UUID

unique document/ticket ID

uuidSender

String

unique sender ID

uuidReceiver

String

the unique identifier of the recipient

uuidReceivers

List<String>

an array of unique recipient IDs

docNumber

String

document number

dateCreated

long

document creation date (unix timestamp)

dateChanged

long

date of last document change (unix timestamp)

dateRead

long

document read date (unix timestamp)

docDate

long

document date specified in the document

chain_id

long

document chain id

chain_uuid

UUID

a unique document chain identifier

family

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)

hash

String

hash value obtained as a result of processing

type

XDocType

object; document type

status

XDocStatus

object; the status of a pair of documents from the sender and recipient

exchange_status

String

document substatus (more)

is_archive

boolean

document marked as Archived

signInfo

XDocSignInfo

object; signature data

chain

XChain

object; data of related chains

extraFields

Map <String, String>

array of objects; set of indexes (analog of index tables)

tags

List <XTag>

array of objects; attached tags

statuses

List <XStatus>

array of objects; sent documents processing statuses

multiExtraFields

Map<String, List<String>>

array of objects; multiindex. Example: {‘key1’: [‘val1’, ‘val2’], ‘key2’: [‘val1’, ‘val2’]}. Used, for example, to process the transmitted string => break the string condition => index each piece

Table 2 - Parameters description of object XDocStatus

Parameter

Format

Description

Object XDocStatus

more

state

int

status id

title

String

status

Table 3 - Parameters description of object XTag

Parameter

Format

Description

Object XTag

id

long

tag id

name

String

tag content

shortName

String

tag short name

Table 4 - Parameters description of object XStatus

Parameter

Format

Description

Object XStatus

docId

long

document/chain id

date

long

status date; unix timestamp format

type

int

status type:

  • 101 - positive (accepted)

  • 102 - negative (rejected)

text

String

status content

Table 5 - Parameters description of object XDocSignInfo

Parameter

Format

Description

Object XDocSignInfo

doc_id

long

document/chain id

date

long

signing date; unix timestamp format

count

short

amount of signatures

info

String

additional information

hash

String

the hash value obtained as a result of processing

Table 6 - Parameters description of object XDocCommentsList

Parameter

Format

Description

Object XDocCommentsList

XDocCommentsList

List<XDocComment>

array of objects; comments to the document

Table 7 - Parameters description of object XDocComment

Parameter

Format

Description

Object XDocComment

id

long

comment id

docUUID

UUID

unique document ID

createTimestamp

long

the date of comment creation in timestamp format

authorLogin

String

comment author

comment

String

comment content

Table 8 - Parameters description of object XDocAttachment

Parameter

Format

Description

Object XDocAttachment

id

long

attachment id

docUUID

UUID

unique document ID

attachmentUUID

UUID

unique attachment ID

fileName

String

file name

createDate

long

attachment date creation; unix timestamp format

type

String

attachment type

base64content

String

attachment content in BASE64

content

byte[]

attachment content in integer form

signs

List<XDocAttachmentSign>

array of objects; attachment signatures (files)

signHash

String

signature hash

Table 9 - Parameters description of object XDocBodyForms

Parameter

Format

Description

Object XDocBodyForms

forms

HashMap<String, XDocBody>

array of objects; document body

Table 10 - Parameters description of object XDocBody

Parameter

Format

Description

Object XDocBody

type

XDocBodyType

object; document body type: CONTENT = 1 - content in bytes; JSON = 2 - content in json; SIGN = 3 - signature content; STAMP = 4; CRYPTED = 5 - content in encrypted form; UZDRESPONSE = 6

base64content

String

document body content in BASE64

Table 11 - Parameters description of object XDocBodyType

Parameter

Format

Description

Object XDocBodyType

id

int

document body type id

name

String

document body type name

Table 12 - DocStatus parameters description (object XDocStatus)

Status id

Status

0

ALL - any status

1

OPEN - draft (sender)

2

SENT - sent (sender)

3

DELIVERED - delivered (sender)

4

INBOX - incoming (recipient)

5

READ - read (recipient)

6

ERROR - error

7

DELETED - deleted

Table 13 - 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 14 - 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 15 - Parameters description of object XDocAttachmentSign

Parameter

Format

Description

Object XDocAttachmentSign

attachmentId

long

attachment id

identifierId

long

record id

crc32hash

long

signature checksum hash (CRC32 encoding)

signerUUID

String

unique signatory identifier

signBody

transient byte[]

the byte array of the signature body

Table 16 - Extrafields description

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 17 - 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