My Products
Help
Snuffsis
CONTRIBUTOR ***

Update Shipment: Wants SaleOrderUpdateDto?

by Snuffsis

I am trying to perform a simple update on a shipment line to change the actual quantity of a shipped item before marking it as confirmed.

 

However, when trying to run the Put request to perform the update on the line, it gives me a bad request with the message "Data received not recognized as SaleOrderUpdateDto".

{"message":"Data received not recognized as SaleOrderUpdateDto."}

The endpoint I am using should be correct according to swagger:

https://integration.visma.net/API/controller/api/v1/shipment/000020

And the json payload looks like this:

{
  "shipmentType":{
    "value":"Issue"
  },
  "operation":{
    "value":"Issue"
  },
  "shipmentDetailLines":
  [
    {
      "operation":"Update",
      "lineNumber":{
        "value":1
      },
      "shippedQty":{
        "value":1.0
      }
    }
  ]
}

 

Maybe there is something missing in the payload that is required (couldn't see anything marked as required in the model in swagger at least)?

 

4 REPLIES 4
Accepted solution
Snuffsis
CONTRIBUTOR ***

by Snuffsis

This is solved.

 

The error was on our end due to an unaccounted-for update to the RestSharp library that changed how it should be used.

by Magnus Johnsen

Ok! 

by Magnus Johnsen

Hi,

We're not able to reproduce the issue, using the same json we are able to update the shipment as intended.

Could you please double check that the request is being sent to the correct endpoint?

Are you updating via your integration or via an external tool like postman/swagger?

Snuffsis
CONTRIBUTOR ***

by Snuffsis

I am currently running it during debug in Visual Studio.

And I have double and triplechecked the request object, the endpoint is the one posted above.

 

Here is the restrequest object for some extra information, and you can see the message, the responseuri etc is exactly as one would expect.

Snuffsis_0-1653992747608.png

 

 

I did also try a get request for this shipment and that worked fine. So this is indeed a conundrum if you managed to do an update.