_set

Sets the details of a Customer's Address

Parameters

id

The ID of the Address you wish to modify.

obj_id

The ID of the Customer with said Address.

new

An array of parameters which overwrite current parameters in the Address with.

Fields which can be used under new are:

  • street_address1

  • street_address2

  • town

  • city

  • county

  • state

  • country

  • postcode

  • latitude

  • longitude

obj_type

The ID of the Type of Customer with the Address.

Example

FM_api('Address_set',[
  'id'=>'30180',
  'obj_id'=>683034,
  'obj_type'=>'90015'
  'new'=>[
    'street address 2'=>'TestAddressTwo',
    'postcode'=>'',
    'county'=>'tEst county',
    'country'=>'IRL'
    ]
  ]
);

Results

On Success

{"ok":1}

On Failure

If the "obj_id" parameter is not set or has a value less than 1:

{"error":"missing or invalid parameter: obj_id"}

If the "new" parameter is not set:

{"error":"missing or invalid parameter: new"}

Last updated