Export Document Status

Export Document Status

The document status can be accessed via the url POST http://<server name>:<odata port>/<service tier name>/ODataV4/<serviceName>_DocumentStatusExportOData?company=<companyName|companyId>. Codeunit "BET ECOM WS Interface" must be added as Web Service in BC. POST request must be called with a JSON structure to get document status (all three fields are mandatory):

{
    "webshopChannelCode": "B2B",
    "orderType": 1,
    "orderNo": "W150127_01"
}

The request is answered with a JSON structure containing informations about whether document is created and if there's error text:

{
    "@odata.context": "http://<server name>:<odata port>/<service tier name>/ODataV4/$metadata#Edm.String",
    "value": "{\"documentCreated\":false,\"errorText\":\"Returned Quantity 2 > Shipped Open Quantity 1\"}"
}

Type of fields used in this interface:

field data type content
webshopChannelCode Code[20] the webshop channel code
orderType Integer the value of order type
orderNo Code[20] the order no.
documentCreated Boolean the information if document is created or not
errorText Text[80] error text if there's an error

In this article