November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Mikael
Have you seen this documentation: https://world.episerver.com/documentation/developer-guides/Episerver-Service-API/order-restful-operations/Purchase-orders/#Updateorder? Not sure if it will help answer your question.
David
Yes, I have read the documentation multiple times but it doesnt make me any wiser. I always get a 204-response but no changes have been applied to my order and no errors logged in the log-file. So my question is how the request body should look like to split a shipment in two?
Ok, nevermind. Seems like my previous requests actually did modify the order - however the cache in CommerceManager was not released when updating yesterday but this issue seems to be resolved today.
It does seem a bit odd however that I need to include ALL information about the order in the request body when only splitting a shipment.
I can understand that the new shipment is missing shipping-address etc but the original shipment (id: 31) items should be persisted in my way of thinking, but perhaps this is by design?
Both billing address on the orderform and shipping address on the original shipment was cleared when posting putting a request body similar to this:
{
"OrderForms": [
{
"Shipments": [
{
"ShipmentId": 31,
"LineItems": [
{
"LineItemId": 35,
"Code": "ItemCode1",
"Quantity": 50,
"PlacedPrice": 99
}
]
},
{
"LineItems": [
{
"Code": "ItemCode1",
"Quantity": 10,
"PlacedPrice": 99
}
]
}
],
"OrderFormId": 22
}
]
}
PUT will overwrite the existing order, so if you split it in the posting model, and call PUT, the item will be updated
So the short answer is that the calling system must send the complete order model to simply split a shipment as the order will be overwritten with each PUT request?
Hi,
Is there any documentation on how the PUT action on "episerverapi/commerce/orders" is supposed to work?
For instance, how does the minimal model look to update a lineitem on a shipment?
I've tried with a couple of models but am still not able to split a shipment with one lineitem into two shipments.
Any guidance would be appreciated as I would really like to avoid writing an entire custom API for this...
Kind regards,
Mikael