SupplierReturnCredit get by api or webhook  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

SupplierReturnCredit get by api or webhook

Postby kranil7701 » Mon Jul 15, 2024 4:15 pm

hello
https://prnt.sc/ku3dKQC_mdA1
here i want to get SupplierReturnCreditGETRequest without passing a CreditID get all the SupplierReturnCredit . Is there any way by using api or any webhook for SupplierReturnCredit .
Thanks
kranil7701
Occasional Contributor
Occasional Contributor
 
Posts: 24
Joined: Tue Oct 31, 2023 1:03 pm

Re: SupplierReturnCredit get by api or webhook  Topic is solved

Postby Mike.Sheen » Mon Jul 15, 2024 5:03 pm

Add an AutoQuery route for the RA_CreditMain table so get a list of all the supplier return credits.

But you mentioned the SupplierReturnCreditGETRequest which is the supplier return requests - so that table is RA_RequestMain.

We already have the DTO's and framework for every table as standard - we just don't expose those routes because the API gets too big - so just create a plugin to add the route:

Code: Select all
public class RESTAPIPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaRESTAPIPlugin

    public void Configure(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin, ServiceStack.ServiceStackHost AppHost, Funq.Container Container, JiwaFinancials.Jiwa.JiwaApplication.Manager JiwaApplicationManager)
    {     
        AppHost.RegisterService<CustomServices>();       
        AppHost.Routes.Add(typeof(RA_RequestMainQuery), "/Queries/RA_RequestMain", "GET", "Retrieves a list of supplier return requests.", "");
    } 
}
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2473
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 764


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 7 guests