I would like to know how I can fetch information from other software into ERPNext.
Other software provides access to their API via 2 methods
1 - Using session cookies (see “session” URL path)
2 - Basic access authentication - Wikipedia
Right now I am able to fetch information using the below mentioned code in a situation where ERPNext is not involved.
$.ajax({
type: ‘get’,
url: ‘http://ipaddress:port/api/category/subcategory’,
headers: {
“Authorization”: "Basic " + btoa(“username” + “:” + “pwd”)
},
contentType:“application/json”,
data:JSON.stringify({
name:“Name”,
number:“13”
}),
success: function (response) {
console.log(response);
parameter1= response[0][“parameter1”];
parameter2= response[0][“parameter2”];
}
});
What should I be doing to get this information into a doctype.
I dont mean to store this information, I just want to get the data and display it for now.
Thank You,