question

brokenoval avatar image
brokenoval asked ·

How to change employee in atomicOrder?

Trying to create an order with the atomicOrder API and it seems to always create the order with the "owner" rather than the specified employee. There isn't an error or anything, but as you can see below, the order was provided with an `employee.id`, and you can see in the response the employee used to create the order is different:

1617540091740.png


The full body posted to /atomicOrder was:


{
  "orderCart": {
    "employee":{
        "id":"HGBYQ5QESTMBG"
    },
    "lineItems": [
      {
        "quantity": 1,
        "price": 250,
        "discountAmount":20,
        "orderLevelDiscountAmount":30,
        "item": {
          "id": "8SFWVR7Z3CNW0",
          "name": "Avo Go Go2",
          "price": 250,
          "taxRates": [],
          "taxRateValue": 0,
          "tags": ""
        },
        "modifications":[
            {
                "name":"True Nopal",
                "amount": 20,
                "modifier":{
                    "id":"N1GGT87M65RA8",
                    "modifierGroup":{
                        "id":"T167H9DA5SM8W"
                    }
                }
            },
            {
                "name":"True Nopal 2",
                "amount": 30,
                "modifier":{
                    "id":"N1GGT87M65RA8",
                    "modifierGroup":{
                        "id":"T167H9DA5SM8W"
                    }
                }
            }
        ],
        "discounts":[
            {
                "name":"TEST DISCOUNT2",
                "total": 10,
                "percentage": 0
            }
        ]
    },
    {
        "quantity": 1,
        "price": 250,
        "discountAmount":20,
        "orderLevelDiscountAmount":30,
        "item": {
          "id": "8SFWVR7Z3CNW0",
          "name": "Avo Go Go2",
          "price": 250,
          "taxRates": [],
          "taxRateValue": 0,
          "tags": ""
        },
        "modifications":[
            {
                "name":"True Nopal3",
                "amount": 20,
                "modifier":{
                    "id":"N1GGT87M65RA8",
                    "modifierGroup":{
                        "id":"T167H9DA5SM8W"
                    }
                }
            }
        ],
        "discounts":[
            {
                "name":"TEST DISCOUNT2",
                "total": 20,
                "percentage": 0
            }
        ]
    }
    ],
    "discounts":[
        {
        "name":"TEST DISCOUNT3",
        "amount": 0,
        "percentage": 0
        }
    ],
    "groupLineItems": true
}
}



Thanks!

Conor

Orders
1617540091740.png (70.3 KiB)
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community