John Davidson

php - POST api/customers/ to register user Prestashop Email Invalid

0 comments
Message:


Im trying to register user to my Prestashop store through postman,


I use post mydomain/api/customers,


In body I use raw data like this:


    <?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<customer>
<passwd>
testpassword
</passwd>
<lastname>
testlastname
</lastname>
<firstname>
testfirstname
</firstname>
<email>
[email protected]
</email>
</customer>
</prestashop>

And I have error code that Customer -> Email is not valid,
When I use this xml as a body:


<customer>
<passwd>
testpassword
</passwd>
<lastname>
testlastname
</lastname>
<firstname>
testfirstname
</firstname>
<email>
[email protected]
</email>
</customer>

I got response that passwd is required, anyone have any idea how do I work with this webservice api?



My Answer:
It seems like there may be an issue with the format of the email address you are trying to use in the XML body.

Instead of using `[email protected]`, try using a valid email address format like `test@example.com`.

Additionally, make sure that the `` field is not empty and that all required fields are included in the XML body.

If you continue to experience issues, you may want to refer to the Prestashop API documentation or reach out to their support for further assistance.

Rate this post

3 of 5 based on 3348 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us