Jump to content

Delete client


codym

Recommended Posts

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:

image.png.9bbf10b71b1431fca7a98d6d3dadbfcb.png

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?

Link to comment
Share on other sites

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 )

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...