Jump to content

Import Orders with API, use default client data


MDavid

Recommended Posts

Hi,

I have a custom made, old system and I would like to export from it all my clients data to WHMCS.

So I think, the WHMCS API is usefull for this, but I have a problem with order export.

I would like to use AddOrder function, based on documentation.

But when I try to use this, I have an error from API: not get firstname

The client already imported, but it hasn't contacts, because I want to use default client datas to domain registrations.

I post the following fields.

    $postfields = array(
        'action' => 'AddClient',
        'responsetype' => 'json',
        'clientid' => $clientid,
        'paymentmethod' => $paymentmethod,
        'pid' => array(1),
        'noinvoice' => true,
        'noinvoiceemail' => true,
        'noemail' => true,
        'domain' => array('demo.tld'),
        'domaintype' => array('register'),
        'regperiod' => array(1)
    );

 

So, can I add an order with domain registrations with default client fields? 

Or I must set all domain fields here?

Thank you!

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