_edit

Edit a customer

Required Parameters

  • name - name of the customer

  • landline - the contact number for the customer

  • id - customer ID

Example using required fields

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

Result

{"ok":1}

Example with all optional fields

FM_api(
	'Customer_edit',
	array(
		'id'=>'1',
		'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}

Last updated