I face a 502 error when I am trying to add modifiers to the lineItems of an order using python+REST API. Also, when I try out the same in the API Resources by entering the details - it throws a 400 Bad Request error (Request needs a modifier object). Even though I am essentially adding all details. I have attached the code below. Requesting your help.
url = "https://sandbox.dev.clover.com//v3/merchants/"+muuid+"/orders/"+orderID+"/line_items/"+lineitem+"/modifications" payload = { "modifier": { "modifierGroup": { "id": "WBG8RG2N2GPPA" }, "name": "Beer", "price": 500 } } headers = { 'Authorization': 'Bearer' + bearerID, 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data = payload) print(response.text.encode('utf8'))