My Products
Help

Update a PR SalesOrder through API

by Gert-Jan van der Kamp (Updated ‎22-02-2023 15:58 by Gert-Jan van der Kamp )

Hi, 

 

We use Sales Order Types to differentiate between ordere types, that seem to lead to an issue when trying to update through the API. 

 

Getting an order only works through the /{OrderType}  variant: 

GET https://integration.visma.net/API/controller/api/v1/salesorder/2300041: 

HTTP 404 : NotFound

{"message":"Document with number 2300041 could not be found"}

 

GET https://integration.visma.net/API/controller/api/v1/salesorder/pr/2300041

HTTP 200 : Ok

Returns order, all good

 

So far so good, but now I want to put the updated order. 

PUT https://integration.visma.net/API/controller/api/v1/salesorder/2300041
HTTP 404 : NotFound {"message":"Order with number 2300041 could not be found"}

 

PUT https://integration.visma.net/API/controller/api/v1/salesorder/pr/2300041
HTTP 405 : MethodNotAllowed {"message":"The requested resource does not support http method 'PUT'."}

 

So here neither works..

 

I was able to update an SO type order through the api, but is it possible to work with SalesOrders other than OrderType SO through the api? 

7 REPLIES 7

by Gert-Jan van der Kamp

In the Developer Portal, I'm trying to add an integration to the SalesOrder api.

 

I allows a "Web" application type, that has a 'Authorization Code with PKCE' grant type so that looks promising..

It requires an "Initiate Login URI" however, what is that supposed to point to? The documentation states "An URI to the address of your application that initiates the Sign-in with Visma Connect process." but I'm still not sure what is required to makes this option work.. You you explain in a few words what that is supposed to do? 

Yıldırım
VISMA

by Yıldırım (Updated ‎24-02-2023 11:13 by Yıldırım VISMA )

Hi, 

A URI which starts the Connect authorization process when accessed by the user.

What is that supposed to point to? Is there any documentation about this? I've gone through all the fragmented docs, blog posts, pdf's, etc but nothing of what that is supposed to do.

I know authorization code (are we supposed to point to your login page?)  and client credentials (post username+password to get token response) , but they don't have a concept like that as far as i know. 

 

Please we have burned so much time that we can't bill on this authentication stuff already. We connect to Microsoft, Google, Exact, Xero, Hubspot, Quickbooks, etc etc. They all take a few hours to fill out a form (they all pretty much converged to the same thing) and it just works. The number of dead ends we have had with Visma is insane and now we're at square one again. Please, if there no docs you can point to, spend a few lines explaining what it is supposed to do. Which flow and what peculiars did you add to it? 

 

 

Sorry for the rant, got a bit frustrated. We're onboarding during the transition to the new auth (and new api) that has made the ride a bit rockier than normal I suppose. 

Yıldırım
VISMA

Hello Gert, no problem, we understand that. 

Could you please contact us via developersupport@visma.com sharing your application name & Client ID so that we can figure out the details that you need information. 

 

Thanks. 

by Gert-Jan van der Kamp

Ok will look at that, thing is that we want to create/update orders from a client app (Excel add-in) so PKCE flow would work. New SalesOrder Service only has client credentials according to docs.. 

Yıldırım
VISMA

by Yıldırım

Hello, 

 

this is available in the Sales Order API Service API 

SO_Swagger UI.jpg

 

If you are not familiar with the neXtGen services, please have a look at the Getting started with the first neXtGen service: Visma.net ERP Sales Order API . 

 

Thanks.