wc-api-java
wc-api-java copied to clipboard
Update of order line_items
Hi icoderman, can you please give me an example of how I can update line_items of an order?
params.put("line_items", p); Map response = wooCommerce.update(EndpointBaseType.ORDERS.getValue(), orderId, params);
I only get the message: {code=rest_invalid_param, message=Ungültige(r) Parameter: line_items, data={status=400, params={line_items=line_items[0] ist nicht vom Typ object.}}}
It works with Postman, when I use raw (Json) and this structure: {"line_items": [{...}]}
Hi @philipdomann I guess P must be list of objects. Could you show how your initialization of variable p looks like?