Hi all,
I need to create an API that fetches the Warehouse shipment in JSON format based on my input parameter (Location) using code unit API. The response should also be in JSON format.
Is it possible to fetch data as JSON using codeunit API?
If so, could you please help me achieve this?
Thanks,
Rajan_Rajan.
Hi @Rajan_Rajan,
No, it is not possible to use a codeunit to do this using JSON. You only can use codeunits and XMLPorts to fetch and response data using SOAP.
You can use JSON using pages and queries. You can create API pages or API queries that uses Odata (JSON) or use any created page or query and register it as a Web Service and use Odata as well.
1 Like
hi @pjllaneras ,
Thank you for the insight. it’s really helpful for me.
Thanks,
@Rajan_Rajan.