-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer References #250
Comments
Hi! |
Hi, Ok, in what way is it buggy? Do you think it can still be used? I can definitely try out a prototype version. You can see the list of references in the image posted above, predefined references are a list of contacts (persons) on a customer (company), typically you have the same couple of people that you work with at a customer, so when creating an invoice or order for a customer you can select from a list of predefined names instead of writing as free text every time. And the requirement I have is that i have name/email of a person that I need to find the customer for, so basically search all references of all customers to find the right one (if that is possible). |
Well, not buggy, but confusing.. anyway, I have implemented the connector which tries to hide these inconsistencies. As usual, you get the connector by calling For your requirement, you can call FindAsync to get list of the references.. then you have to go through them yourself to filter according your requirement. The limit/offset/page seems to work, but paging metadata are not returned by the server. From my investigation, only 60 entries are allowed, after that, creating a new one fails. |
Done some tests now and everything seems to work great, some notes (related to the api, not this implementation):
There is no info about total number of items available in the response of the first page so I had to loop pages until no more values are returned to get all references, but that will work. Thank you for a really quick implementation of this!! |
Aha, so the error with creating the references was not about the total limit of 60 but due to limit of 5 per customer. That make sense :) I did a wrong assumption. Thank you for clearing it out for me. As you said, unfortunately, the total number of items is not available, so the unlimited page (Limit == -1) can't be implemented. That's why I make it to throw the exception. In theory, it could implemented it as you say, with looping until there are no results). I will consider it, so that it will be (for the SDK consumer) appear consistent with other endpoints. If you have energy and time, you can ask the Fortnox support regarding the pagination metadata for this endpoint, whether that's something they plan to implement on the server-side :) |
Will do, will also check why there is a limit of only 5 references and if it can be increased. |
Got a reply now from Fortnox:
So, we will probably get both additional references and better endpoint in the future. |
Are Customer References not implemented?
https://apps.fortnox.se/apidocs#tag/CustomerReferencesResource
The requirement I want to implement is to search and find customers based on the list of references on a customer (wildcard search if possible but exact match could possibly also work). Could this otherwise perhaps be implemented somehow with the customer search?
The text was updated successfully, but these errors were encountered: