Jump to content

Add Client through the API requires more fields


wifiguys

Recommended Posts

I'm trying to add clients though the api with only the first name, last name, email, and postal code. I can do this though the admin interface, but not through the api. I need to do it this way because with our Auth.net account those are the only fields required and when we start adding more fields to our shopping cart in raises our support costs.

 

Any help would be greatly appreciated

Link to comment
Share on other sites

I'm trying to add clients though the api with only the first name, last name, email, and postal code. I can do this though the admin interface, but not through the api. I need to do it this way because with our Auth.net account those are the only fields required and when we start adding more fields to our shopping cart in raises our support costs.

 

Any help would be greatly appreciated

 

Suggest trying to add the other fields that you don't want to use as blank fields.

 

$postfields["address1"] = "";

 

Hope it works for you :-)

Link to comment
Share on other sites

I tried that and it is still giving me the same error. I did find that if I add the client and then update the client I can update the fields required by the api to add a client to almost blank strings. It will do anything with the string: ''. But if I use the string: ' ' (note the space) it seems to blank out the fields in question. This feels pretty hooky though. And I have not tried it yet to see if it will work with our Auth.net account. I'm still worried that it will send information about the address, city, state, country that is not accurate. If there is a better way that I am missing I would very much appreciate any more help.

Link to comment
Share on other sites

I just found that by updating with a null char, "\0", I can in fact get rid of the address1, city, state, country, and phonenumber fields. I checked in the DB and the result is the same as when done through the admin interface, so this is a working solution.

Link to comment
Share on other sites

I take it back. When logging into the client area I can see the null chars for any field updated with one. Same if a pass a field with a one space string. So it seems that I'm back to square one. Again if anyone has encountered this issue or knows how I can get around I would really appreciate your help.

Link to comment
Share on other sites

  • 1 year later...

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