Jump to content

Add Client API Required Fields


souzadavi

Recommended Posts

I'm building a form for free orders, everything goes fine.. But now when I created my customer in the docs said: 

https://developers.whmcs.com/api-reference/addclient/

                    'address1' => '123 Main Street', //required
                    'city' => 'Anytown', //required
                    'state' => 'State', //required
                    'postcode' => '12345', //required
                    'country' => 'US', //required

All this field is required,

My question is: why is it required? There is any work around to disable this requirements? I want to create a whmcs user only with name, email and password....

 

Thanks 🙂

 

Link to comment
Share on other sites

Thanks DennisMidjord this why Im asking here it, to understand why those fields is required, for me there is no clue to be required those fields...

From API I could populate with any values but this isn't the nice solution... Many other company like WIX only email and password is required... 

I think this field could be optional in API add client.... I hope some one from whmcs team give me some explanation or just remove this requirements from API add client.

Thanks 🙂

 

 

Link to comment
Share on other sites

In the docs there is a option: 

skipvalidation bool Pass as true to ignore required fields validation

Just set it to true and it's possible to add customers without those required fields!!! I tried to answer in the request comments but it's already closed. So it's here for somebody like me who do not full read the docs with attention :)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated