This database schema and therefore the API is based on IDs and KEYS. IDs are just integers which always act as an internal and unique identifier for any record. However, as optimal as integer IDs are, they are very difficult to work with when a database schema is dynamic as with EAV and make APIs equally obtuse. Where appropriate and only so, if an ID can benefit from a readable KEY name then one will be assigned.
This overhead is minimal and all data-integrity will be maintained at the API level, so should you ever change a key-name which in effect would be the same as changing a field-name, data-integrity will be preserved.
All documentation web-pages are only partially responsive and desktop-designed.
https://vshop.vadoo.co.uk/api/email/send
_data = {email: id/name, customer: id, subject: message }; fetch('https://vshop.vadoo.co.uk/api/email/send', { method: "post", headers: { "Content-Type": "application/json; charset=utf-8" }, body: JSON.stringify(_data)} ) .then( response => response.json() ) .then( response => { // Returns response.id, response.message // _.isEmpty(response) [#lodash] is useful })
JSON | [Object] Response
.. Will return a simple message id and its text version.
https://vshop.vadoo.co.uk/api/email/sendresponse.id | |
response.message |