Skip to content

Add products to Category by API call

I was trying to create an API call to Magento with category ID

Endpoint

PUT https://www.website.com/rest/V1/categories/

Body

{
  "category": {
    "id": 1709,
    "products": [
      { "sku": "205-117-1033" },
      { "sku": "205-177-1008" }
    ]
  }
}

I got server 200 OK, but I don’t see those sku added to the list. I did double check the SKU, the sku is enabled, visible to search and catalog. Not sure why I can’t add them to the category by using API request. Please help