Jump to content

WebAPI mandatory fields on PUT request


TheMikmas

Recommended Posts

I'm updating product quantity. I know i must send id_product and id_product_attribute, but what for all others?

Now i'm sending id_product, id_product_attribute and quantity. Server respond what depends_on_stock and out_of_stock fields are mandatory. HOW SHOULD I KNOW THOSE VALUES? If i'm modifying only 1 parameter why i must update also all other values?
Now i must GET stock information, carve all useless information only to update values that i don't care? It doesn't make any sense

The same problem is with PUT product->active value. I'm changing products name so i MUST also update active value - what for? I don't care it is active or not - i want only to change name.

I understand that all those values are mandatory on POST request, but why on PUT?

Sorry for my bad english

Edited by TheMikmas (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...