Export Order Status

Export Order Status

The order status codes can be accessed via the url GET http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/companies(<company system id>)/orderStatusCodes?$filter=webshopChannelCode eq '<webshop-channel-code>' and externalDocumentNo eq '<external-document-no>'. The filters on the webshop channel code and external document no. are mandatory. The response is a JSON with all header (lineNo eq 0) and line (lineNo ne 0) information for filtered order status codes.

{
    "@odata.context": "http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/$metadata#companies(<company system id>)/orderStatusCodes",
    "value": [
        {
            "@odata.etag": "W/\"JzE5OzIyNDM4MDE1NzA0MzgwNjY5NjIxOzAwOyc=\"",
            "systemId": "69ba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "CREATED",
            "documentType": "Order",
            "documentNo": "",
            "externalDocumentNo": "WSO10001",
            "lineNo": 0,
            "itemNo": "",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzE5Ozk0OTk3OTY0MzUwOTMxNDE5MTgxOzAwOyc=\"",
            "systemId": "6aba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "IN PROGRESS",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 0,
            "itemNo": "",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzE2MTI4Njc5MTg1MjE2OTQ2MDE1MTswMDsn\"",
            "systemId": "6bba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "PROCESSED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 0,
            "itemNo": "",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzEyNDg3OTk4NDUwNTMzMzk5MDgzMTswMDsn\"",
            "systemId": "6cba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "DELIVERED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 0,
            "itemNo": "",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzEyNDY5NDI4MTQ1NDU1NTQ0Mjk2MTswMDsn\"",
            "systemId": "3e3d9039-f41b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "COMPLETED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 0,
            "itemNo": "",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzE3MTY4NDIxOTczMzgyOTUwMzUxMTswMDsn\"",
            "systemId": "6dba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "CREATED",
            "documentType": "Order",
            "documentNo": "",
            "externalDocumentNo": "WSO10001",
            "lineNo": 10000,
            "itemNo": "1896-S",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzE5OzcxMzA1OTQyNjg5MzUxOTkwODMxOzAwOyc=\"",
            "systemId": "6eba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "IN PROGRESS",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 10000,
            "itemNo": "1896-S",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzE5OzkxNDc3OTEwMDA2MzE2MTUyNzYxOzAwOyc=\"",
            "systemId": "6fba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "PROCESSED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 10000,
            "itemNo": "1896-S",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzEyNjc4MDc2MTgxNTYwMzI1ODk2MTswMDsn\"",
            "systemId": "70ba1ec5-f21b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "DELIVERED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001",
            "lineNo": 10000,
            "itemNo": "1896-S",
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        },
        {
            "@odata.etag": "W/\"JzIwOzEwNDM1OTc1NzcxOTQzOTM2OTY1MTswMDsn\"",
            "systemId": "3f3d9039-f41b-ee11-b56b-9a013f2163ca",
            "webshopChannelCode": "B2B",
            "statusCode": "COMPLETED",
            "documentType": "Order",
            "documentNo": "1001",
            "externalDocumentNo": "WSO10001", 
            "lineNo": 10000, integer
            "itemNo": "1896-S", 
            "systemCreatedAt": "2023-01-01T08:00:00.000Z"
        }
    ]
}

The fields of the order status codes are documented in the following table.

field data type content
systemId GUID the system id of the item selection record
webshopChannelCode Code[20] the webshop channel code
statusCode Code[20] the status code
documentType Enum "Sales Document Type" the document type
documentNo Code[20] the document no.
externalDocumentNo Code[35] the external document no.
lineNo Integer the line no.
itemNo Code[20] the item no.

In this article