_new

Create a new customer

Parameters

  • name - name of the customer

  • landline - the contact number for the customer

Example using required fields

FM_api(
	'Customer_new',
	array(
		'landline'=>'012345678', // required if "requires contact number" is set in account settings
		'name'=>'A Test Customer'
	)
)

Result

{"ok":1,"id":110961}

Example with all optional fields

FM_api(
	'Customer_new',
	array(
		'name'=>'A Test Customer',
		'landline'=>'012345678',
		'name'=>'name',
		'contact_name'=>'contact_name',
		'email'=>'email@email.email',
		'industry'=>'industry',
		'street_address1'=>'street_address1',
		'street_address2'=>'street_address2',
		'town'=>'town',
		'county'=>'county',
		'country'=>'IRL', // 3-letter country code
		'postcode'=>'postcode',
		'landline'=>'landline',
		'mobile'=>'mobile',
		'latitude='=>'0',
		'longitude='=>'0',
		'account_number'=>'account_number',
		'notes'=>'notes',
		'custom_values'=>array(
			'an'=>'object',
			'full'=>'of',
			'custom'=>'values'
		),
		'parent_id'=>'1234',
		'account_manager='=>'1'
	)
);

Result

{"ok":1,"id":110962}

Last updated