Versions Compared

Key

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

Table of Contents



Customers

Get a filtered list of customers

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

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 first 5 customers where the AccountNo starts with '1'web enabled customers that have changed within the last day


Deck
idDB_MainQueryv_Jiwa_Debtor_ListQuery_1


Card
idDB_MainQueryv_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 DB_MainQueryRequestitemListRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_MainQueryv_Jiwa_Debtor_ListQuery() { AccountNoStartsWith WebAccess = true, LastSavedDateTimeGreaterThan = "1"DateTime.Now.AddDays(-1), OrderByFields = "AccountNo, Name", TakeInclude = 5"Total" };            
ServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DB_Main> DB_MainQueryResponsev_Jiwa_Debtor_List> itemListResponse = client.Get(DB_MainQueryRequestitemListRequest);



Card
idDB_MainQueryv_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/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5DebtorList?WebAccess=true&LastSavedDateTimeGreaterThan=2017-09-18T00:00:00.000&Fields=AccountNo,Name&Include=Total");
}



Card
idDB_MainQueryv_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/DB_MainDebtorList -d '{"AccountNoStartsWithWebAccess":"1true","LastSavedDateTimeGreaterThan="2017-09-18T00:00:00.000", "OrderByFields":"AccountNo, Name", "TakeInclude":"5Total"}'



Card
idDBv_MainQueryJiwa_1Debtor_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/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5DebtorList?WebAccess=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 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', but limit which fields are returned


Deck
idDB_MainQuery_21


Card
idDB_MainQuery_21_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
idINDB_MainQuery_21_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          
    // Above returns something like this: {"SessionIdthis: {"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_21_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_21_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 first 5 customers where the AccountNo starts with '1', and but limit which fields are returned


Deck
idDB_MainQuery_32


Card
idDB_MainQuery_32_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_32_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
idINDB_MainQuery_32_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_32_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

AnchorReadACustomerReadACustomerIn 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 customerRetrieve next 5 customers where the AccountNo starts with '1', and limit which fields are returned
Panel
borderStylesolid
titleCreate a new customer, and setting the AccountNo, Name, EmailAddress and WebEnabled


Deck
idreadDB_aMainQuery_customer3


Card
idreadDB_aMainQuery_customer3_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 debtorGETRequestDB_MainQueryRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.Tables.DebtorGETRequestDB_MainQuery() { DebtorID= "0000000061000000001V AccountNoStartsWith = "1", OrderBy = "AccountNo", Take = 5, Skip = 5, Fields = "DebtorID,AccountNo,Name,EmailAddress" };
JiwaFinancialsServiceStack.QueryResponse<JiwaFinancials.Jiwa.JiwaServiceModel.DebtorsTables.Debtor DebtorDB_Main> DB_MainQueryResponse = client.Get(debtorGETRequestDB_MainQueryRequest);



Card
idreadIN_aMainQuery_product3_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/0000000061000000001VQueries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Skip=5&Fields=DebtorID,AccountNo,Name,EmailAddress");

}



Card
idreadIN_aMainQuery_product3_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
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/DebtorsQueries/0000000061000000001V?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.

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.

Deck
idcreate_a_customer
create
Card
id



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.

solid
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 debtorPOSTRequestdebtorGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorPOSTRequestDebtorGETRequest() { AccountNo DebtorID= "NewAccountNo0000000061000000001V", Name = "A new customer", EmailAddress = "name@example.com", WebAccess = true };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.PostGet(debtorPOSTRequestdebtorGETRequest);



Card
idcreateread_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));   responsebody  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("= webClient.DownloadString("https://api.jiwa.com.au/Debtors", "POST", json/0000000061000000001V");  
}



Card
idcreateread_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 POSTGET https://api.jiwa.com.au/Debtors -d '{"AccountNo":"NewAccountNo","Name":"A new customer","EmailAddress":"name@example.com", "WebAccess"""true"}'/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 DebtorPOSTRequest DebtorGETRequest for more detail.

Panel
borderStyle

title


Create a new customer

with 2 notes Deckidcreate_a_customer_with_2_notes

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_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 = NewtonsoftwebClient.Json.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
	        AccountNo = "NewAccountNo", Description
    	    Name = "A new customer",
        	EmailAddress = "name@example.com",
WebAccess	 = true, Notes = new List<object>() { new {WebAccess NoteText = "Notetrue
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_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 Customercustomer","EmailAddress ":"name@example.com", "WebAccess"":"true", "Notes":[{"NoteText":"Note text 1"}, {"NoteText":"NoteText 2"}]}'
The response returned from
}'




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

AnchorDebtorPatchRequest

DebtorPatchRequest


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


Deck
idupdatecreate_a_customer_with_2_notes


Card
idupdatecreate_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 debtorPatchRequestdebtorPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorPATCHRequestDebtorPOSTRequest { DebtorID AccountNo = "NewAccountNo", Name = "0000000061000000001VA new customer", EmailAddress = "name2@examplename@example.com", WebAccess = falsetrue };
debtorPatchRequestdebtorPOSTRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteText = "ANote newtext note added1" });
debtorPatchRequestdebtorPOSTRequest.Notes.Add(new JiwaFinancials.Jiwa.JiwaServiceModel.Notes.Note() { NoteID = "DE91CC53-724A-47C6-8920-57AC82BFAD1F", NoteText = "ANote modifiedtext note text2" });
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.Debtor Debtor = client.PatchPost(debtorPatchRequestdebtorPOSTRequest);



Card
idupdatecreate_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 = "name2@examplename@example.com", WebAccess = "false"true, Notes = new List<object>() { new { NoteText = "ANote newtext note added1" }, new { NoteIDNoteText = "DE91CC53-724A-47C6-8920-57AC82BFAD1F", NoteText = "A modified note text" Note text 2" } } });
    	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V", "PATCHPOST", json);
}



Card
idupdatecreate_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 PATCHPOST httphttps://localhostapi.jiwa.com.au/Debtors/0000000061000000001V -d '{EmailAddress = "name2@example"AccountNo":"NewAccountNo","Name":"A new Customer","EmailAddress ":"name@example.com", "WebAccess = "false":"true", "Notes":[{"NoteText":"ANote newtext note added1"}, {"NoteIDNoteText":"DE91CC53-724A-47C6-8920-57AC82BFAD1F","NoteText":"A modified note text 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.

Delete a customer

Update an existing customer

Anchor
DebtorPatchRequest
DebtorPatchRequest

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


Deck
idDebtorDELETERequestupdate_a_customer


DebtorDELETERequest
Card
idDebtorDELETERequestupdate_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 debtorDELETERequestdebtorPatchRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDELETERequestDebtorPATCHRequest { DebtorID = "1c4e1f674674465bb57a" };
client.Delete(debtorDELETERequest);
Card
id
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));               
	responsebody   = webClient.UploadString("http://localhost/Debtors/a256102d4b2c4202b0e8", "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=6w1nLX8r0sIrJHClX9Vj' -X DELETE httpsHeaders[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/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
ServiceStack Client C#
Card
idDebtorCustomFieldsGETManyRequest_csharp_servicestack
label
0000000061000000001V", "PATCH", json);
}



Card
idupdate_a_customer_curl
labelCurl


var client = new ServiceStack.JsonServiceClient("
Code Block
languagec#
bash
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X GET 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/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/auth");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDELETERequest = new  // Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
 
    // Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget packageJiwaFinancials.Jiwa.JiwaServiceModel.DebtorDELETERequest { DebtorID = "31a090bfec174d20adff" };
client.Delete(debtorDELETERequest);



Card
idDebtorDELETERequest_csharp
labelC#


Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate           var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody); 
   var sessionId = authResponse.SessionId;
  webClient.QueryString.Add("username", "Admin");
    webClient.HeadersQueryString.Add(System.Net.HttpRequestHeader.Cookie"password", string.Format("ss-id={0}", sessionId))"password");
     
        
    string responsebody = webClient.DownloadString("https://api.jiwa.com.au/Debtors/CustomFieldsauth"); }
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
              
    // Above returns something like this: {"SessionId":"6w1nLX8r0sIrJHClX9Vj0hKBFAnutUk8Mw6YY6DN","UserName":"Adminapi","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

 
    // 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/87315f0dc5b1443e9b20", "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=78ec7a8d39f042139a23' -X DELETE 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
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

field values for a customer

fields

Panel
borderStylesolid
titleGet all debtor custom field values for a customerfields


Deck
idDebtorCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest


Card
idDebtorCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_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.DebtorCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest() { DebtorID = "0000000061000000001V" };
var debtorCustomFieldsGETManyResponse = client.Get(debtorCustomFieldsGETManyRequest );



Card
idInventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_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/CustomFieldValuesCustomFields");
}



Card
idInventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_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/CustomFieldValuesCustomFields



Card
idInventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_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/CustomFieldValuesCustomFields?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 Custom Field Value DTO model for a custom field - see the meta data page for the DebtorCustomFieldValuesGETManyRequest DebtorCustomFieldsGETManyRequest for more detail.


Get a list of custom field

value

values for a customer

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


Deck
idDebtorCustomFieldValueGETRequestDebtorCustomFieldValuesGETManyRequest


Card
idDebtorCustomFieldValueGETRequestDebtorCustomFieldValuesGETManyRequest_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 debtorCustomFieldValueGETRequestdebtorCustomFieldsGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldValueGETRequestDebtorCustomFieldValuesGETManyRequest() { DebtorID = "0000000061000000001V", SettingID};
=var "53a277cd848541a694d9debtorCustomFieldsGETManyResponse                " };
var debtorCustomFieldValueGETResponse= client.Get(debtorCustomFieldValueGETRequest= client.Get(debtorCustomFieldsGETManyRequest);



Card
idDebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_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
idDebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_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
idDebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_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 a list of the Custom Field Value DTO model - see the meta data page for the DebtorCustomFieldValueGETRequest DebtorCustomFieldValuesGETManyRequest for more detail.

Update


Get a custom field value for a customer

Panel
borderStylesolid
titleUpdate a Get the custom field value for a specific custom field and customer
Panel
borderStylesolid
titleGet all delivery addresses for a customer


Deck
idDebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest


Card
idDebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_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 debtorCustomFieldValuePATCHRequestdebtorCustomFieldValueGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest() { DebtorID = "0000000061000000001V", SettingID = "53a277cd848541a694d9                ", Contents = "True" };
var debtorCustomFieldValuePATCHResponse debtorCustomFieldValueGETResponse= client.PatchGet(debtorCustomFieldValuePATCHRequest debtorCustomFieldValueGETRequest);



Card
idDebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_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.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         DownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/CustomFieldValues/53a277cd848541a694d9                /", "PATCH", json);
}



Card
idDebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_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 Note that there are trailing spaces as part 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 PATCHGET 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

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

Deck
idDebtorDeliveryAddressesGETManyRequest
Card
idDebtorDeliveryAddressesGETManyRequest_csharp_servicestack
labelServiceStack Client C#
Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("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");
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
label
/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#
using (var webClientclient = new System.Net.WebClient())
{
    // Authenticate               
    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.DownloadStringUploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses");
}/CustomFieldValues/53a277cd848541a694d9                /", "PATCH", json);
}



Card
idDebtorDeliveryAddressesGETManyRequestDebtorCustomFieldValuePATCHRequest_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 GETPATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/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.


Contact Names

Whilst 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 contact names

Panel
borderStylesolid
titleGet all contact names for a customer


Deck
idDebtorContactNamesGETManyRequest


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

Card
idDebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_csharp_webbrowserservicestack
labelWeb Browser
No Format
ServiceStack Client C#
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#
var client = new ServiceStack.JsonServiceClient("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

Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // Authenticate               
    ");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorContactNamesGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorContactNamesGETManyRequest { DebtorID = "0000000061000000001V" };
List<JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorContactName> debtorContactNames = client.Get(debtorContactNamesGETManyRequest);



Card
idDebtorContactNamesGETManyRequest_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/00000000LR000000003OContactNames");
}



Card
idDebtorDeliveryAddressGETRequestDebtorContactNamesGETManyRequest_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/00000000LR000000003OContactNames



Card
idDebtorDeliveryAddressGETRequestDebtorContactNamesGETManyRequest_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/00000000LR000000003OContactNames?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 list of the debtor contact names DTO model from the business logic - see the meta data page for the DebtorDeliveryAddressGETRequest DebtorContactNamesGETManyRequest for more detail.

Add a new delivery address


Get a single contact name for a customer

Panel
borderStylesolid
titleAdd a new delivery address to a customerGet a debtor contact name
Panel
borderStylesolid
titleUpdates an existing delivery address for a customer


Deck
idDebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest


Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_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 debtorDeliveryAddressPOSTRequestdebtorContactNameGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest { DebtorID = "0000000061000000001V", Address1ContactNameID = "000000002D000000001C"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);
 };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorContactName debtorContactName = client.Get(debtorContactNameGETRequest);



Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_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", Address1= "Unit 1A", Address2 = "57 Smith Street", Address3 = "Blakeville", Address4 = "NSW", Postcode= "2126", IsDefault = true, Country = "Australia" });
	responsebody = webClient.UploadStringDownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses", "POST", json/ContactNames/000000002D000000001C");
 
}



Card
idDebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_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 POSTGET https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses -d '{"DebtorID":"0000000061000000001V", "Address1":"Unit 1A", "Address2":"57 Smith Street", "Address3":"Blakeville", "Address4":"NSW", "Postcode":"2126", "IsDefault":"true", "Country":"Australia" }'

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 DebtorDeliveryAddressPOSTRequest for more detail.

Update an existing customer delivery address

Deck
idDebtorDeliveryAddressPATCHRequest
ContactNames/000000002D000000001C



var client = new ServiceStack.JsonServiceClient("https://
Card
idInventoryDebtorSpecificPricePATCHRequestDebtorContactNameGETRequest_csharp_servicestackwebbrowser
labelServiceStack Client C#
Code Block
languagec#
Web Browser

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

No Format
https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorDeliveryAddressPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressPATCHRequest { DebtorID = "0000000061000000001V", DeliveryAddressID = "00000000LR000000003N", Country = "Australia" };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Patch(debtorDeliveryAddressPATCHRequest);
Card
idInventoryDebtorSpecificPricePATCHRequest_csharp
label
/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/ContactNames/000000002D000000001C?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 contact name DTO model from the business logic - see the meta data page for the DebtorContactNameGETRequest for more detail.


Add a new contact name for a customer

Panel
borderStylesolid
titleAdd a new contact name to a customer


Deck
idDebtorContactNamePOSTRequest


Card
idDebtorContactNamePOSTRequest_csharp_servicestack
labelServiceStack Client C#


Code Block
languagec#
using (var webClientclient = new System.Net.WebClient())
{
    // Authenticate               
    webClient.QueryString.Add("username", "Admin");
    ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

var debtorContactNamePOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorContactNamePOSTRequest { DebtorID= "0000000061000000001V", Title = "Mr.", FirstName = "Fred", Surname = "Bloggs", PrimaryPositionName = "External Accountant", EmailAddress = "Fred@example.com"};
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorContactName debtorContactName = client.Post(debtorContactNamePOSTRequest);



Card
idDebtorContactNamePOSTRequest_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 { Country DebtorID = "0000000061000000001V", Title = "Mr.", FirstName = "Fred", Surname = "Bloggs", PrimaryPositionName = "External Accountant", EmailAddress = "AustraliaFred@example.com" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003NContactNames", "PATCHPOST", json);  
}



Card
idInventoryDebtorSpecificPricePATCHRequestDebtorContactNamePOSTRequest_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 PATCHPOST https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003NContactNames -d '{"Country":"Australia"DebtorID":"0000000061000000001V", "Title":"Mr.", "FirstName":"Fred", "Surname":"Bloggs", "PrimaryPositionName":"External Accountant", "EmailAddress":"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 DebtorDeliveryAddressPATCHRequest DebtorContactNamePOSTRequest for more detail.

Delete a customer delivery address

Update an existing customer contact name

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


Deck
idDebtorDeliveryAddressDELETERequestDebtorContactNamePATCHRequest


Card
idDebtorDeliveryAddressDELETERequestDebtorContactNamePATCHRequest_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 debtorDeliveryAddressDELETERequestdebtorContactNamePATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDeliveryAddressDELETERequestDebtorContactNamePATCHRequest { DebtorID = "0000000061000000001V", DeliveryAddressIDContactNameID = "00000000LR000000003O00000000NX00000000AW", DefaultContact = true };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorContactName debtorContactName = client.DeletePatch(debtorDeliveryAddressDELETERequestdebtorContactNamePATCHRequest);



Card
idInventoryDebtorSpecificPriceDELETERequestDebtorContactNamePATCHRequest_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 { DefaultContact = true });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddressesContactNames/00000000LR000000003O00000000NX00000000AW", "DELETEPATCH", ""json);
}



Card
idInventoryDebtorSpecificPriceDELETERequestDebtorContactNamePATCHRequest_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 DELETEPATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/DeliveryAddresses/00000000LR000000003O

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.
ContactNames/00000000NX00000000AW -d '{"DefaultContact":true}'




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

Delete a customer contact name

Panel
borderStylesolid
titleGet all notes Deletes an existing contact name for a customer


Deck
idDebtorNotesGETManyRequestDebtorContactNameDELETERequest


Card
idInventoryNotesGETManyRequestDebtorContactNameDELETERequest_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 debtorContactNameDELETERequest debtorNotesGETManyRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotesGETManyRequest()DebtorContactNameDELETERequest { DebtorID = "0000000061000000001V", };ContactNameID var= debtorNotesGETManyResponse ="00000000NX00000000AX" };
client.GetDelete(debtorNotesGETManyRequestdebtorContactNameDELETERequest);



Card
idDebtorNotesGETManyRequestDebtorContactNameDELETERequest_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.DownloadStringUploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/ContactNames/00000000NX00000000AX", "DELETE", "");
}



Card
idDebtorNotesGETManyRequestDebtorContactNameDELETERequest_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 GETDELETE https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes
Card
idDebtorNotesGETManyRequest_webbrowser
labelWeb Browser

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

No Format
ContactNames/00000000NX00000000AX






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 group memberships for a customer


Deck
idDebtorGroupMembershipsGETManyRequest


Card
idDebtorGroupMembershipsGETManyRequest_csharp_servicestack
labelServiceStack Client C#
Panel
borderStylesolid
titleGet a specific note
Deck
idDebtorNotesGETRequest
ServiceStack Client
Card
idDebtorNotesGETRequest_csharp_servicestack
label


Code Block
languagec#
var client = new ServiceStack.JsonServiceClient("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?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 DTO model from the business logic - see the meta data page for the DebtorNotesGETManyRequest for more detail.

Get a specific note for a customer

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

");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });

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



Card
idDebtorGroupMembershipsGETManyRequest_csharp
labelC#


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

var debtorNoteGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteGETRequest() { DebtorID = "0000000061000000001V", NoteID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3" };
var debtorNoteGETResponse= client.Get(debtorNoteGETRequest);
Card
idDebtorNotesGETRequest_csharp
labelC#
Code Block
languagec#
using (var webClient = new System.Net.WebClient())
{
    // 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");
}



Card
idDebtorNotesGETRequestDebtorGroupMembershipsGETManyRequest_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-9CF68C9BCBE3GroupMemberships



Card
idInventoryNotesGETRequestDebtorGroupMembershipsGETManyRequest_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?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 DebtorNoteGETRequest DebtorGroupMembershipsGETManyRequest for more detail.

Add a new note


Get a single group membership for a customer

Panel
borderStylesolid
titleAdd a new note to a customerGet a debtor group membership


Deck
idDebtorNotePOSTRequestDebtorGroupMembershipGETRequest


Card
idInventoryNotePOSTRequestDebtorGroupMembershipGETRequest_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 debtorNotePOSTRequestdebtorGroupMembershipGETRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePOSTRequest()DebtorGroupMembershipGETRequest { DebtorID = "0000000061000000001V", NoteTextGroupMembershipID = "This is a new note000000002D000000000U" };
var debtorNotePOSTResponseJiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.PostGet(debtorNotePOSTRequestdebtorGroupMembershipGETRequest);



Card
idDebtorNotePOSTRequestDebtorGroupMembershipGETRequest_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.UploadStringDownloadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/GroupMemberships/Notes", "POST", json000000002D000000000U");
}



Card
idDebtorNotePOSTRequestDebtorGroupMembershipGETRequest_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 GET https://api.jiwa.com.au/Debtors/0000000061000000001V/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/Debtors/0000000061000000001V/Notes -d '{"NoteText":"This is a new note"/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/GroupMemberships/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 group membership DTO model from the business logic - see the meta data page for the DebtorGroupMembershipGETRequest for more detail.


Add a new group membership for a customer

Panel
borderStylesolid
titleAdd a new group membership to a customer


Deck
idDebtorGroupMembershipPOSTRequest


Card
idDebtorGroupMembershipPOSTRequest_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 debtorGroupMembershipPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorGroupMembershipPOSTRequest { DebtorID= "0000000061000000001V", GroupDescription = "Cash Only", StaffUsername = "Admin"};
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.Post(debtorGroupMembershipPOSTRequest);



Card
idDebtorGroupMembershipPOSTRequest_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", GroupDescription = "Default - No Group", StaffUsername = "Admin" });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/GroupMemberships", "POST", json);  
}



Card
idDebtorGroupMembershipPOSTRequest_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/GroupMemberships -d '{"DebtorID":"0000000061000000001V", "GroupDescription":"Statement - Fax", "StaffUsername":"Admin"}'




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

Update an existing customer group membership

Panel
borderStylesolid
titleUpdates an existing group membership for a customer


Deck
idDebtorGroupMembershipPATCHRequest


Card
idDebtorGroupMembershipPATCHRequest_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 debtorGroupMembershipPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorGroupMembershipPATCHRequest { DebtorID = "0000000061000000001V", GroupMembershipID = "000000002D000000000U", IsDefault = true };
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorGroupMembership debtorGroupMembership = client.Patch(debtorGroupMembershipPATCHRequest);



Card
idDebtorGroupMembershipPATCHRequest_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 { IsDefault = true });
	responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/GroupMemberships/000000002D000000000V", "PATCH", json);
}



Card
idDebtorGroupMembershipPATCHRequest_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/GroupMemberships/000000002D000000000T -d '{"IsDefault":true}'




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

Delete a customer group membership

Panel
borderStylesolid
titleDeletes an existing group membership for a customer


Deck
idDebtorGroupMembershipDELETERequest


Card
idDebtorGroupMembershipDELETERequest_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 debtorGroupMembershipDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorGroupMembershipDELETERequest { DebtorID = "0000000061000000001V", GroupMembershipID = "000000002D000000000U" };
client.Delete(debtorGroupMembershipDELETERequest);



Card
idDebtorGroupMembershipDELETERequest_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/GroupMemberships/000000002D000000000V", "DELETE", "");
}



Card
idDebtorGroupMembershipDELETERequest_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/GroupMemberships/000000002D000000000T




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.

Panel
borderStylesolid
titleGet all notes for a customer


Deck
idDebtorNotesGETManyRequest


Card
idInventoryNotesGETManyRequest_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 debtorNotesGETManyRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotesGETManyRequest() { DebtorID = "0000000061000000001V" };
var debtorNotesGETManyResponse = client.Get(debtorNotesGETManyRequest);



Card
idDebtorNotesGETManyRequest_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");
}



Card
idDebtorNotesGETManyRequest_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



Card
idDebtorNotesGETManyRequest_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?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 DTO model from the business logic - see the meta data page for the DebtorNotesGETManyRequest for more detail.

Get a specific note for a customer

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

Panel
borderStylesolid
titleGet a specific note


Deck
idDebtorNotesGETRequest


Card
idDebtorNotesGETRequest_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 debtorNoteGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteGETRequest() { DebtorID = "0000000061000000001V", NoteID = "80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3" };
var debtorNoteGETResponse= client.Get(debtorNoteGETRequest);



Card
idDebtorNotesGETRequest_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-9CF68C9BCBE3");
}



Card
idDebtorNotesGETRequest_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
idInventoryNotesGETRequest_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-9CF68C9BCBE3?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 DTO model from the business logic - see the meta data page for the DebtorNoteGETRequest for more detail.


Add a new note

Panel
borderStylesolid
titleAdd a new note to a customer


Deck
idDebtorNotePOSTRequest


Card
idInventoryNotePOSTRequest_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 debtorNotePOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePOSTRequest() { DebtorID = "0000000061000000001V", NoteText = "This is a new note" };
var debtorNotePOSTResponse = 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+goO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aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/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/gDALULDN8PAD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gEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/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/P9cmJu9MTDImI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B/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw=="}'




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


Update an existing

note

document

Panel
borderStylesolid
titleUpdate an existing notedocument


Deck
idDebtorNotePATCHRequestDebtorDocumentPATCHRequest


Card
idDebtorNotePATCHRequestDebtorDocumentPATCHRequest_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 debtorNotePATCHRequestdebtorDocumentPATCHRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNotePATCHRequestDebtorDocumentPATCHRequest() { DebtorID = "0000000061000000001V", NoteIDDocumentID = "80C3C46B2b8532cb-2ef7-9D644239-4451-BE6B-9CF68C9BCBE3", NoteText = "This is an updated note" 8058-ffeca34baa9a", FileBinary = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6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o+svLy6OxcaZrmYRjCc3NLRp1rLVYIhHbksd8wwXr1683X2++erWZtbW1ufkGdJaSksKB3bv3VFZWIYOkpBPzDReuWL7y/PnzOEBtQIGuUqljY2OJWAednJzc1tamVqlnzZxjaGBYWFjIeYRRVlrmtW07rQ8JgFK6vr5+tUrztdk3c+cY8FSpVOwMDg4uLy8HByNRNzd3YQTqoJEhsy3h2PHPxk+e8OmkaVNnTJ86Y9EiI2KfO9tg2dJlCxcYGRktNjYynjfH0NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") };
var debtorNotePOSTResponsedebtorDocumentPATCHResponse = client.Patch(debtorNotePATCHRequestdebtorDocumentPATCHRequest);



Card
idInventoryNotePATCHRequestDebtorDocumentPATCHRequest_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 { NoteTextFileBinary = "This is an updated note" }Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5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JgFK6vr5+tUrztdk3c+cY8FSpVOwMDg4uLy8HByNRNzd3YQTqoJEhsy3h2PHPxk+e8OmkaVNnTJ86Y9EiI2KfO9tg2dJlCxcYGRktNjYynjfH0NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/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/NotesDocuments/80C3C46B2b8532cb-9D642ef7-44514239-BE6B8058-9CF68C9BCBE3ffeca34baa9a", "PATCH", json);   
  
}



Card
idInventoryNotePATCHRequestDebtorDocumentPATCHRequest_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 notecurl -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 '{"FileBinary":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcxG9/3t79+7d27dv37x58/r161evXv02Yr+P2LNnz548eaLVah89etTV1cUe/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz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8HByNRNzd3YQTqoJEhsy3h2PHPxk+e8OmkaVNnTJ86Y9EiI2KfO9tg2dJlCxcYGRktNjYynjfH0NBgofFCk7KycjxBrpmZWWpqKmoBZ2ho2NnRhbGlcyJAC5LKyvp5xXLT8eMmTZwwhT/cCM/JE6dNHD+Vp8zbp6CgsK2tnWZDqYQWeSAqOjpamDYY1fPx8RkVqw76xIkTVOnmzZvr1n0nk/msW7sueMdOsZXkQESUifGStLS0ivIKsVgMM2zmJLfPuXNZaODIkSOjuOjVXmpPiMJPTM810wPiuWK4ljw9txUVFeOffAMDgxAPn7y2eSOsjo7O4qLirc6uNjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+fkFvr5yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/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 note document DTO model from the business logic - see the meta data page for the DebtorNotePATCHRequest DebtorDocumentPATCHRequest for more detail.


Delete a

note

document for a customer

Panel
borderStylesolid
titleDelete a specific notedocument


Deck
idDeleteNoteDELETERequestDebtorDocumentDELETERequest


Card
idInventoryNoteDELETERequestDebtorDocumentDELETERequest_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 debtorNoteDELETERequestdebtorDocumentDELETERequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorNoteDELETERequestDebtorDocumentDELETERequest() { DebtorID= "0000000061000000001V", NoteIDDocumentID = "80C3C46B2b8532cb-9D642ef7-44514239-BE6B8058-9CF68C9BCBE3ffeca34baa9a" };
var
client.Delete(debtorNoteDELETERequestdebtorDocumentDELETERequest);



Card
idDebtorNoteDELETERequestDebtorDocumentDELETERequest_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/NotesDocuments/80C3C46B9fce8180-9D644509-445143ef-BE6B8e09-9CF68C9BCBE3b63122d58dd8", "DELETE", "");
}



Card
idDeleteNoteDELETERequestDebtorDocumentDELETERequest_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/NotesDocuments/80C3C46Beab07f7a-9D64c406-445147fc-BE6Bbdff-9CF68C9BCBE3c5ae70cc91a5

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.





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 documents delivery addresses for a customer


Deck
idInventoryDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest


Card
idDebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_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 debtorDocumentsGETManyRequestdebtorDeliveryAddressesGETManyRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentsGETManyRequest()DebtorDeliveryAddressesGETManyRequest { DebtorID = "0000000061000000001V" };
var debtorDocumentsGETManyResponseList<JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress> debtorDeliveryAddresses = client.Get(debtorDocumentsGETManyRequestdebtorDeliveryAddressesGETManyRequest);



Card
idDebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_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/DocumentsDeliveryAddresses");
}



Card
idDebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_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/DocumentsDeliveryAddresses



Card
idDebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_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/DocumentsDeliveryAddresses?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 delivery address DTO model from the business logic - see the meta data page for the DocumentDocumentsGETManyRequest DebtorDeliveryAddressesGETManyRequest for more detail.


Get a

specific document

single delivery address for a customer

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

Panel
borderStylesolid
titleGet a specific documentdebtor delivery address


Deck
idDebtorDocumentGETRequestDebtorDeliveryAddressGETRequest


Card
idDebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_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 debtorDocumentGETRequest= new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentGETRequest()DebtorDeliveryAddressGETRequest { DebtorID = "0000000061000000001V", DocumentIDDeliveryAddressID = "45ff4e14-23c5-4744-a8d2-0905e8a2723b00000000LR000000003O" };
var debtorDocumentGETResponse
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Get(debtorDocumentGETRequestdebtorDeliveryAddressGETRequest);



Card
idDebtorDocumentGETRequestDebtorDeliveryAdddressGETRequest_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/45ff4e14-23c5-4744-a8d2-0905e8a2723bDeliveryAddresses/00000000LR000000003O");
}



Card
idDebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_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/45ff4e14-23c5-4744-a8d2-0905e8a2723bDeliveryAddresses/00000000LR000000003O



Card
idDebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_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/45ff4e14-23c5-4744-a8d2-0905e8a2723bDeliveryAddresses/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 document delivery address DTO model from the business logic - see the meta data page for the DebtorDocumentGETRequest DebtorDeliveryAddressGETRequest for more detail.


Add a new

document

delivery address for a customer

Panel
borderStylesolid
titleAdd a new document delivery address to a customer


Deck
idDebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest


Card
idDebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_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 debtorDocumentPOSTRequestdebtorDeliveryAddressPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPOSTRequest()DebtorDeliveryAddressPOSTRequest { DebtorID = "0000000061000000001V", Description Address1= "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f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3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") };
var debtorDocumentPOSTResponseUnit 1A", Address2 = "57 Smith Street", Address3 = "Blakeville", Address4 = "NSW", Postcode= "2126", IsDefault = true, Country = "Australia"};
JiwaFinancials.Jiwa.JiwaServiceModel.Debtors.DebtorDeliveryAddress debtorDeliveryAddress = client.Post(debtorDocumentPOSTRequestdebtorDeliveryAddressPOSTRequest);



Card
idDebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_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", Phys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xyTYDVogV+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/Documents -d '{"Description":"A new documentDeliveryAddresses -d '{"DebtorID":"0000000061000000001V", "Address1":"Unit 1A", "Address2":"57 Smith Street", "Address3":"Blakeville", "Address4":"NSW", "PhysicalFileNamePostcode":"Test.png2126", "FileBinaryIsDefault": "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///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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sVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==""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+DgIF6fPn0Kv8XFxXV119LTf2poaGi82Tg8PEz4wcE7iUkAxHTQvA0LC+vr62NNcRobGwU4EiTSkW06q6qqGhoa4j1ALF68eNHS0lJZWUlthGCvXbsWGhoKmrBfB80mf39/drMeGBjg5MuXL3nyk8CFkDFeEq9SqXRycrKzs1MEKXDMfnIVNrBwcHCEd+GnCAiNJjYhIeHXEcONl9d2U1PTJSZLFIod2m6tAE0sOTk5YrH1lStX3N08Phk34bMJkxcvNsnMzESIeGUbx0tKStauXdvb+1gHnZFxNioqisqQ18OHDyF0z569q78ymzVr9rQp002Mv5B5yziJyzVrvk1IOG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NjZ2aJlGQ6mQiRy51Wg9AVQwPSHCzUaO+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+vr62NNcRobGwU4EiTSkW06q6qqGhoa4j1ALF68eNHS0lJZWUlthGCvXbsWGhoKmrBfB80mf39/drMeGBjg5MuXL3nyk8CFkDFeEq9SqXRycrKzs1MEKXDMfnIVNrBwcHCEd+GnCAiNJjYhIeHXEcONl9d2U1PTJSZLFIod2m6tAE0sOTk5YrH1lStX3N08Phk34bMJkxcvNsnMzESIeGUbx0tKStauXdvb+1gHnZFxNioqisqQ18OHDyF0z569q78ymzVr9rQp002Mv5B5yziJyzVrvk1IOG5hYUHIEREHdu4M2WBuQekoADUnIVJsbW1NT08nuP7+flF8fHxm5rni4hL0hABoChwS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AA/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":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBha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Nze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg== '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/14d91d3736094966805ede671c1d5d6241319ffa                /", "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/F6DDF94Ffde56099-D41B454b-4DE44a25-8A8Cb298-62BF03C32573 9870291ecbc8