I need to POST products with their category number, but without their sorting because I dont want to change the sorting via API.

{"product": {
    "id": 1234,
    "sku": "2345",
    "name": "Nice Product",
    "extension_attributes": {
        "website_ids": [1],
        "category_links": [{
            "position": 11,
            "category_id": "123"

As soon as I take out the sorting position I get an error.

So, how can I post a product including the Category but without changing its sorting within one call?

  • Did you try leaving it blank? – Haim Nov 5 '18 at 1:03
  • Blank does not work its an INT but I also tested NULL – Michael Müller Nov 5 '18 at 1:33
  • It have INT class, have you tried "position": 0 – Aditya Shah Nov 13 '18 at 13:58
  • Refer catalogProductRepositoryV1 devdocs.magento.com/swagger/index_20.html – Aditya Shah Nov 13 '18 at 14:01
  • I know that well, but it does not help. I am not able to POST a Products with Category without changing its sorting. – Michael Müller Nov 14 '18 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.