Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents



Customers

Get a filtered list of customers

Anchor
v_Jiwa_Debtor_ListQuery_Anchor
v_Jiwa_Debtor_ListQuery_Anchor

Using v_Jiwa_Debtor_ListQuery

A view, v_Jiwa_Debtor_List is provided with a corresponding query class v_Jiwa_Debtor_ListQuery to facilitate retrieving a filtered, paginated list of customers.  The data returned includes the AccountNo, Name, Address, and Categories.

Which fields are returned can be limited with the Fields property - so only the required fields are returned.

With the Include property set to "Total" the response will include the total count of records matching the query - this is useful for pagination. The Skip and Take properties can be added specify the starting record number to return and the number of records to return.

Panel
borderStylesolid
titleRetrieve web enabled customers that have changed within the last day


Deck
idv_Jiwa_Debtor_ListQuery_1


Card
idv_Jiwa_Inventory_Item_ListQuery_1_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var itemListRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.v_Jiwa_Debtor_ListQuery() { WebEnabledWebAccess = true, LastSavedDateTimeGreaterThan = DateTime.Now.AddDays(-1), Fields = "AccountNo, Name", Include = "Total" };            
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.v_Jiwa_Debtor_List> itemListResponse = client.Get(itemListRequest);



Card
idv_Jiwa_Debtor_ListQuery_1_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DebtorList?WebEnabledWebAccess=true&LastSavedDateTimeGreaterThan=2017-09-18T00:00:00.000&Fields=AccountNo,Name&Include=Total");
}



Card
idv_Jiwa_Debtor_ListQuery_1_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DebtorList?WebEnabled=true&LastSavedDateTimeGreaterThan=2017-09-18T00:00:00.000&Fields=AccountNo,Name&Include=Total

Instead of using URL parameters as above, you can also use a DTO to set the parameters:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DebtorList -d '{"WebEnabledWebAccess":"true","LastSavedDateTimeGreaterThan="2017-09-18T00:00:00.000", "Fields":"AccountNo, Name", "Include":"Total"}'



Card
idv_Jiwa_Debtor_ListQuery_1_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DebtorList?WebEnabledWebAccess=true&LastSavedDateTimeGreaterThan=2017-09-18T00:00:00.000&Fields=AccountNo,Name&Include=Total&format=json

Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.




Using

IN

DB_MainQuery

An alternative to using the v_Jiwa_Debtor_ListQuery is to simply use the DB_MainQuery.

All tables have a corresponding Query class. For example, the table DB_Main has a class DB_MainQuery. The DB_MainQuery class is the DTO used for query operations against the DB_Main table. By setting various properties of an instance of this class, a filtered, ordered set of results can be obtained.

Panel
borderStylesolid
titleRetrieve first 5 customers where the AccountNo starts with '1'


Deck
idDB_MainQuery_1


Card
idDB_MainQuery_1_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var DB_MainQueryRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_MainQuery() { AccountNoStartsWith = "1", OrderBy = "AccountNo", Take = 5 };
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Main> DB_MainQueryResponse = client.Get(DB_MainQueryRequest);



Card
idDB_MainQuery_1_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
	// Authenticate               
	webClient.QueryString.Add("username", "Admin");
	webClient.QueryString.Add("password", "password");

	string responsebody = webClient.DownloadString("https://api.jiwa.com.au");
	// Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}

	// Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
	var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
	var sessionId = authResponse.SessionId;

	webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5");
}



Card
idDB_MainQuery_1_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DB_Main -d '{"AccountNoStartsWith":"1","OrderBy":"AccountNo","Take":"5"}'



Card
idDB_MainQuery_1_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&format=json

Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.




Panel
borderStylesolid
titleRetrieve first 5 customers where the AccountNo starts with '1', but limit which fields are returned


Deck
idDB_MainQuery_2


Card
idDB_MainQuery_2_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var DB_MainQueryRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_MainQuery() { AccountNoStartsWith = "1", OrderBy = "AccountNo", Take = 5, Fields = "DebtorID,AccountNo,Name,EmailAddress" };
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Main> DB_MainQueryResponse = client.Get(DB_MainQueryRequest);



Card
idIN_MainQuery_2_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Fields=DebtorID,AccountNo,Name,EmailAddress");

}



Card
idDB_MainQuery_2_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DB_Main -d '{"AccountNoStartsWith":"1","OrderBy":"AccountNo","Take":"5","Fields":"DebtorID,AccountNo,Name,EmailAddress"}'



Card
idDB_MainQuery_2_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Fields=DebtorID,AccountNo,Name,EmailAddress&format=json

Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.




Panel
borderStylesolid
titleRetrieve next 5 customers where the AccountNo starts with '1', and limit which fields are returned


Deck
idDB_MainQuery_3


Card
idDB_MainQuery_3_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var DB_MainQueryRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_MainQuery() { AccountNoStartsWith = "1", OrderBy = "AccountNo", Take = 5, Skip = 5, Fields = "DebtorID,AccountNo,Name,EmailAddress" };
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Main> DB_MainQueryResponse = client.Get(DB_MainQueryRequest);



Card
idIN_MainQuery_3_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Skip=5&Fields=DebtorID,AccountNo,Name,EmailAddress");

}



Card
idIN_MainQuery_3_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DB_Main -d '{"AccountNoStartsWith":"1","OrderBy":"AccountNo","Take":"5","Skip":"5","Fields":"DebtorID,AccountNo,Name,EmailAddress"}'



Card
idDB_MainQuery_3_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Skip=5&Fields=DebtorID,AccountNo,Name,EmailAddress&format=json

Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.



Read a customer

Anchor
ReadACustomer
ReadACustomer

In order to read a customer, the DebtorID must be provided. Note this is a full read of the debtor business logic - so it will include associated elements such as notes, documents, prices and so on.

Panel
borderStylesolid
titleRead a customer


Deck
idread_a_customer


Card
idread_a_customer_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorGETRequest() { DebtorID= "0000000061000000001V" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.Get(debtorGETRequest);



Card
idread_a_product_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V");
}



Card
idread_a_product_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V



Card
idread_a_product_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing the full debtor DTO model from the business logic - see the meta data page for the DebtorGETRequest for more detail.


Create a new customer

You don't need to provide anything to create a customer- an AccountNo and DebtorID will be generated for you - however it's usual practice to provide a AccountNo.  All other fields can be provided, but are not mandatory.  The response DTO will contain the generated DebtorID , and all other fields of the customer.

Panel
borderStylesolid
titleCreate a new customer, and setting the AccountNo, Name, EmailAddress and WebEnabled


Deck
idcreate_a_customer


Card
idcreate_a_customer_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorPOSTRequest { AccountNo = "NewAccountNo", Name = "A new customer", EmailAddress = "name@example.com", WebAccess = true };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.Post(debtorPOSTRequest);



Card
idcreate_a_product_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(new
    	{
	        AccountNo = "NewAccountNo",
    	    Name = "A new customer",
        	EmailAddress = "name@example.com",
	        WebAccess = true
        });
    responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors", "POST", json);  
}



Card
idcreate_a_product_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors -d '{"AccountNo":"NewAccountNo","Name":"A new customer","EmailAddress":"name@example.com", "WebAccess"""true"}'




The response returned from the above request will be a json document representing the full debtor DTO model from the business logic - see the meta data page for the DebtorPOSTRequest for more detail.


Panel
borderStylesolid
titleCreate a customer with 2 notes


Deck
idcreate_a_customer_with_2_notes


Card
idcreate_a_customer_with_2_notes_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorPOSTRequest { AccountNo = "NewAccountNo", Name = "A new customer", EmailAddress = "name@example.com", WebAccess = true };
debtorPOSTRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteText = "Note text 1" });
debtorPOSTRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteText = "Note text 2" });
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.Post(debtorPOSTRequest);



Card
idcreate_a_product_with_2_notes_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { PartNo = "NewAccountNo", Description = "A new customer", EmailAddress = "name@example.com", WebAccess = true, Notes = new List<object>() { new { NoteText = "Note text 1" }, new { NoteText = "Note text 2" } } });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors", "POST", json);
}



Card
idcreate_a_customer_with_2_notes_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors -d '{"AccountNo":"NewAccountNo","Name":"A new Customer","EmailAddress ":"name@example.com", "WebAccess":"true", "Notes":[{"NoteText":"Note text 1"}, {"NoteText":"NoteText 2"}]}'




The response returned from the above request will be a json document representing the full debtor DTO model from the business logic - see the meta data page for the DebtorPOSTRequest for more detail.

Update an existing customer

Anchor
DebtorPatchRequest
DebtorPatchRequest

Panel
borderStylesolid
titleUpdate EmailAddress and WebAccess of a customer, add an additional note and update an existing note


Deck
idupdate_a_customer


Card
idupdate_a_customer_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorPatchRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorPATCHRequest { DebtorID = "0000000061000000001V", EmailAddress = "name2@example.com", WebAccess = false };
debtorPatchRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteText = "A new note added" });
debtorPatchRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteID = "DE91CC53-724A-47C6-8920-57AC82BFAD1F", NoteText = "A modified note text" });
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.Patch(debtorPatchRequest);



Card
idupdate_a_product_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { EmailAddress = "name2@example.com", WebAccess = "false", Notes = new List<object>() { new { NoteText = "A new note added" }, new { NoteID = "DE91CC53-724A-47C6-8920-57AC82BFAD1F", NoteText = "A modified note text" } } });
    responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V", "PATCH", json);
}



Card
idupdate_a_customer_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH http://localhost/Debtors/0000000061000000001V -d '{EmailAddress = "name2@example.com", WebAccess = "false","Notes":[{"NoteText":"A new note added"},{"NoteID":"DE91CC53-724A-47C6-8920-57AC82BFAD1F","NoteText":"A modified note text"}]}'




The response returned from the above request will be a json document representing the full debtor DTO model from the business logic - see the meta data page for the DebtorPOSTRequest for more detail.


Delete a customer

Panel
borderStylesolid
titleDelete a customer


Deck
idDebtorDELETERequest


Card
idDebtorDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDELETERequest { DebtorID = "1c4e1f674674465bb57a31a090bfec174d20adff" };
client.Delete(debtorDELETERequest);



Card
idDebtorDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.UploadString("http://localhost/Debtors/a256102d4b2c4202b0e887315f0dc5b1443e9b20", "DELETE", "");
}



Card
idDebtorDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj78ec7a8d39f042139a23' -X DELETE https://api.jiwa.com.au/Debtors/6c5b4a30c1b645ad9ebb





Custom Fields

Whilst custom fields can be retrieved, or modified as part of the normal debtor GET, POST and PATCH operations, you can also use the following requests.

Get a list of customer custom fields

Panel
borderStylesolid
titleGet all debtor custom fields


Deck
idDebtorCustomFieldsGETManyRequest


Card
idDebtorCustomFieldsGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCustomFieldsGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldsGETManyRequest();
var debtorCustomFieldsGETManyResponse = client.Get(debtorCustomFieldsGETManyRequest );



Card
idDebtorCustomFieldsGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/CustomFields");
}



Card
idDebtorCustomFieldsGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/CustomFields



Card
idDebtorCustomFieldsGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/CustomFields?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing the a list of the DTO model for a custom field - see the meta data page for the DebtorCustomFieldsGETManyRequest for more detail.


Get a list of custom field values for a customer

Panel
borderStylesolid
titleGet all custom field values for a customer


Deck
idDebtorCustomFieldValuesGETManyRequest


Card
idDebtorCustomFieldValuesGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCustomFieldsGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldValuesGETManyRequest() { DebtorID = "0000000061000000001V" };
var debtorCustomFieldsGETManyResponse = client.Get(debtorCustomFieldsGETManyRequest);



Card
idInventoryCustomFieldValuesGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues");
}



Card
idInventoryCustomFieldValuesGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues



Card
idInventoryCustomFieldValuesGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the Custom Field Value DTO model - see the meta data page for the DebtorCustomFieldValuesGETManyRequest for more detail.


Get a custom field value for a customer

Panel
borderStylesolid
titleGet the custom field value for a specific custom field and customer


Deck
idDebtorCustomFieldValueGETRequest


Card
idDebtorCustomFieldValueGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCustomFieldValueGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldValueGETRequest() { DebtorID= "0000000061000000001V", SettingID = "53a277cd848541a694d9                " };
var debtorCustomFieldValueGETResponse= client.Get(debtorCustomFieldValueGETRequest);



Card
idDebtorCustomFieldValueGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9                ");
}



Card
idDebtorCustomFieldValueGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called (Note that there are trailing spaces as part of the SettingID!):

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9                



Card
idDebtorCustomFieldValueGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9                ?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing the Custom Field Value DTO model - see the meta data page for the DebtorCustomFieldValueGETRequest for more detail.

Update a custom field value for a customer

Panel
borderStylesolid
titleUpdate a custom field value for a customer


Deck
idDebtorCustomFieldValuePATCHRequest


Card
idDebtorCustomFieldValuePATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCustomFieldValuePATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldValuePATCHRequest() { DebtorID = "0000000061000000001V", SettingID = "53a277cd848541a694d9                ", Contents = "True" };
var debtorCustomFieldValuePATCHResponse = client.Patch(debtorCustomFieldValuePATCHRequest );



Card
idDebtorCustomFieldValuePATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { Contents = "True" });
    responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9                /", "PATCH", json);
}



Card
idDebtorCustomFieldValuePATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called (note the trailing spaces of the SettingID have been replaces with '%20'!):

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20 -d '{"Contents":"True"}'




The response returned from the above request will be a json document representing the full inventory item DTO model from the business logic - see the meta data page for the DebtorPOSTRequest for more detail.

Delivery Addresses


Contact Names

Whilst delivery addresses contact names can be retrieved, or modified as part of the normal debtor GET, POST and PATCH operations, you can also use the following requests.

Get a list of customer

delivery addresses

contact names

Panel
borderStylesolid
titleGet all delivery addresses contact names for a customer


Deck
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest


Card
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressesGETManyRequestdebtorContactNamesGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest { DebtorID = "0000000061000000001V" };
List<JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress>DebtorContactName> debtorDeliveryAddressesdebtorContactNames = client.Get(debtorDeliveryAddressesGETManyRequestdebtorContactNamesGETManyRequest);



Card
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames");
}



Card
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames



Card
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the debtor delivery address contact names DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressesGETManyRequest DebtorContactNamesGETManyRequest for more detail.


Get a single

delivery address

contact name for a customer

Panel
borderStylesolid
titleGet a debtor delivery addresscontact name


Deck
idDebtorDeliveryAddressGETRequestDebtorContactNameGETRequest


Card
idDebtorDeliveryAddressGETRequestDebtorContactNameGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressGETRequestdebtorContactNameGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressGETRequestDebtorContactNameGETRequest { DebtorID = "0000000061000000001V", DeliveryAddressIDContactNameID = "00000000LR000000003O000000002D000000001C" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddressDebtorContactName debtorDeliveryAddressdebtorContactName = client.Get(debtorDeliveryAddressGETRequestdebtorContactNameGETRequest);



Card
idDebtorDeliveryAdddressGETRequestDebtorContactNameGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O000000002D000000001C");
}



Card
idDebtorDeliveryAddressGETRequestDebtorContactNameGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O000000002D000000001C



Card
idDebtorDeliveryAddressGETRequestDebtorContactNameGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O000000002D000000001C?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a debtor delivery address contact name DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressGETRequest DebtorContactNameGETRequest for more detail.


Add a new

delivery address

contact name for a customer

Panel
borderStylesolid
titleAdd a new delivery address contact name to a customer


Deck
idDebtorDeliveryAddressPOSTRequestDebtorContactNamePOSTRequest


Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNamePOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressPOSTRequestdebtorContactNamePOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressPOSTRequestDebtorContactNamePOSTRequest { DebtorID= "0000000061000000001V", Address1Title = "Unit 1AMr.", Address2FirstName = "57 Smith StreetFred", Address3Surname = "BlakevilleBloggs", Address4PrimaryPositionName = "NSW", Postcode= "2126", IsDefault = true, CountryExternal Accountant", EmailAddress = "AustraliaFred@example.com"};
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddressDebtorContactName debtorDeliveryAddressdebtorContactName = client.Post(debtorDeliveryAddressPOSTRequestdebtorContactNamePOSTRequest);



Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNamePOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID = "0000000061000000001V", Title Address1= "Unit 1AMr.", Address2FirstName = "57 Smith Street""Fred", Address3Surname = "BlakevilleBloggs", Address4PrimaryPositionName = "NSW", Postcode= "2126External Accountant", IsDefault = true, Country EmailAddress = "AustraliaFred@example.com" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames", "POST", json);  
}



Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNamePOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames -d '{"DebtorID":"0000000061000000001V", "Address1Title":"Unit 1AMr.", "Address2FirstName":"57 Smith StreetFred", "Address3Surname":"BlakevilleBloggs", "Address4PrimaryPositionName":"NSW", "Postcode":"2126External Accountant", "IsDefaultEmailAddress":"true", "Country":"Australia" Fred@example.com"}'




The response returned from the above request will be a json document representing a debtor delivery address contact name DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressPOSTRequest DebtorContactNamePOSTRequest for more detail.

Update an existing customer

delivery address

contact name

Panel
borderStylesolid
titleUpdates an existing delivery address contact name for a customer


Deck
idDebtorDeliveryAddressPATCHRequestDebtorContactNamePATCHRequest


Card
idInventoryDebtorSpecificPricePATCHRequestDebtorContactNamePATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressPATCHRequestdebtorContactNamePATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressPATCHRequestDebtorContactNamePATCHRequest { DebtorID = "0000000061000000001V", DeliveryAddressIDContactNameID = "00000000LR000000003N00000000NX00000000AW", CountryDefaultContact = "Australia"true };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddressDebtorContactName debtorDeliveryAddressdebtorContactName = client.Patch(debtorDeliveryAddressPATCHRequestdebtorContactNamePATCHRequest);



Card
idInventoryDebtorSpecificPricePATCHRequestDebtorContactNamePATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { CountryDefaultContact = "Australia"true });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003N00000000NX00000000AW", "PATCH", json);
}



Card
idInventoryDebtorSpecificPricePATCHRequestDebtorContactNamePATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003N00000000NX00000000AW -d '{"CountryDefaultContact":"Australia"true}'




The response returned from the above request will be a json document representing a debtor delivery address contact name DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressPATCHRequest DebtorContactNamePATCHRequest for more detail.

Delete a customer

delivery address

contact name

Panel
borderStylesolid
titleDeletes an existing delivery address contact name for a customer


Deck
idDebtorDeliveryAddressDELETERequestDebtorContactNameDELETERequest


Card
idDebtorDeliveryAddressDELETERequestDebtorContactNameDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressDELETERequestdebtorContactNameDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressDELETERequestDebtorContactNameDELETERequest { DebtorID = "0000000061000000001V", DeliveryAddressIDContactNameID = "00000000LR000000003O00000000NX00000000AX" };
client.Delete(debtorDeliveryAddressDELETERequestdebtorContactNameDELETERequest);



Card
idInventoryDebtorSpecificPriceDELETERequestDebtorContactNameDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O00000000NX00000000AX", "DELETE", "");
}



Card
idInventoryDebtorSpecificPriceDELETERequestDebtorContactNameDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O00000000NX00000000AX

Notes

Get all notes for a customer

While you could always use the DB_NotesQuery class to return all notes with a given DebtorID - There is also a GET method for retrieving all notes for a given DebtorID.






Group Memberships

Whilst group memberships can be retrieved, or modified as part of the normal debtor GET, POST and PATCH operations, you can also use the following requests.

Get a list of customer group memberships

Panel
borderStylesolid
titleGet all notes group memberships for a customer


Deck
idDebtorNotesGETManyRequestDebtorGroupMembershipsGETManyRequest


Card
idInventoryNotesGETManyRequestDebtorGroupMembershipsGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNotesGETManyRequestdebtorGroupMembershipsGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotesGETManyRequest()DebtorGroupMembershipsGETManyRequest { DebtorID = "0000000061000000001V" };
var debtorNotesGETManyResponseList<JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership> debtorGroupMemberships = client.Get(debtorNotesGETManyRequestdebtorGroupMembershipsGETManyRequest);



Card
idDebtorNotesGETManyRequestDebtorGroupMembershipsGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/NotesGroupMemberships");
}



Card
idDebtorNotesGETManyRequestDebtorGroupMembershipsGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/NotesGroupMemberships



Card
idDebtorNotesGETManyRequestDebtorGroupMembershipsGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/NotesGroupMemberships?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the debtor note membership DTO model from the business logic - see the meta data page for the DebtorNotesGETManyRequest DebtorGroupMembershipsGETManyRequest for more detail.


Get a

specific note

single group membership for a customer

With a provided DebtorID, and a NoteID a single note can be retrieved.

Panel
borderStylesolid
titleGet a specific notedebtor group membership


Deck
idDebtorNotesGETRequestDebtorGroupMembershipGETRequest


Card
idDebtorNotesGETRequestDebtorGroupMembershipGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorGroupMembershipGETRequest debtorNoteGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteGETRequest()DebtorGroupMembershipGETRequest { DebtorID = "0000000061000000001V", NoteIDGroupMembershipID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3000000002D000000000U" };
var debtorNoteGETResponseJiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.Get(debtorNoteGETRequestdebtorGroupMembershipGETRequest);



Card
idDebtorNotesGETRequestDebtorGroupMembershipGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3GroupMemberships/000000002D000000000U");
}



InventoryNotesGETRequest
Card
idDebtorNotesGETRequestDebtorGroupMembershipGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3
Card
id
GroupMemberships/000000002D000000000U



Card
idDebtorGroupMembershipGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3GroupMemberships/000000002D000000000U?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a debtor note group membership DTO model from the business logic - see the meta data page for the DebtorNoteGETRequest DebtorGroupMembershipGETRequest for more detail.


Add a new

note

group membership for a customer

Panel
borderStylesolid
titleAdd a new note group membership to a customer


Deck
idDebtorNotePOSTRequestDebtorGroupMembershipPOSTRequest


Card
idInventoryNotePOSTRequestDebtorGroupMembershipPOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNotePOSTRequestdebtorGroupMembershipPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePOSTRequest()DebtorGroupMembershipPOSTRequest { DebtorID = "0000000061000000001V", NoteTextGroupDescription = "ThisCash isOnly", aStaffUsername new= note"Admin" };
var debtorNotePOSTResponseJiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.Post(debtorNotePOSTRequestdebtorGroupMembershipPOSTRequest);



Card
idDebtorNotePOSTRequestDebtorGroupMembershipPOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { NoteText DebtorID = "0000000061000000001V", GroupDescription = "This is a new noteDefault - No Group", StaffUsername = "Admin" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/NotesGroupMemberships", "POST", json);  
}



Card
idDebtorNotePOSTRequestDebtorGroupMembershipPOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/NotesGroupMemberships -d '{"NoteTextDebtorID":"0000000061000000001V"This is a new note, "GroupDescription":"Statement - Fax", "StaffUsername":"Admin"}'




The response returned from the above request will be a json document representing a debtor note group membership DTO model from the business logic - see the meta data page for the DebtorNotePOSTRequest DebtorGroupMembershipPOSTRequest for more detail.

Update an existing

note

customer group membership

Panel
borderStylesolid
titleUpdate Updates an existing notegroup membership for a customer


Deck
idDebtorNotePATCHRequestDebtorGroupMembershipPATCHRequest


Card
idDebtorNotePATCHRequestDebtorGroupMembershipPATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNotePATCHRequestdebtorGroupMembershipPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePATCHRequest()DebtorGroupMembershipPATCHRequest { DebtorID = "0000000061000000001V", NoteIDGroupMembershipID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3000000002D000000000U", NoteTextIsDefault = "Thistrue is an updated note" };
var debtorNotePOSTResponse };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.Patch(debtorNotePATCHRequestdebtorGroupMembershipPATCHRequest);



Card
idInventoryNotePATCHRequestDebtorGroupMembershipPATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { NoteTextIsDefault = "This is an updated note" true });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3GroupMemberships/000000002D000000000V", "PATCH", json);
     
}



Card
idInventoryNotePATCHRequestDebtorGroupMembershipPATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3GroupMemberships/000000002D000000000T -d '{"NoteTextIsDefault":"This is an updated note"true}'




The response returned from the above request will be a json document representing a debtor note group membership DTO model from the business logic - see the meta data page for the DebtorNotePATCHRequest DebtorGroupMembershipPATCHRequest for more detail.

Delete

a note for

a customer group membership

Panel
borderStylesolid
titleDelete a specific noteDeletes an existing group membership for a customer


Deck
idDeleteNoteDELETERequestDebtorGroupMembershipDELETERequest


Card
idInventoryNoteDELETERequestDebtorGroupMembershipDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNoteDELETERequestdebtorGroupMembershipDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteDELETERequest()DebtorGroupMembershipDELETERequest { DebtorID = "0000000061000000001V", NoteIDGroupMembershipID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3000000002D000000000U" };
var client.Delete(debtorNoteDELETERequestdebtorGroupMembershipDELETERequest);



Card
idDebtorNoteDELETERequestDebtorGroupMembershipDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType]          
= "application/json";
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3GroupMemberships/000000002D000000000V", "DELETE", "");
}



Card
idDeleteNoteDELETERequestDebtorGroupMembershipDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3
Documents
GroupMemberships/000000002D000000000T




Notes

Get all

documents

notes for a customer

While you could always use the DB_DocumentsQuery NotesQuery class to return all documents notes with a given DebtorID - There is also a GET method for retrieving all documents notes for a given DebtorID.

Panel
borderStylesolid
titleGet all documents notes for a customer


Deck
idInventoryDocumentsGETManyRequestDebtorNotesGETManyRequest


Card
idDebtorDocumentsGETManyRequestInventoryNotesGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentsGETManyRequest debtorNotesGETManyRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentsGETManyRequestDebtorNotesGETManyRequest() { DebtorID = "0000000061000000001V" };
var debtorDocumentsGETManyResponsedebtorNotesGETManyResponse = client.Get(debtorDocumentsGETManyRequestdebtorNotesGETManyRequest);



Card
idDebtorDocumentsGETManyRequestDebtorNotesGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes");
}



Card
idDebtorDocumentsGETManyRequestDebtorNotesGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes



Card
idDebtorDocumentsGETManyRequestDebtorNotesGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the debtor document note DTO model from the business logic - see the meta data page for the DocumentDocumentsGETManyRequest DebtorNotesGETManyRequest for more detail.

Get a specific

document

note for a customer

With a provided DebtorID, and a DocumentID NoteID a single document note can be retrieved.

Panel
borderStylesolid
titleGet a specific documentnote


Deck
idDebtorDocumentGETRequestDebtorNotesGETRequest


Card
idDebtorDocumentGETRequestDebtorNotesGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentGETRequestdebtorNoteGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentGETRequestDebtorNoteGETRequest() { DebtorID = "0000000061000000001V", DocumentIDNoteID = "45ff4e1480C3C46B-23c59D64-47444451-a8d2BE6B-0905e8a2723b9CF68C9BCBE3" };
var debtorDocumentGETResponsedebtorNoteGETResponse= client.Get(debtorDocumentGETRequestdebtorNoteGETRequest);



Card
idDebtorDocumentGETRequestDebtorNotesGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes/45ff4e1480C3C46B-23c59D64-47444451-a8d2BE6B-0905e8a2723b9CF68C9BCBE3");
}



Card
idDebtorDocumentGETRequestDebtorNotesGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes/45ff4e1480C3C46B-23c59D64-47444451-a8d2BE6B-0905e8a2723b9CF68C9BCBE3



Card
idDebtorDocumentGETRequestInventoryNotesGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsNotes/45ff4e1480C3C46B-23c59D64-47444451-a8d2BE6B-0905e8a2723b9CF68C9BCBE3?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a debtor document note DTO model from the business logic - see the meta data page for the DebtorDocumentGETRequest DebtorNoteGETRequest for more detail.


Add a new

document

note

Panel
borderStylesolid
titleAdd a new document note to a customer


Deck
idDebtorDocumentPOSTRequestDebtorNotePOSTRequest


DebtorDocumentPOSTRequest
Card
idDebtorDocumentPOSTRequestInventoryNotePOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentPOSTRequestdebtorNotePOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPOSTRequestDebtorNotePOSTRequest() { DebtorID = "0000000061000000001V", DescriptionNoteText = "AThis is a new document", PhysicalFileNamenote" };
var debtorNotePOSTResponse = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") };
var debtorDocumentPOSTResponse = client.Post(debtorDocumentPOSTRequest);
Card
id
client.Post(debtorNotePOSTRequest);



Card
idDebtorNotePOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { NoteText = "This is a new note" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes", "POST", json);
}



Card
idDebtorNotePOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes -d '{"NoteText":"This is a new note"}'




The response returned from the above request will be a json document representing a debtor note DTO model from the business logic - see the meta data page for the DebtorNotePOSTRequest for more detail.


Update an existing note

Panel
borderStylesolid
titleUpdate an existing note


Deck
idDebtorNotePATCHRequest


Card
idDebtorNotePATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNotePATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePATCHRequest() { DebtorID = "0000000061000000001V", NoteID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3", NoteText = "This is an updated note" };
var debtorNotePOSTResponse = client.Patch(debtorNotePATCHRequest);



Card
idInventoryNotePATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { NoteText = "This is an updated note" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3", "PATCH", json);      
}



Card
idInventoryNotePATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3 -d '{"NoteText":"This is an updated note"}'




The response returned from the above request will be a json document representing a debtor note DTO model from the business logic - see the meta data page for the DebtorNotePATCHRequest for more detail.


Delete a note for a customer

Panel
borderStylesolid
titleDelete a specific note


Deck
idDeleteNoteDELETERequest


Card
idInventoryNoteDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorNoteDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteDELETERequest() { DebtorID= "0000000061000000001V", NoteID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3" };
var client.Delete(debtorNoteDELETERequest);



Card
idDebtorNoteDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3", "DELETE", "");
}



Card
idDeleteNoteDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3





Documents

Get all documents for a customer

While you could always use the DB_DocumentsQuery class to return all documents with a given DebtorID - There is also a GET method for retrieving all documents for a given DebtorID.

Panel
borderStylesolid
titleGet all documents for a customer


Deck
idInventoryDocumentsGETManyRequest


Card
idDebtorDocumentsGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentsGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentsGETManyRequest() { DebtorID= "0000000061000000001V" };
var debtorDocumentsGETManyResponse = client.Get(debtorDocumentsGETManyRequest);



Card
idDebtorDocumentsGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents");
}



Card
idDebtorDocumentsGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents



Card
idDebtorDocumentsGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the debtor document DTO model from the business logic - see the meta data page for the DocumentDocumentsGETManyRequest for more detail.


Get a specific document for a customer

With a provided DebtorID, and a DocumentID a single document can be retrieved.

Panel
borderStylesolid
titleGet a specific document


Deck
idDebtorDocumentGETRequest


Card
idDebtorDocumentGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentGETRequest() { DebtorID = "0000000061000000001V", DocumentID = "2b8532cb-2ef7-4239-8058-ffeca34baa9a" };
var debtorDocumentGETResponse= client.Get(debtorDocumentGETRequest);



Card
idDebtorDocumentGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/2b8532cb-2ef7-4239-8058-ffeca34baa9a");
}



Card
idDebtorDocumentGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/2b8532cb-2ef7-4239-8058-ffeca34baa9a



Card
idDebtorDocumentGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/2b8532cb-2ef7-4239-8058-ffeca34baa9a?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a debtor document DTO model from the business logic - see the meta data page for the DebtorDocumentGETRequest for more detail.


Add a new document

Panel
borderStylesolid
titleAdd a new document to a customer


Deck
idDebtorDocumentPOSTRequest


Card
idDebtorDocumentPOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPOSTRequest() { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm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RBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") };
var debtorDocumentPOSTResponse = client.Post(debtorDocumentPOSTRequest);



Card
idDebtorDocumentPOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtf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kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") } );
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents", "POST", json); 
}



Card
idDebtorDocumentPOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents -d '{"Description":"A new document", "PhysicalFileName":"Test.png", "FileBinary": "R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIG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nCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw=="}'




The response returned from the above request will be a json document representing a debtor document DTO model from the business logic - see the meta data page for the DebtorDocumentPOSTRequest for more detail.


Update an existing document

Panel
borderStylesolid
titleUpdate an existing document


Deck
idDebtorDocumentPATCHRequest


Card
idDebtorDocumentPATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPATCHRequest() { DebtorID= "0000000061000000001V", DocumentID = "2b8532cb-2ef7-4239-8058-ffeca34baa9a", FileBinary = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6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zd3YQTqoJEhsy3h2PHPxk+e8OmkaVNnTJ86Y9EiI2KfO9tg2dJlCxcYGRktNjYynjfH0NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") };
var debtorDocumentPATCHResponse = client.Patch(debtorDocumentPATCHRequest);



Card
idDebtorDocumentPATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { FileBinary = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6fPn0Kv8XFxXV119LTf2poaGi82Tg8PEz4wcE7iUkAxHTQvA0LC+vr62NNcRobGwU4EiTSkW06q6qqGhoa4j1ALF68eNHS0lJZWUlthGCvXbsWGhoKmrBfB80mf39/drMeGBjg5MuXL3nyk8CFkDFeEq9SqXRycrKzs1MEKXDMfnIVNrBwcHCEd+GnCAiNJjYhIeHXEcONl9d2U1PT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Zvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") } );
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/2b8532cb-2ef7-4239-8058-ffeca34baa9a", "PATCH", json);
}



Card
idDebtorDocumentPATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/2b8532cb-2ef7-4239-8058-ffeca34baa9a -d '{"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7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg=="}'




The response returned from the above request will be a json document representing a debtor document DTO model from the business logic - see the meta data page for the DebtorDocumentPATCHRequest for more detail.


Delete a document for a customer

Panel
borderStylesolid
titleDelete a specific document


Deck
idDebtorDocumentDELETERequest


Card
idDebtorDocumentDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentDELETERequest() { DebtorID= "0000000061000000001V", DocumentID = "2b8532cb-2ef7-4239-8058-ffeca34baa9a" };
client.Delete(debtorDocumentDELETERequest);



Card
idDebtorDocumentDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/9fce8180-4509-43ef-8e09-b63122d58dd8", "DELETE", "");
}



Card
idDebtorDocumentDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/eab07f7a-c406-47fc-bdff-c5ae70cc91a5





Delivery Addresses

Whilst delivery addresses can be retrieved, or modified as part of the normal debtor GET, POST and PATCH operations, you can also use the following requests.

Get a list of customer delivery addresses

Panel
borderStylesolid
titleGet all delivery addresses for a customer


Deck
idDebtorDeliveryAddressesGETManyRequest


Card
idDebtorDeliveryAddressesGETManyRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressesGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressesGETManyRequest { DebtorID = "0000000061000000001V" };
List<JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress> debtorDeliveryAddresses = client.Get(debtorDeliveryAddressesGETManyRequest);



Card
idDebtorDeliveryAddressesGETManyRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses");
}



Card
idDebtorDeliveryAddressesGETManyRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses



Card
idDebtorDeliveryAddressesGETManyRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a list of the debtor delivery address DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressesGETManyRequest for more detail.


Get a single delivery address for a customer

Panel
borderStylesolid
titleGet a debtor delivery address


Deck
idDebtorDeliveryAddressGETRequest


Card
idDebtorDeliveryAddressGETRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressGETRequest { DebtorID= "0000000061000000001V", DeliveryAddressID = "00000000LR000000003O" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Get(debtorDeliveryAddressGETRequest);



Card
idDebtorDeliveryAdddressGETRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
	responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003O");
}



Card
idDebtorDeliveryAddressGETRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003O



Card
idDebtorDeliveryAddressGETRequest_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003O?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing a debtor delivery address DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressGETRequest for more detail.


Add a new delivery address for a customer

Panel
borderStylesolid
titleAdd a new delivery address to a customer


Deck
idDebtorDeliveryAddressPOSTRequest


Card
idDebtorDeliveryAddressPOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressPOSTRequest { DebtorID= "0000000061000000001V", Address1= "Unit 1A", Address2 = "57 Smith Street", Address3 = "Blakeville", Address4 = "NSW", Postcode= "2126", IsDefault = true, Country = "Australia"};
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Post(debtorDeliveryAddressPOSTRequest);



Card
idDebtorDeliveryAddressPOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json var authResponse = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAA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rNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") } DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID= "0000000061000000001V", Address1= "Unit 1A", Address2 = "57 Smith Street", Address3 = "Blakeville", Address4 = "NSW", Postcode= "2126", IsDefault = true, Country = "Australia" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsDeliveryAddresses", "POST", json);  
}



Card
idDebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/DocumentsDeliveryAddresses -d '{"Description '{"DebtorID":"0000000061000000001V", "Address1":"Unit 1A", "Address2":"A new document57 Smith Street", "Address3":"Blakeville", "PhysicalFileNameAddress4":"Test.pngNSW", "FileBinaryPostcode": "R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9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SJEZ7YgRYUNrkji9P55sF/ogxw5ZkSqIDaZBV6aSGYq/lGZplndkckZ98xoICbTcIJGQAZcNmdmUc210hs35nCyJ58fgmIKX5RQGOZowxaZwYA+JaoKQwswGijBV4C6SiTUmpphMspJx9unX4KaimjDv9aaXOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==""2126", "IsDefault":"true", "Country":"Australia" }'




The response returned from the above request will be a json document representing a debtor document delivery address DTO model from the business logic - see the meta data page for the DebtorDocumentPOSTRequest DebtorDeliveryAddressPOSTRequest for more detail.

Update an existing

document

customer delivery address

Panel
borderStylesolid
titleUpdate Updates an existing documentdelivery address for a customer


Deck
idDebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest


Card
idDebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentPATCHRequestdebtorDeliveryAddressPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPATCHRequest()DebtorDeliveryAddressPATCHRequest { DebtorID= "0000000061000000001V", DocumentID = "ba141e00-23bd-440d-8754-595ffbc24620", FileBinary = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6fPn0Kv8X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Ehsy3h2PHPxk+e8OmkaVNnTJ86Y9EiI2KfO9tg2dJlCxcYGRktNjYynjfH0NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") };
var debtorDocumentPATCHResponse= "0000000061000000001V", DeliveryAddressID = "00000000LR000000003N", Country = "Australia" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Patch(debtorDocumentPATCHRequestdebtorDeliveryAddressPATCHRequest);



Card
idDebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
   	 string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { FileBinaryCountry = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6fPn0Kv8XFxXV119LTf2poaGi82Tg8PEz4wcE7iUkAxHTQvA0LC+vr62NNcRobGwU4EiTSkW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NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") } "Australia" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/ba141e00-23bd-440d-8754-595ffbc24620/DeliveryAddresses/00000000LR000000003N", "PATCH", json);
}



Card
idDebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/ba141e00-23bd-440d-8754-595ffbc24620 -d '{"FileBinary":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6fPn0Kv8XFxXV119LTf2poaGi82Tg8PEz4wcE7iUkAxHTQvA0LC+vr62NNcRobGwU4EiTSkW06q6qqGhoa4j1ALF68eNHS0lJZWUlthGCvXbsWGhoKmrBfB80mf39/drMeGBjg5MuXL3nyk8CFkDFeEq9SqXRycrKzs1MEKXDMfnIVNrBwcHCEd+GnCAiNJjYhIeHXEcONl9d2U1PTJSZLFIod2m6tAE0sOTk5YrH1lStX3N08Phk34bMJkxcvNsnMzESIeGUbx0tKStau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uOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg== -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003N -d '{"Country":"Australia"}'




The response returned from the above request will be a json document representing a debtor document delivery address DTO model from the business logic - see the meta data page for the DebtorDocumentPATCHRequest DebtorDeliveryAddressPATCHRequest for more detail.

Delete

a document for

a customer delivery address

Panel
borderStylesolid
titleDelete a specific documentDeletes an existing delivery address for a customer


Deck
idDebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest


Card
idDebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDocumentDELETERequestdebtorDeliveryAddressDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentDELETERequest()DebtorDeliveryAddressDELETERequest { DebtorID = "0000000061000000001V", DocumentIDDeliveryAddressID = "ba141e00-23bd-440d-8754-595ffbc2462000000000LR000000003O" };
client.Delete(debtorDocumentDELETERequestdebtorDeliveryAddressDELETERequest);



Card
idDebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] =         
"application/json";
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/9462c9ea-fbce-4e81-873d-c6375d5edfe8DeliveryAddresses/00000000LR000000003O", "DELETE", "");
}



Card
idDebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/45ff4e14-23c5-4744-a8d2-0905e8a2723bDeliveryAddresses/00000000LR000000003O





GroupMemberships

Categories

Get a list of all categories

Panel
borderStylesolid
titleRetrieve all debtor categories


Deck
idDB_CategoriesQuery_1


Card
idDB_MainQuery_1_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var DB_CategoriesRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_CategoriesQuery();
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Categories> DB_CategoriesResponse = client.Get(DB_CategoriesRequest);



Card
idDB_CategoriesQuery_1_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DB_Categories");
}



Card
idDB_CategoriesQuery_1_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DB_Categories



Card
idDB_CategoriesQuery_1_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DB_Categories?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.




Get a list of a specific category number

Panel
borderStylesolid
titleRetrieve all Category 1 debtor categories


Deck
idDB_CategoriesQuery_2


Card
idDB_CategoriesQuery_2_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var DB_CategoriesRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_CategoriesQuery() { CategoryNo = 1};
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Categories> DB_CategoriesResponse = client.Get(DB_CategoriesRequest);



Card
idDB_CategoriesQuery_2_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Queries/DB_Categories?CategoryNo=1");
}



Card
idDB_CategoriesQuery_2_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Queries/DB_Categories?CategoryNo=1



Card
idDB_CategoriesQuery_2_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Queries/DB_Categories?CategoryNo=1&format=json

Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.




Get a specific category

Panel
borderStylesolid
titleRetrieve a specific category


Deck
idDB_CategoriesQuery_2


Card
idDB_CategoriesQuery_2_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCategoryGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCategoryGETRequest() { CategoryID = "F6DDF94F-D41B-4DE4-8A8C-62BF03C32573" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Category.DebtorCategory Category = client.Get(debtorCategoryGETRequest);



Card
idDB_CategoriesQuery_2_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/Categories/F6DDF94F-D41B-4DE4-8A8C-62BF03C32573");
}



Card
idDB_CategoriesQuery_2_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
 curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/Categories/F6DDF94F-D41B-4DE4-8A8C-62BF03C32573



Card
idDB_CategoriesQuery_2_webbrowser
labelWeb Browser

Navigate to the auth URL and provide the username and password as parameters:

No Format
https://api.jiwa.com.au/auth?username=admin&password=password

This authenticates the user and creates a cookie, so a subsequent request can be made:

No Format
https://api.jiwa.com.au/Debtors/Categories/F6DDF94F-D41B-4DE4-8A8C-62BF03C32573?format=json

Note the ?format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned.


The response returned from the above request will be a json document representing the category DTO model from the business logic - see the meta data page for the DebtorCategoryGETRequest for more detail.


Create a category

Panel
borderStylesolid
titleCreate a new category


Deck
idDebtorCategoryPOSTRequest


Card
idDebtorCategoryPOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCategoryPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCategoryPOSTRequest() { Description = "A new category", CategoryNo = 1 };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Category.DebtorCategory Category = client.Post(debtorCategoryPOSTRequest);



Card
idDebtorCategoryPOSTRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { Description = "Another new category", CategoryNo = 1 });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/Categories", "POST", json);
}



Card
idDebtorCategoryPOSTRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/Categories -d '{"Description":"Yet another new category", "CategoryNo":1}'




The response returned from the above request will be a json document representing the category DTO model from the business logic - see the meta data page for the DebtorCategoryPOSTRequest for more detail.


Update a category

Panel
borderStylesolid
titleUpdate an existing category


Deck
idDebtorCategoryPATCHRequest


Card
idDebtorCategoryPATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCategoryPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCategoryPATCHRequest() { CategoryID = "F6DDF94F-D41B-4DE4-8A8C-62BF03C32573", Description = "A modified category" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Category.DebtorCategory Category = client.Patch(debtorCategoryPATCHRequest);



Card
idDebtorCategoryPATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
    webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));               
    webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { Description = "Another modified category" });
    responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/Categories/F6DDF94F-D41B-4DE4-8A8C-62BF03C32573", "PATCH", json);
}



Card
idDebtorCategoryPATCHRequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/Categories/F6DDF94F-D41B-4DE4-8A8C-62BF03C32573 -d '{"Description":"Yet another modified category"}'




The response returned from the above request will be a json document representing the category DTO model from the business logic - see the meta data page for the DebtorCategoryPATCHRequest for more detail.


Delete a category

Panel
borderStylesolid
titleDelete an existing category


Deck
idDebtorCategoryPATCHRequest


Card
idDebtorCategoryPATCHRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorCategoryDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCategoryDELETERequest() { CategoryID = "f4f5433cac3645779398                " };
client.Delete(debtorCategoryDELETERequest);



Card
idDebtorCategoryPATCHRequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    webClient.QueryString.Add("password", "password");
     
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");               
    // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
    var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
    var sessionId = authResponse.SessionId;
 
	webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
	webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
	responsebody = webClient.UploadString("http://localhost/Debtors/Categories/de671c1d5d6241319ffa                /", "DELETE", "");
}



Card
idDebtorCategoryDELETERequest_curl
labelCurl


Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET https://api.jiwa.com.au/auth -d '{"username":"Admin","password":"password"}'

Returns the following authentication response, containing the SessionId which subsequent requests will need to include in the cookie "ss-id"

No Format
{"SessionId":"6w1nLX8r0sIrJHClX9Vj","UserName":"Admin","DisplayName":"","ResponseStatus":{}}

Then, with the SessionId now known, the route can be called:

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X DELETE https://api.jiwa.com.au/Debtors/Categories/31ab4a44fde56099-61ee454b-47294a25-a75ab298-6d438b0044f79870291ecbc8