Epicor Function Parameter Data Types

Hello,

I am developing a function library in Epicor Kinetic and am curious if I am limited to the drop down list of data types when selecting request parameters. I would like to be able to pass in a Dictionary<string, string> but don’t see that as an option.

Also, is it possible to create a function that accepts query parameters?

You are limited to those they specify, however, it’s an easy workaround.

Use a string field, and serialize / deserialize to json.

2 Likes

Also, for a more complete answer, there are some other data types available, which come
from references. You can add a reference, and when you go to add parameters, some might
become available. (You’ll have to pick it from the expanded list.)

Could you explain that a bit more?

2 Likes

Thank you! I will resort to using string fields for now.

For my second question, I would like to create an Epicor Function and make it available as a REST API endpoint. Instead of passing values to the endpoint in a POST body, I would like to pass values to it in the url and treat it like a GET request:

https://{EPICOR-SERVER}/api/v2/efx/{COMPANY}/{LIBRARY}/{FUNCTION}?param1={SOME_VALUE}&param2={SOME_OTHER_VALUE}

No.

You can technically do it, with a bizarre workaround by overriding one of the rest endpoints that takes query parameters and passing them from there, but that would be nuts.

Best bet for passing query params is to make some type of proxy api.

3 Likes

Sounds good. Thank you. A proxy API seems inevitable and will likely open the door to many use cases.

Thinking about security for a moment, remember that everything in the URL is often logged, so don’t put anything sensitive there - like tokens.

2 Likes