My Products
Help
Quan Pham
PARTNER

Problem patching salesorder line with V3

by Quan Pham (Updated ‎22-06-2023 15:09 by Quan Pham PARTNER )

Hi,

 

I'm trying to update a salesorder line with the new API.

The response seems to be okay but nothing happens in Visma.

 

QuanPham_0-1687438972860.png

 

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım (Updated ‎29-06-2023 15:05 by Yıldırım VISMA )

Hi, you should use the following endpoint with the specified information. 
Swagger UI.jpg

Steps:

1) GET SalesOrder to retrieve the version of the document.

Can be found either in the responseBody(version) or ResponseHeader(eTag)

salesOrderv3_version.jpg

2) PATCH - SalesOrder 

 

https://salesorder.visma.net/api/v3/SalesOrders/TYPE/orderID/lines

 

Add "If-match" to the request headers with value of the version. 

PATCH_salesOrder.jpg

3)Financials ERP Output

PATCH_Sales orderv3.jpg

 

Hope this helps.

Quan Pham
PARTNER

by Quan Pham

Hi, 

 

Sorry, my screenshot was wrong.

 

I'm trying to patch the order as you described but the quantity doesn't update. Am I missing something?

 

QuanPham_0-1688107701415.png

QuanPham_1-1688107818883.png

 

Yıldırım
VISMA

by Yıldırım

This can be related to the SO, status, in your company since we're able to modify these values without any problem. 

Please check it out via the Financials ERP UI.