My Products
Help
Anonymous
Not applicable

[API] Ophalen customer aan de hand van customerCd resulteert in interne foutmelding

by Anonymous

Bij het aanroepen van de /controller/api/v1/customer/{customerCd} krijg ik de volgende foutmelding:  {"message":"VismaId: 132dc0c6-9ddd-4f95-9f89-5ffb5a15e34b. startIndex cannot be larger than length of string.\r\nParameter name: startIndex"}

 

Dit probleem had ik eerder niet met een andere company-id binnen Visma die waarschijnlijk een andere configuratie had wat betreft de debiteuren en debiteurnummers. 

10 REPLIES 10

by Magnus Johnsen

Could you please have a look at the customer in the UI?

Please check if there any any errors and have a look at the subaccounts under "General ledger accounts" tab.

Please send us a screenshot of this.

Anonymous
Not applicable

by Anonymous

I've shared the screenshot in another comment. Can you give me more information about the 500 error code?

by Magnus Johnsen

Please have a look at your Segment Keys for customer(ScreenId=CS202000):
2021-02-23 09_44_45-Segment keys.png

Also, are you seeing any warnigs on the customer card?

Are there any other customers that are giving you the same issue? It sounds like there is an issue with a number in the database entry for this customer that doesn't correspond with the required segment lengths. 

Anonymous
Not applicable

by Anonymous

I have this problem for all the customers. No warnings or errors on the customer card. 

 

A screenshot of the segmented key is below:

image (3).png

by Magnus Johnsen

So all customers that exist return this error? But if you specify any nonexistant customer number it would give you the error message specified?

 

From where are you making your calls right now?

Anonymous
Not applicable

by Anonymous

Yes, all existing customers return this error. When querying for a nonexisting customer a correct 404 response is returned.

 

Currently making the calls from Postman but I get the same results from the python urllib3 library.

by Magnus Johnsen

Could you please send us an email at developersupport@visma.com and provide us with the ipp-company-id as well as screenshots showing the customer number of any customer that cuses this issue.

Has this been an issue for long? When did it start?

Is this in production or test?

 

Anonymous
Not applicable

by Anonymous

Screenshot:

 

image (2).png

by Magnus Johnsen

Hi,

Just a gentle reminder: this forum is international and we therefore only communicate in English.

We recommend that you have a look at this article: Welcome to the Visma.Net API Developer Support Community.

In the bottom of this article you also have 4 other links I suggest you have a look at, particularly : 

API incidents - Troubleshooting and reporting 

For us to be able to help you we would need to know:

  • Full URL
  • Full error message
  • What method was used
  • Any JSON included in the request

Some general tips we can give that might cause this issue:

Remove any fields with values as below:

  • - " "
  • - "String"
  • - Null
  • - 0 - Zero

Any fields that are not used, we recommend that you omit from your request.

We would also recommend that you have a look at the module you are using in the UI, and check how the values used are formatted in the ocmpany you are targeting now. 

 

Thank you.

 

Anonymous
Not applicable

by Anonymous

I will continue in English.

 

Full url: https://integration.visma.net/API/controller/api/v1/customer/7

Error message: 

{
"message": "VismaId: de7360cb-a187-4702-9b7d-203a9b84ad81. startIndex cannot be larger than length of string.\r\nParameter name: startIndex"
}
 
Method: GET
No json included. Param was passed in the url.
 
When passing an customer number that doesn't exist the api responds with the normal not found error:
{
"message": "Customer with number 08 could not be found"
}
 
It seems like something is going wrong in Visma.