Documents chain data (array of XChain objects)

JSON:

[
  {
    "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": [
      {
        "body": {
          "forms": {}
        },
        "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,
        "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": {}
      }
    ],
    "hash": "47A129833ADD5EA463A9000F17B699A0"
  },
  {
    "id": 1146,
    "uuid": "3a332404-e216-412f-ac6f-335de5047b86",
    "packageID": 0,
    "type": 0,
    "docsCount": 1,
    "lastInDocID": 3935,
    "lastOutDocID": 0,
    "partnerId": 0,
    "important": false,
    "status": {
      "status": 5,
      "title": "read"
    },
    "visualStatus": 0,
    "archive": false,
    "childs": [
      {
        "body": {
          "forms": {}
        },
        "attachments": [],
        "comments": [],
        "doc_id": 3935,
        "doc_uuid": "d3eef820-d31c-4ceb-aa4d-8d242afa4a18",
        "uuidSender": "9864067620417",
        "uuidReceiver": "9864066822430",
        "uuidReceivers": [
          "9864066822430"
        ],
        "docNumber": "4",
        "dateCreated": 1648130491,
        "dateChanged": 1648130491,
        "dateRead": 1648231377,
        "docDate": 1648072800,
        "chain_id": 1146,
        "chain_uuid": "3a332404-e216-412f-ac6f-335de5047b86",
        "family": 12,
        "hash": "8B5B54A0E51D9B158BF2E566B026452D",
        "type": {
          "type": 2,
          "title": "orders",
          "description": "Заказ"
        },
        "status": {
          "status": 5,
          "title": "read"
        },
        "exchange_status": "000000000000000000000000",
        "is_archive": false,
        "extraFields": {
          "order_date": "1648072800",
          "delivery_date": "1646776800",
          "partner_id": "0",
          "sender": "9864067620417",
          "buyer_uuid": "9864067620417",
          "doc_num": "4",
          "order_number": "4",
          "doc_date": "1648072800",
          "draft_date_created": "1648130484",
          "recipient": "9864066822430",
          "supplier_uuid": "9864066822430",
          "delivery_place_uuid": "9864067620417"
        },
        "tags": [],
        "statuses": [],
        "multiExtraFields": {}
      }
    ],
    "hash": "9C6DAB71F4A0EB1AFE0E7E2AFE07C350"
  }
]

Table 1 - Parameters description of object XChain

Parameter

Format

Description

Object XChain

id

long

shard ID

uuid

UUID

document chain UUID

packageID

long

package ID

type

XDocType

object; document type

docsCount

int

the amount of documents in the chain

lastInDocID

long

id of the last incomed document in the chain

lastOutDocID

long

id of the last outgoing document in the chain

partnerId

long

id of the retail network

important

boolean

important document mark

status

XChainStatus

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

visualStatus

int

icon number

archive

boolean

document marked as Archived

childs

List <XDoc>

array of objects; documents / tickets data

chainsInPackage

List <XChain>

array of objects; data of related chains

hash

String

hash value obtained as a result of processing

Table 2 - Parameters description of object XChainStatus

Parameter

Format

Description

Object XChainStatus

more

state

int

status id

title

String

status

Table 3 - ChainStatus description (object XChainStatus)

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 4 - 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 5 - DocType 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)