Update Product Via Rest Api

Hello,

I try to update a product via REST API using the url http://example.com/api/products/:id as mentioned here .

I am using the PUT method but I am getting

405 Method Not Allowed

The requested method PUT is not allowed for the URL /api/stores/1/products/27

I am trying from Postman, and creating or getting products works fine. What could go wrong?

Hello

http://your_host/api/products/product_ide.g

http://csul/4101a/api/products/17

You can set Basic Autorization admin_login_email:API_KEY

You can set PUT method

Body set on "raw" and set JSON (application/json)

And in body add e.g.

{"product": "test"} or {"amount": "1000"} or other

and click "Send"

See screenshot

Best regards

Robert

postman.png

Hello, thank you for your answer.
The problem is that I am doing exactly that. In other cases (post, get) I have no such problems....

You can see it in the following screenshots

[attachment=13884:Screenshot 2019-07-03 at 08.05.52.jpg]

[attachment=13885:Screenshot 2019-07-03 at 08.08.png]

Screenshot 2019-07-03 at 08.05.52.jpg

Screenshot 2019-07-03 at 08.08.png

Please make sure that the Manage catalog permission is not disabled for the used account

Where is this setting Robert? I cannot find it.

Under "Customers-> User groups" the admin (where this user belongs to) as access to everything.

But after all why only this PUT command fails? Every other command works

Hello

Please try remove from url "stores/1" and try again

Best regards

Robert

I am afraid I tried this and the problem remains the same :(

[attachment=13886:Screenshot 2019-07-03 at 11.23.06.jpg]

Screenshot 2019-07-03 at 11.23.06.jpg

Hello

Can you put a devel version of your store so that you can do tests on it ?

I understand that you have set api authorization correctly?

Best regards

Robert

Yes I have a develop version online. Do you want me to send you in a private message access to take a look?

Hello

Yes. Sent me PM.

Best regards

Robert

The problem was that Apache did not support PUT and DELETE. As soon as we enabled them everything worked as expected.

Hi!

One of the easiest ways to update products on CS-Cart is to use API 2 Cart solution.
It helps to develop CS-Cart integration (https://api2cart.com/supported-platforms/cs-cart-integration/?utm_source=cscart&utm_medium=referral&utm_campaign=cscartintegrationn.kov) quickly and easily and provides API methods that allow managing the CS-Cart data.
For example, it provides the product.update API method that enables to update price and quantity for a specific product on CS-Cart.
Hi, I have been doing some tests also to update products with the REST API and with the configuration you indicated I did not get any error, but the data was not updated either. I added to the headers of the request "Content-Type: application/json" and indicate in the body {"amount": 5} and now it did update.
I did these tests from Postman, has anyone been able to use the API with Javascript in Edge/Chrome? If so, can you tell me how?

Is it possible to easily add a second heading to an invoice? There are invoices, credit memos, and orders, for example. I'd want to introduce a new kind. Have it selectable in order status, like a buy order or something. I've generated the language variable, but I'm not sure where else in the template I need to make changes.