PartSvc REST

Im reviewing our epicor application logs and have noticed something. In one of our programs we are searching for a part number, but some of our part numbers contain parentheses. The log says OData path is undefined. Can REST handle parentheses, comma’s, and slashes? Any ideas on how I can resolve this issue? Do I need to use encoding or something?

Thanks
David

Eww.

Can you try encoding your parentheses? Use %28 for ‘(’ and %29 for ‘)’.

That did not work. I think thats just part of the issue. This is a sample of some of our part strings.
BMI5A69-012(7/8)-9PU-PC,P,I,SF-0750

Our part can contain
– , ( ) / \ and °

Thanks
David

2 Likes

I have tried encoding the entire string

BMI5A69-012(7/8)-9PU-PC,P,I,SF-0560
to
BMI5A69-012%287%2F8%29-9PU-PC%2CP%2CI%2CSF-0560

with the same results. I wondering if I need @Bart_Elia expertise to resolve this issue.

Hi David,

Does this encoding work in Postman or in a browser URL?

You may also considering pinging @Olga or @bconner. But be careful, Brian’s a little gun-shy when people start asking for Conners…

image

1 Like

This is one of the few areas I bang my head against URLs and flip to a Post for my own sanity. Dealing with non-Latin characters can also lead to advanced application of keyboard to forehead.
Taking a glance

I cant get the encoding to work in PostMan or the Browser. This also is driving me crazy.
image

It might be a parsing issue in our code. Not totally surprising with the advanced gymnastics you have in that part number. If it is, I thank you for the new unit test you just gave us :wink:

looking

Try using $filter instead of () in the request path

1 Like

I am not on this project anymore so my knowledge is fading gradually :slight_smile:

1 Like

I agree with Olga - If you go to your help on REST you will see a blurb on the Filter $parameter from the OData spec:
<…> HelpERP/enu/Standard/snm_enu.htm#REST/RESTODataParamIntro.html

This would change your url to something like:
<…>api/v1/Erp.BO.PartSvc.Parts?%24filter=Part%20eq%20‘thepartnumber’

That should be easily testable in the swagger page

Lastly, get a ticket open on this please.

I am able to use the \Parts call with the filter and get the data I need. @Bart_Elia I will open a call today.

Thanks for the help everyone.

1 Like

Thank @Olga for reminding me on that.
We both are onto other efforts but the original Product Owner @bconner is always there on the project. He just is a little busy between Active Home Page, EDD and REST among other projects :wink:

oprahcrying

2 Likes

You only think that because you don’t know what she is on how. Also, we are expanding the REST team so not a bad thing.

3 Likes

Just to keep everyone informed, upon further testing, using the filter does not work for all symbols. We have part strings that also contain " and '. using the filter is also throwing an error. I did update my support call to make sure they are aware of the issue.