Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

would return a similar structure of fields. The fields endpoint accept accepts the following parameters:

  • forms : The forms for each object type, with optional configuration options.

We currently only support the following form object types, which are being used in our mobile applications:

  • addresses
  • companies
  • contacts

POST [/object_type1,object_type2,..object_typeN]/_forms

Submit given object type(s). For example, the following would submit two forms- address and contact.

Code Block
languagebash
$ curl -XPOST /addresses,contacts/_forms -d '{
	"submit": {
		"addresses": {
			"title": "My new address",
			"link" : {
				"type": "company",
				"id": 100
			},
			...
		},
		"contacts": {
			"firstname": "Kurt",
			...
		}
	}
}';

would create a contact and address with the supplied fields. The response will return the types and ids of the newly created objects.

Code Block
languagebash
{
    "response": {
		"submitted": [{
			"type": "address",
			"id": 112
		},{
			"type": "contact",
			"id": 1342
		}]
	},
	"meta": { ... }
}

The submit forms endpoint accepts the following parameters:

  • forms : The forms for each object type, with optional configuration options.
  • submit : The data you wish to submit for each type of form.