Hey there,
I have a collection called “appointments” and a form in the frontend.
So now I would like to submit the form to the “save” API to create a new collection entry.
The documentation says:
fetch('/api/collections/save/posts?token=xxtokenxx', {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: {...}
})
})
.then(res=>res.json())
.then(entry => console.log(entry));
But it is not clearly specified what I need to submit as the “data”-object.
Additionally: What every I try to submit, the API answers with 404.
Thanks and I hope someone can help me with this.