Jump to content

Problem on Prestashop API (Create user with same email on different shop)


Recommended Posts

Hello,

I am encountering an issue with the PrestaShop REST API in a multistore environment. Here are the details:

Context:

PrestaShop Version: 1.7.8.10

Multistore Configuration: Customers are not shared between stores.

Issue: When I try to create a customer on shop  id 4 with the email [email protected], the API returns an error stating that the email is already in use, even though this is a distinct store.

Goal: I would like to allow the same email to be used for distinct customers on different stores

API Request Used:

POST /api/customers { "email": "[email protected]", "firstname": "John", "lastname": "Doe", "id_shop": 4 }

Error Returned:

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[140]]></code>
<message><![CDATA[Cet e-mail est déjà utilisé, veuillez en choisir un autre]]></message>
</error>
<error>
<code><![CDATA[46]]></code>
<message><![CDATA[Unable to save resource]]></message>
</error>
</errors>
</prestashop>

Could you confirm if there is a configuration or a solution to handle this use case?

Thank you in advance for your assistance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...