I am adding some custom line item to order . I need to add some custom modifier to recognize item later. When i m adding modifier with line item id and order id i am getting status code 400 error.
I am adding some custom line item to order . I need to add some custom modifier to recognize item later. When i m adding modifier with line item id and order id i am getting status code 400 error.
Hii I am using android SDK and using following code snippet :-
LineItem lineItem= mOrderConnector.addCustomLineItem(orderId, mItem, false); Modifier modifier= new Modifier(); modifier.setName("Demo"); mOrderConnector.addLineItemModification(orderId, lineitem.getId(), modifier);
I believe that the modification that you add to a line item has to be a proper modifier in the merchant's inventor (can't make a one-off custom modification). Try adding a modifier with the uuid provided by InventoryConnector#getModifierGroups(...) and InventoryConnector.getModifiers(...).
Alternatively, could use InventoryConnector#createModifierGroup(...) and InventoryConnector#createModifier(...), and once it is persisted to the database you can get the proper modifier uuid and then should be able to add it to the order (don't actually do this for each order though).
No one has followed this question yet.