Jump to content

Force ID on webservice POST (add - insert)


gmclouddesign

Recommended Posts

Hi you all,

 

I am working right now with the PS Webservice.

 

I would like to force the ID of the POST (insert).

 

Example: 

 

- I have on my platform a manufacturer with ID = 10

- I make a POST to the WEBSERVICE and the ID of the insert is 12

- I have to save the relation between 10 and 12 for next syncing...

 

What it would be great is if I could make a POST to the WEBSERVICE with the ID = 10.

 

All of the content (manufacturers, categories, products, ...) will be coming from the webservice... it is so annoying to save all the relations between my platform ids and the prestashop ids...

 

Someone knows how to achieve this???

 

Thank you!

Link to comment
Share on other sites

  • 1 month later...

hello,

Your challenge is quite common! You are just saying here that you are about to duplicate existing business objects from your primary source to Prestashop. It should not be the case any more in this modern world. 

Any way, Prestashop does not allow you to force the ID of new resources! Just like most of the Web services. Basically how would you manage duplicated ID? 

I would just you to rely on a property that has a unique value, for example, the product reference. 

 

Good luck with Prestashop

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...