Is there a REST API method that will lookup a part price for a customer utilizing the internal pricelist configuration and logic? I’ve done some searching and captured some trace logs to try to identify an object method that does this, but haven’t found anything. Thought I’d throw the question out here in case someone else stumbled on something like this. Thanks!
There should be a REST endpoint that relates to the objects/methods you are seeing in your trace logs. You can browse all the endpoints from the api “help” page. But since you are just trying to read some data, I would create a BAQ with the required info / parameters and use the BAQSvc REST endpoint to call it.
GET /{currentCompany}/Erp.BO.PartSvc/Parts(‘{Company}’,‘{PartNum}’
The UnitPrice is in the return on this one.
That’s true, but it does not take into account any Customer or Customer Group price lists that need to apply in my use case.
You would need to use the PriceLstSvc endpoint to access customer related part prices.
I still think a BAQ with BAQSvc endpoint is the best option since you could use customerID or custnum or name as a filter rather than the price list’s ListCode.
GET /{currentCompany}/Erp.BO.CustomerSvc/Customers(‘{Company}’,{CustNum})/CustomerPriceLsts
The group price lists are in the same area. Try [Epicor REST API v.2 Help Page (your domain)](https://your server.mtxdom.com/EpicorERP/api/help/v2/)
One caveat: I use the REST services quite a bit with an integration package. We are on 10.2.600 and when I was discussing a problem with support someone told me that 10.2.600 was the first operational release and some of the REST services occasionally delivered “unexpected” results. It is supposedly much better in later versions.
That said, I am able to accomplish quite a bit even in 10.2.600.
@ckoch after running a few more traces, I was zeroing in on PriceListInquirySvc, but when I look at v2 help for this service in 2021.1, the post method you screen shot isn’t listed. Hmmm…
In the top-right corner you’ll need to choose “Custom Methods”. This is where all the methods that you’ll find in your trace logs will be, for just about every Epicor service.
Thanks! Very useful tip. Hadn’t encountered that one before.