Zum Hauptinhalt springen

Web service API - Example: Further processing of documents

As an example, we process a goods receipt in a GR calculation.

First, we need to call the ForwardReceipt method.

/REST/ForwardReceipt{ "Ticket": "[Ticket]", "TrimResponse": 0, "Data": { "ForwardData": { "CreateReceiptData": { "IgnoreCallbacks": true }, "CreateReceiptItemsFromExistingItemsData": { "IgnoreCallbacks": true }, "IgnoreCallbacks": true }, "OnlyTakeoverAvailableQuantity": true, "OriginReceipts": [ { "ReceiptI3D": 23302, "ReceiptKind": 8 } ], "ReceiptKind": 18, "TakeoverOptions": 1 }}

PropertyDescription
ForwardDataThe objects must be assigned here. Setting the IgnoreCallbacks property to True simplifies the process.
OnlyTakeoverAvailableQuantityOnly the quantity that has not yet been processed will be transferred.
Original ReceiptsContains the documents that are to be further processed. In our example, a goods receipt (ReceiptKind=8) is further processed with I3D 23302. The optional ReceiptItemI3Ds list can be used to directly specify the items that are to be further processed.
ReceiptKindSpecifies which document type should be processed further. In our example, WE calculation (18).
Takeover Options0 = Copy
1 = by reference

If the operation was successful, we receive an object of the desired type. In our example, ReceiptSupplierInvoiceDTO.

We can then edit the object as desired. The object is transferred to the SaveReceipt method for final storage.

/REST/SaveReceipt{ "Ticket": "[Ticket]", "TrimResponse": 0, "Data": { "AutoLockIfNewReceipt": false, "Receipt": {RECEIPT DATA}, "SaveData": { "IgnoreCallbacks": true } }}

With this method, it is also important that SaveData is assigned to an object.