Closed zx-alioscia closed 7 years ago
I'm not sure what you're asking, here.
i could not make "contact/delete" working because of the missing "id" field in activecampaign-api-php implementation (delete method in AC_Contact class).. and i suggested a possible fix..
@zx-alioscia In this case the call should work fine. Looking at the example you were providing it's just missing some parameters that's required within the call. As for the second parameter for the api
method that's generally held for post data.
If you're doing something similar to say
$response = $ac->api('contact/delete', $contactId);
The correct format of this should be similar to
$response = $ac->api("contact/delete?id={$contactId}");
Ok fine, now i see.. thank you for support!
Hello this is the delete request: https://xxx.api-us1.com/admin/api.php?api_key=XXX&api_action=contact_delete&api_output=json&
Note that the "id" field is missing (http://www.activecampaign.com/api/example.php?call=contact_delete)
The delete method in AC_Contact class could accept the contact id to be deleted:
function delete($params, $id) { $request_url = "{$this->url}&api_action=contact_delete&api_output={$this->output}id={$id}"; ... }
and the call could be:
$response = $ac->api('contact/delete', $contactId);