softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
52 stars 64 forks source link

PriceList requires uppercase for Code? #163

Closed bmjohanp closed 3 years ago

bmjohanp commented 3 years ago

This is perhaps more of a Fortnox api issue, but I'm posting it here to get input.

We are seeing strange things regarding price lists when creating them with the .Net SDK. Our findings:

If we create a price list containing lowercase letters in Code property ("Lst1" etc), we can't find it when querying the api. Both creation and querying is done with the .NetSDK. The price list is listed in the portal, so it IS created. Also, the price list can't be deleted in the portal, it returns when logging in again. Can anyone else reproduce this?

Using Code "LST1" when creating the price list works, and it can then be queried, so I guess the code has to be in uppercase? It is not documented anywhere and since it is possible to create with lowercase both in the portal and sdk it is a bit strange.

richardrandak commented 3 years ago

Hi @johanpe ! I am glad you are active here and reporting these issues :) I have reproduced the same by using Postman, so this is not problem in the SDK but some weird behavior on server side. Plus, the impossibility of deleting the lower-case code PriceList entity even through the portal makes it especially annoying.

Please, if this is worth your time, contact the Fortnox support, maybe they can help to explain this. Also, share the findings if you get some :)

bmjohanp commented 3 years ago

@richardrandak Thank you for taking the time to reproduce this!

I have contacted the Fortnox support about this (and other issues) and tried to explain it, but these kind of api issues are hard to get proper answers for. We go back and forth a few times with the support, but they have limited knowledge of the api. So it gets time consuming and a bit frustrating.

Right now we just handle this issue by making sure we only assign alphanumeric uppercase characters to the Code property.