...
Due to the dynamic nature of AffinityLive it's really difficult to determine what fields are available and required when creating and editing objects. The forms feature can be used to retrieve a list of required and optional fields for a given object or group of objects. Once you have selected the details you wish to store, you can then simply submit the form with the same endpoints.
Endpoints
(POST|GET) [/object_type1,object_type2,..object_typeN]/_forms/fields
...
addresses
companies
contacts
POST
...
/
...
_
...
forms
Submit given object type(s). For example, the following would submit two forms- address and contact.
Code Block | ||
---|---|---|
| ||
$ curl -XPOST /addresses,contacts/_forms -d '{ "submitforms": [{ "type": "addresses", "config": { ... } "data": { "title": "My new address", "link" : { "type": "company", "id": 100 }, ... } },{ "type": "contacts", "fields": { "firstname": "Kurt", ... } }] }'; |
...