Tripletex / tripletex-api2

Tripletex API 2 resources and examples
MIT License
38 stars 43 forks source link

Document constraints for api model fields to avoid errors when posting to the API #66

Open madsoliver opened 2 years ago

madsoliver commented 2 years ago

Example today:

POST /product
field: number 
constaints: 
string
maxLength: 100

... It should also contain what chars are valid and not ...

I have clients that have experienced issues when transferring products that have productnumber that is a string with max 100 chars, but have invalid characters. There was no understandable error message. We therefore needed to add a strict filter at our end to avoid products not being transferred. Since we dont know what the constraints really are. Documenting invalid characters in the API doc will help partners a lot avoiding bad transfers.