My Products
Help
Anonymous
Not applicable

Can't use api/v1/customeinvoice/{refnbr}/print

by Anonymous

Hi, 

 

When using the GET api/v1/customeinvoice/{refnbr}/print all I get as a respons is: 

 

Error 502 

{
"ExceptionType": "IPPException",
"ExceptionMessage": "",
"ExceptionFaultCode": "5102",
"ExceptionMessageID": "5102_3384817b-85aa-4765-af5c-6af134ee40d0",
"ExceptionDetails": ""
}

connection: Keep-Alive content-type: application/json date: Wed, 28 Jul 2021 12:20:39 GMT ipp-request-id: 4b59c441-67b7-4daf-81f8-ee56996bb816 keep-alive: timeout=15, max=100 server: Apache/2.4.25 (Debian) strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked

 

This is an old integration that is with SalesForce and Visma.net. When in salesForce you press that you want to see the customer Invoice PDF we use this response to retrieve it from Visma.net. 

 

It has worked up until now and now all we get is this 502 error and we haven't made any changes to the call. I have also tried in Swagger to make this GET https://integration.visma.net/API/controller/api/v1/customerinvoice/712180/print but all I get is 502. I have double and triple checked that teh invoice number exsits but every time I try to retrieve an invoice with the status of 'closed' or 'open'  502 response.

 

I have done random GETs just to test that my credentials work and I have no problem with GET https://integration.visma.net/API/controller/api/v1/customerinvoice/712180 (same invoice as I get 502) and here I get a 200 response. 

 

Is there any problems with api/v1/customerinvoice/{refnbr}/print?

 

Thanks in advance!

/Frida

 

9 REPLIES 9
Yıldırım
VISMA

by Yıldırım (Updated ‎28-07-2021 15:16 by Yıldırım VISMA )

Hello Frida, 

 

we're unable to reproduce the issue. This might be related to the Financials Roles / Settings. We'll continue investigating to find out what might have been causing the problem in your end. 

Would you be able to pinpoint when the issue has started ? 

Anonymous
Not applicable

by Anonymous

Hi, 

 

I can't say for sure but at least from monday this week it stopped working. But it is not impossible that it stopped working earlier because it is not everyday we use that function. Not earlier than last week and not later than this monday it started. 

 

/Frida 

Yıldırım
VISMA

by Yıldırım (Updated ‎28-07-2021 15:51 by Yıldırım VISMA )
  1. Have you retried the operation after a while ?
  2. Are you able to print another Invoice via the API ? 
  3. Would you be able to try to print the same document from the UI ?
Anonymous
Not applicable

by Anonymous

1. Yes, do still not work

2. No, all invoices with status 'open' or 'closed' gives me 502. Status 'balanced' or 'on hold' gives me 'document does not exsit' 

3. Yes I can get it through the UI 

Yıldırım
VISMA

by Yıldırım (Updated ‎28-07-2021 16:15 by Yıldırım VISMA )

Thanks for the information. 

 

  1. Which Visma.Net financials user have you generated the API token with ?
    1. Please send us the email address of the user and the Company ID & name via developersupport@visma.com

  2. Which Visma.Net financials user have you logged into the company while manually trying the print operation ?

After finding out that which user you've generated the API token with, please inform the Customer Admin of the Company  to grant "Financials Administrator" role together with "Financials User" on that user.

(How to: Connecting your Visma.Net Financials company to the API )

Afterward, please re-generate the API token and retry the operation.

Anonymous
Not applicable

by Anonymous

1. I have now sent an email with the user information

2. I logged in with the API user, the company in Visma.net are using customized roles but I have given the API user access to everything. I can reach everything through the UI.

 

The user already have "Financials Administrator" and "Financials user" configured, it has been like that since when we created the user.

 

Yıldırım
VISMA

by Yıldırım

@Anonymous 
the company in Visma.net are using customized roles but I have given the API user access to everything. I can reach everything through the UI.

This issue should be related to the roles those have been modified in the company. Taking into account that you've mentioned it has also recently started, we need to pinpoint what are the roles given or restrictions applied. 

 

Could you ask the company what kind of restrictions they've set ? 

 

Users.png

 

Also, please revoke (if already assigned) and assign those roles to the user again in the Visma.net Financilas UI - Users (ScreenId=SM201010) then save. 

 

Roles_Users.png

 

 

 

 

Anonymous
Not applicable

by Anonymous

I have revoced the roles and given them back but nothing chances, I can still not get the print. 

 

 

Yıldırım
VISMA

by Yıldırım (Updated ‎02-08-2021 17:28 by Yıldırım VISMA )

We're unable to determine the root cause without having information about what kind of restrictions have been configured in the company, therefore,  could you inform us on which Customized Roles or Access Rights set on the company ?  

Please send us the details of the setup. 
Users.png

 

Instruction on how to proceed further has been shared via the email.


Thanks.