sharktek Posted August 13, 2014 Report Posted August 13, 2014 Hello, I am able to retrieve client settings via the following code: $response = $api->get("clients", "get", array('client_id' => 28)); print_r($response->response()); print_r($response->errors()); However, I am unable to delete a client using an updated API call, is my syntax incorrect? $response = $api->delete("clients", "delete", array('client_id' => 28)); print_r($response->response()); print_r($response->errors());
Tyson Posted August 13, 2014 Report Posted August 13, 2014 Looks fine to me. What are the errors? A client can only be deleted if there are no associated any invoices, transactions, or services. Michael 1
sharktek Posted August 13, 2014 Author Report Posted August 13, 2014 No errors were being generated, the response was null. I was able to perform this action by using a different call: $api->get("clients", "delete", array('client_id' => 23));
Tyson Posted August 13, 2014 Report Posted August 13, 2014 Not sure why the delete action did not work. I suspect the lack of an error may be due to Blesta not receiving the client_id parameter. However, POST would be a better alternative to DELETE than GET would.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now