Page 1 of 1

SupplierReturnCredit get by api or webhook

PostPosted: Mon Jul 15, 2024 4:15 pm
by kranil7701
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

Re: SupplierReturnCredit get by api or webhook  Topic is solved

PostPosted: Mon Jul 15, 2024 5:03 pm
by Mike.Sheen
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.", "");
    } 
}