cancel
Showing results for 
Search instead for 
Did you mean: 

Magento store_id problem using API

Magento store_id problem using API

I'm having a really annoying problem that I can't seem to figure out.

I have a store in a Single Store View

1. When I'm creating a product in the Admin backend it is assigned a store_id = 0
in the database

2. When I'm creating a product through the API it is assigned a store_id = 0
(I'm passing "extension_attributes" : {"website_ids": [0],} in the JSON)

3. When I'm updating a product through the API it is assigned a store_id = 1
(I'm again passing "extension_attributes" : {"website_ids": [0],} in the JSON)

Any updates cause of this are not reflected in the Admin Backend. which defaults to store_id = 0 values

Any updates are visible on the storefront though.......

What can be causing this?

1 REPLY 1

Re: Magento store_id problem using API

I figured it out.

Even though I had a single store enabled some product attributes had a different scope by default.

When adding items through api that scope would be assignened.
Strangly, if adding through a backend the global scope would be applied...