Bug in ApiBackend /ProductDiscounts/GetById/

11 meses atrás
Hi, maybe it's something I'm doing wrong, but if I run a get a GET query on api-backend/ProductDiscounts/GetById/1
I get an error:
Expression 'entity.Id' is not a Field.
I can provide the full stack if it would help.
The API version I'm running is 4.50.12
Can someone please advise? Thanks!
11 meses atrás
Hi.You are doing everything right and the error is really in the code. The GetById and Delete methods were added to this controller by mistake. What kind of data did you expect to get by calling the GetById method?

Fantech wrote:
Hi, maybe it's something I'm doing wrong, but if I run a get a GET query on api-backend/ProductDiscounts/GetById/1
I get an error:
Expression 'entity.Id' is not a Field.
I can provide the full stack if it would help.
The API version I'm running is 4.50.12
Can someone please advise? Thanks!
11 meses atrás
I was looking for a way to update the products assigned to discounts via the API. It's possible to create and update the discount item, but only to create the "applies to product entry".
As we are linking Nop to our backend ERP, it's possible for users to update which products have discounts in that ERP, and we want to reflect a customers accurate pricing on the website.