Manage A Lot Of Api Requests

Hello there,

I am making a PHP script in order to make product import/update into my cs-cart installation. So my question is how many requests can the API accept per second or better to ask what is the best practise around it. Can I create arrays and import multiple products with just 1 API request? If thats the case can some mini-example be introduced to get a better understanding on that?

Thanks in advance.

if you do things serially you should not have any problem. I would NOT do products one at a time but instead do them in some logical batching.

As far as I know, Cs-Cart api does not provide bulk API for product creation and update (and even basic REST api is there since 4.x release only), so you have to create an API call for each product - and it is not a huge issue unless you have to update ten thousand of products every hour. The performance here really depends on your server hardware and connection.

It is usually a good idea to fork long-running PHP process that makes such updates and show a progress bar to user of your php script, or at least set script time limit to fair amount of seconds to avoid "execution time exceeded 30 seconds" error.