hundertzehn / mocoapp-api-docs

https://hundertzehn.github.io/mocoapp-api-docs/
31 stars 17 forks source link

Update deals.md #316

Closed jordan-jakisa closed 2 months ago

jordan-jakisa commented 3 months ago

I have added the relevant parts of my findings working with this endpoint that were not clearly documented before. I hope this will save another developer much more time because it took me almost 8 hours trying to create a lead.

nethad commented 2 months ago

Hi @jordan-jakisa

First of all, thanks for your contribution. I unfortunately have to reject most of your changes. Any API that is asking for an "ID" as an input assumes that this ID already exists in the system. If you supply a random ID, we wouldn't know how to handle that and I don't think you will find a system that works in a different way.

The same goes for required fields, the word required assumes that it is not null. For empty strings it's less clear, but if you see that it's a required field and have given an empty string, it's hopefully not too far fetched to assume it must not be empty.

I therefore don't think it's worthwhile to add a comment to every ID input and every required field how they work. I hope you understand. If you find that our API does not give you good error messages for missing/wrong input, please reach out via support so we can improve it.

I did, however, take over your float correction for the money attribute :+1: https://github.com/hundertzehn/mocoapp-api-docs/commit/8b4253a67cfb673c71fcc47d3881f5b829b749e5

jordan-jakisa commented 2 months ago

Alright sure, no problem.

I understand your concerns.