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 |
object; documents body |
|
attachments |
List <XDocAttachment> |
array of objects; attachments (may not be used) |
comments |
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
|
hash |
String |
hash value obtained as a result of processing |
type |
object; document type |
|
status |
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 |
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 |
||
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:
|
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 |
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 |
|||
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 |
|
2 |
orders |
|
3 |
recadv |
|
4 |
desadv |
|
5 |
ordrsp |
|
6 |
pricat |
|
7 |
comdis |
|
10 |
declar |
|
11 |
insdes |
|
13 |
slsrpt |
|
14 |
invrpt |
|
15 |
coacsu |
|
17 |
iftmin |
|
18 |
retann |
|
19 |
iftmbf |
|
20 |
partin |
|
21 |
mscons |
|
25 |
retins |
|
28 |
comdoc |
|
29 |
declarj12 |
|
30 |
condra |
|
35 |
metro7a |
|
39 |
metro7b |
|
40 |
prodlist |
|
41 |
agreem |
|
42 |
iftmbc |
|
59 |
documentinvoice |
|
67 |
doccorinvoice |
|
98 |
quotes |
|
111 |
transhipment |
|
117 |
acceptance |
|
113 |
booking |
|
114 |
bookingconfirmation |
|
112 |
completion |
|
118 |
docinvoiceact |
|
119 |
discrepancy |
|
120 |
contrl |
|
121 |
ttn |
|
122 |
simple_doc |
Vilnyi service document |
123 |
reload |
|
124 |
disagreement |
|
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
|
|
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:
For Vilnyi:
For ETTN:
|
|
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 |
|
006 |
6 |
|
007 |
7 |
|
008 |
8 |
|
009 |
9 |
Certificate of Nonconformity/Non-conformance Report (COMDOC_009) |
011 |
11 |
|
012 |
12 |
|
013 |
13 |
|
015 |
15 |
|
016 |
16 |
|
018 |
18 |
|
019 |
19 |
|
021 |
21 |
|
022 |
22 |
|
023 |
23 |
|
024 |
24 |
|
025 |
25 |
|
026 |
26 |
|
027 |
27 |
|
028 |
28 |
|
029 |
29 |
|
030 |
30 |
|
031 |
31 |
|
032 |
32 |
|
033 |
33 |
|
034 |
34 |
|
035 |
35 |
Act of acceptance of goods for the consignment note (COMDOC_035) |
036 |
36 |
|
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 |
|
TN |
1 |
|
PRN |
2 |
|
DRN |
3 |