Unexpected behaviour when creating orders

mauritsmaurits Member Posts: 7

Hello everyone, I'm wondering if someone can shed some light onto this behaviour that's unexpected (for me) when I'm trying to create an order.

When I post an order with the following body:

{

    "orderedDate": "2020-12-12T12:52:52",

    "refNum": "20201212049972",

    "vendorID": "572",

    "shopID": "0",

    "OrderLines": {

        "OrderLine": [

            {

                "quantity": "1",

                "itemID": "1768"

            },

            {

                "quantity": "1",

                "itemID": "1769"

            },

            {

                "quantity": "1",

                "itemID": "1770"

            },

            {

                "quantity": "1",

                "itemID": "1771"

            }

        ]

    }

}

I receive this response body:

{

  "@attributes": {

    "count": "1"

  },

  "Order": {

    "orderID": "34",

    "orderedDate": "2020-12-11T23:00:00+00:00",

    "shipInstructions": "",

    "stockInstructions": "",

    "shipCost": "0",

    "otherCost": "0",

    "complete": "false",

    "archived": "false",

    "discount": "0",

    "totalDiscount": "0",

    "totalQuantity": "0",

    "timeStamp": "2021-02-05T14:38:26+00:00",

    "refNum": "20201212049972",

    "createTime": "2021-02-05T14:38:26+00:00",

    "vendorID": "572",

    "noteID": "0",

    "shopID": "0",

    "createdByEmployeeID": "0"

  }

}

Notice how the time is wrong and the order lines are missing.

I don't understand what could possibly be wrong with this body; but it has to be something. Any help with this would be greatly appreciated.

5 comments

Sign In or Register to comment.