Skip to content

API contact edit method is not working #254

Description

@faisalsarfraz

Something strange happening on Mautic version 3.3.3 and API version 3.0
Edit a contact method is not working. I have this

$data  = array(
                                'cancellation_date' =>date('Y-m-d'),
		               'acc_cancelled_flag' => 1
		);
		$initAuth = new ApiAuth();
		$auth = $initAuth->newAuth(mauticConnection(), 'BasicAuth');
		$timeout = 10;
		$auth->setCurlTimeout($timeout);
		$api = new MauticApi();
		$contactApi = $api->newApi("contacts", $auth, checkMauticUrl());
		/*Get User*/
		$contacts = $contactApi->getList("email:$email");
		//dd($contacts);
		if (!empty($contacts['contacts'])) {

			$user_id = array_key_first($contacts['contacts']);
			/*Update User Details*/
			$response = $contactApi->edit($user_id, $data, false);

		}

This is the method that I am using but its not udpating those two columns. Does somebody has solution?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions