GrandNode API: Problem assigning category to product

Sunday, February 5, 2023 10:06:08 PM
  • Posted: Thursday, March 28, 2019 8:57 AM
  • 25

We are still working on the API. I have struggled with this issue for some time now and realize I might just ask for help.

Problem is assigning category to product . This gives 200/OK but is not updated in MongoDB.

Do you see what the problem might be?

Testing for this product (ID 5c9c2e851c149e000188462f)


...and this category (ID 5c6697123945712d04312c17)


Fiddler POST request gives 200 OK


...but DB is not updated


Can you see the problem?
Will appreciate any help on this!

Also, some suggestions
1) Article / guide on how to set up sandbox for testing/debugging API requests
2) Possible to define relations to Categories/Pictures etc in "main" JSON for Insert/Update product (I understand it's not possible today)
  • Posted: Thursday, March 28, 2019 9:19 AM
  • 953

Thanks for post. If Fiddler returns status 200 ok, it should be everything fine. I tested it while ago on my test environment and everything was ok. I updated the product category. To check the database, I used the Robo 3T tool and after API request, I had to run query again, in the other case I didn't see updated results. Did you run query again in your MongoDB GUI tool?

Thanks for suggestions.  

Best regards,

GrandNode Team
  • Posted: Saturday, March 30, 2019 5:06 AM
  • 25
Thx for your reply (and sorry about failed image formatting above).

We're using MongoExpress and I have confirmed that data is not updated in the database, even if HTTP gives 200/OK.  

Also checked this product in the front store UI (no category assigned).

We were able to update product name for product via API, so DB connection is to be OK.

There is always an explaination for issues like this.  Please check what "states" could give 200/OK without updating the DB.

We will try to set up the API as a local api test sandbox as mentioned, but I guess this will take some time.
back to top