codym Posted January 27, 2019 Report Posted January 27, 2019 I'm trying to use the Blesta API to delete a client. First, I used the users/delete endpoint to attempt to delete the user but received the error: So I assume that I should delete the client associated with the user first, correct? When looking through the documentation I can't find a method for getting the client ID by any user information, such as ID or username. What is the proper way to go about deleting clients with their user ID? Quote
coreyman Posted January 28, 2019 Report Posted January 28, 2019 http://source-docs.blesta.com/class-Clients.html Looks like you need to use class Clients. getByUserId( integer $user_id, boolean $get_settings = false ) Fetches a client with contact details of the primary account holder Parameters $user_id integer $user_id The ID of the user Then you can delete by client id #delete( integer $client_id ) activa and Paul 1 1 Quote
codym Posted January 28, 2019 Author Report Posted January 28, 2019 Crud. I didn't even see the getByUserID method. Thank you! activa 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.