API to get all values of Debtor Categories, Contact Position

Discussions relating to the REST API of Jiwa 7.

API to get all values of Debtor Categories, Contact Position

Postby [email protected] » Mon Apr 22, 2024 8:39 pm

We can see that Jiwa has an ID for each value of Debtor Categories, Debtor Classifications, Debtor Contact Positions. We can get the ID for a Debtor Category value in the response json once we push from salesforce which we can use to associate with a debtor. But not sure about the contact positions such as Primary, Secondary, Tertiary.

https://api.jiwa.com.au/swagger-ui/#/Debtors It seems there is no api to get all the Debtor categories (values) from Jiwa. Could you please help us to get the existing Debtor Categories, Debtor Contact Positions along with the Jiwa ID (through manual/ through api).
[email protected]
I'm new here
I'm new here
 
Posts: 1
Joined: Mon Apr 22, 2024 5:56 pm

Re: API to get all values of Debtor Categories, Contact Posi

Postby SBarnes » Tue Apr 23, 2024 6:55 am

For debtor categories it does exist try

Code: Select all
GET /Queries/DB_Categories


As for contact positions it can be added with one line of code as shown below, if you search in the rest api plugin for DB_Categories and put the line below a line that similarly adds the DB_Categories routes and save the plugin and then restrart the api that should give you everything you want, whilst usually I wouldn't recommend editting that plugin and would rather suggest you use the plugin I have attached without knowing what version of Jiwa you are on there is a small chance this may not work so try adding the plugin first and see if that works otherwise resort to adding the line to the main rest api plugin.

In both cases you need to restart the api service to make everything recompile.

Code: Select all
AppHost.Routes.Add(typeof(CN_ContactPositionQuery), "/Queries/CN_ContactPosition", "GET", "Gets Contact Positions", "");
Attachments
Plugin REST API Add Contact Positions.xml
(23.33 KiB) Downloaded 2 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest

cron