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 |
---|
borderStyle | solid |
---|
title | Retrieve first 5 customers where the AccountNo starts with '1'web enabled customers that have changed within the last day |
---|
|
Deck |
---|
id | DB_MainQueryv_Jiwa_Debtor_ListQuery_1 |
---|
|
Card |
---|
id | DB_MainQueryv_Jiwa_Inventory_Item_ListQuery_1_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DB_MainQueryv_Jiwa_Debtor_ListQuery_1_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DB_MainQueryv_Jiwa_Debtor_ListQuery_1_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
| 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 |
---|
id | DBv_MainQueryJiwa_1Debtor_ListQuery_1_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Retrieve first 5 customers where the AccountNo starts with '1', but limit which fields are returned |
---|
|
Deck |
---|
|
Card |
---|
id | DB_MainQuery_21_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | INDB_MainQuery_21_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DB_MainQuery_21_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DB_MainQuery_21_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Retrieve next first 5 customers where the AccountNo starts with '1', and but limit which fields are returned |
---|
|
Deck |
---|
|
Card |
---|
id | DB_MainQuery_32_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | IN_MainQuery_32_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | INDB_MainQuery_32_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DB_MainQuery_32_webbrowser |
---|
label | Web Browser |
---|
| Navigate to the auth URL and provide the username and password as parameters: No Format |
---|
https://api.jiwa.com.au/auth?username=admin&password=password |
This authenticates the user and creates a cookie, so a subsequent request can be made: No Format |
---|
https://api.jiwa.com.au/Queries/DB_Main?AccountNoStartsWith=1&OrderBy=AccountNo&Take=5&Skip=5&Fields=DebtorID,AccountNo,Name,EmailAddress&format=json |
Note the &format=json in the above URL this overrides the content type returned. For browsers the default content type is HTML - if a content type override is omitted, then a HTML razor view of the data will be returned instead of json. xml and csv are also valid overrides for the content type to be returned. |
|
|
Read a customer
Anchor |
---|
ReadACustomer | ReadACustomer | In order to read a customer, the DebtorID must be provided Note this is a full read of the debtor business logic - so it will include associated elements such as notes, documents, prices and so on.
Panel |
---|
borderStyle | solid |
---|
title | Read a customerRetrieve next 5 customers where the AccountNo starts with '1', and limit which fields are returned |
---|
|
Panel |
---|
borderStyle | solid |
---|
title | Create a new customer, and setting the AccountNo, Name, EmailAddress and WebEnabled |
---|
|
Deck |
---|
id | readDB_aMainQuery_customer3 |
---|
|
Card |
---|
id | readDB_aMainQuery_customer3_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | readIN_aMainQuery_product3_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | readIN_aMainQuery_product3_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V |
| Card |
---|
id | read_a_product_webbrowser |
---|
label | Web Browser |
---|
| Navigate to the auth Queries/DB_Main -d '{"AccountNoStartsWith":"1","OrderBy":"AccountNo","Take":"5","Skip":"5","Fields":"DebtorID,AccountNo,Name,EmailAddress"}' |
|
Card |
---|
id | DB_MainQuery_3_webbrowser |
---|
label | Web 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.
Read a customer
Anchor |
---|
| ReadACustomer |
---|
| ReadACustomer |
---|
|
In order to read a customer, the DebtorID must be provided. Note this is a full read of the debtor business logic - so it will include associated elements such as notes, documents, prices and so on.
Panel |
---|
borderStyle | solid |
---|
title | Read a customer |
---|
|
Deck |
---|
|
Card |
---|
id | read_a_customer_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | createread_a_product_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | createread_a_product_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | read_a_product_webbrowser |
---|
label | Web 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 | solid | title |
---|
Create a new customer
with 2 notes Deck |
---|
id | create_a_customer_with_2_notesYou 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 |
---|
borderStyle | solid |
---|
title | Create a new customer, and setting the AccountNo, Name, EmailAddress and WebEnabled |
---|
|
Deck |
---|
|
Card |
---|
id | create_a_customer_with_2_notes_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | create_a_product_with_2_notes_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | create_a_customer_with_2_notes_product_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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
Anchor |
DebtorPatchRequestDebtorPatchRequest |
Panel |
---|
borderStyle | solid |
---|
title | Update EmailAddress and WebAccess of a customer, add an additional note and update an existing noteCreate a customer with 2 notes |
---|
|
Deck |
---|
id | updatecreate_a_customer_with_2_notes |
---|
|
Card |
---|
id | updatecreate_a_customer_with_2_notes_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | updatecreate_a_product_with_2_notes_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | updatecreate_a_customer_with_2_notes_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 customerUpdate an existing customer
Anchor |
---|
| DebtorPatchRequest |
---|
| DebtorPatchRequest |
---|
|
Panel |
---|
borderStyle | solid |
---|
title | Delete Update EmailAddress and WebAccess of a customer, add an additional note and update an existing note |
---|
|
Deck |
---|
id | DebtorDELETERequestupdate_a_customer |
---|
|
Card |
---|
id | DebtorDELETERequestupdate_a_customer_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 | DebtorDELETERequest0000000061000000001V", 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 |
---|
id | update_a_product_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDELETERequest_curl |
---|
label | Curl |
---|
| Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Get all debtor custom fields |
---|
|
Deck |
---|
id | DebtorCustomFieldsGETManyRequest |
---|
| Card |
---|
|
id | DebtorCustomFieldsGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C#0000000061000000001V", "PATCH", json);
} |
|
Card |
---|
id | update_a_customer_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| var client = new ServiceStack.JsonServiceClient(" | 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 |
---|
id | DebtorCustomFieldsGETManyRequest_csharp |
---|
label | C# |
---|
| Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Delete a customer |
---|
|
Deck |
---|
|
Card |
---|
id | DebtorDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldsGETManyRequest_curl |
---|
label | Curl |
---|
| Code Block |
---|
| 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 |
---|
| curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/CustomFields |
| Card |
---|
id | DebtorCustomFieldsGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
id | DebtorDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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
|
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 customerfields
Panel |
---|
borderStyle | solid |
---|
title | Get all debtor custom field values for a customerfields |
---|
|
Deck |
---|
id | DebtorCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest |
---|
|
Card |
---|
id | DebtorCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | InventoryCustomFieldValuesGETManyRequestDebtorCustomFieldsGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Get the all custom field value values for a specific custom field and customer |
---|
|
Deck |
---|
id | DebtorCustomFieldValueGETRequestDebtorCustomFieldValuesGETManyRequest |
---|
|
Card |
---|
id | DebtorCustomFieldValueGETRequestDebtorCustomFieldValuesGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorCustomFieldValueGETRequestInventoryCustomFieldValuesGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Update a Get the custom field value for a specific custom field and customer |
---|
|
Panel |
---|
borderStyle | solid |
---|
title | Get all delivery addresses for a customer |
---|
|
Deck |
---|
id | DebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest |
---|
|
Card |
---|
id | DebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldValuePATCHRequestDebtorCustomFieldValueGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDeliveryAddressesGETManyRequest |
---|
| Card |
---|
id | DebtorDeliveryAddressesGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
| Code Block |
---|
| var client = new ServiceStack.JsonServiceClient("53a277cd848541a694d9 |
|
Card |
---|
id | DebtorCustomFieldValueGETRequest_webbrowser |
---|
label | Web 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 |
---|
|
id | DebtorDeliveryAddressesGETManyRequest_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 |
---|
borderStyle | solid |
---|
title | Update a custom field value for a customer |
---|
|
Deck |
---|
id | DebtorCustomFieldValuePATCHRequest |
---|
|
Card |
---|
id | DebtorCustomFieldValuePATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorCustomFieldValuePATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDeliveryAddressesGETManyRequestDebtorCustomFieldValuePATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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. |
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.
Panel |
---|
borderStyle | solid |
---|
title | Get all contact names for a customer |
---|
|
Deck |
---|
id | DebtorContactNamesGETManyRequest |
---|
|
Card |
---|
id | DebtorDeliveryAddressesGETManyRequestDebtorContactNamesGETManyRequest_csharp_webbrowserservicestack |
---|
label | Web Browser |
---|
| Navigate to the auth URL and provide the username and password as parameters: No Format |
---|
|
|
|
Panel |
---|
borderStyle | solid |
---|
title | Get a debtor delivery address |
---|
|
Deck |
---|
id | DebtorDeliveryAddressGETRequest |
---|
| Card |
---|
id | DebtorDeliveryAddressGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
| Code Block |
---|
| 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 |
---|
id | DebtorDeliveryAdddressGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorContactNamesGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDeliveryAddressGETRequestDebtorContactNamesGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDeliveryAddressGETRequestDebtorContactNamesGETManyRequest_webbrowser |
---|
label | Web 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
Panel |
---|
borderStyle | solid |
---|
title | Add a new delivery address to a customerGet a debtor contact name |
---|
|
Panel |
---|
borderStyle | solid |
---|
title | Updates an existing delivery address for a customer |
---|
|
Deck |
---|
id | DebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest |
---|
|
Card |
---|
id | DebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDeliveryAddressPOSTRequestDebtorContactNameGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDeliveryAddressPATCHRequest |
---|
| ContactNames/000000002D000000001C |
|
Card |
---|
id | InventoryDebtorSpecificPricePATCHRequestDebtorContactNameGETRequest_csharp_servicestackwebbrowser |
---|
label | ServiceStack Client C# |
---|
| Code Block |
---|
| var client = new ServiceStack.JsonServiceClient("https:// | 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 |
---|
|
id | InventoryDebtorSpecificPricePATCHRequest_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. |
Panel |
---|
borderStyle | solid |
---|
title | Add a new contact name to a customer |
---|
|
Deck |
---|
id | DebtorContactNamePOSTRequest |
---|
|
Card |
---|
id | DebtorContactNamePOSTRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorContactNamePOSTRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryDebtorSpecificPricePATCHRequestDebtorContactNamePOSTRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 Panel |
---|
borderStyle | solid |
---|
title | Deletes Updates an existing delivery address contact name for a customer |
---|
|
Deck |
---|
id | DebtorDeliveryAddressDELETERequestDebtorContactNamePATCHRequest |
---|
|
Card |
---|
id | DebtorDeliveryAddressDELETERequestDebtorContactNamePATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryDebtorSpecificPriceDELETERequestDebtorContactNamePATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryDebtorSpecificPriceDELETERequestDebtorContactNamePATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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. |
Panel |
---|
borderStyle | solid |
---|
title | Get all notes Deletes an existing contact name for a customer |
---|
|
Deck |
---|
id | DebtorNotesGETManyRequestDebtorContactNameDELETERequest |
---|
|
Card |
---|
id | InventoryNotesGETManyRequestDebtorContactNameDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETManyRequestDebtorContactNameDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETManyRequestDebtorContactNameDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorNotesGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Get all group memberships for a customer |
---|
|
Deck |
---|
id | DebtorGroupMembershipsGETManyRequest |
---|
|
Card |
---|
id | DebtorGroupMembershipsGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
|
|
Panel |
---|
borderStyle | solid |
---|
title | Get a specific note |
---|
|
Deck |
---|
| Card |
---|
|
id | DebtorNotesGETRequest_csharp_servicestack |
---|
label | ServiceStack Client
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipsGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETRequest_csharp |
---|
label | C# |
---|
| Code Block |
---|
| 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 |
---|
id | DebtorNotesGETRequestDebtorGroupMembershipsGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | InventoryNotesGETRequestDebtorGroupMembershipsGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Add a new note to a customerGet a debtor group membership |
---|
|
Deck |
---|
id | DebtorNotePOSTRequestDebtorGroupMembershipGETRequest |
---|
|
Card |
---|
id | InventoryNotePOSTRequestDebtorGroupMembershipGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotePOSTRequestDebtorGroupMembershipGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotePOSTRequestDebtorGroupMembershipGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorGroupMembershipGETRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Add a new group membership to a customer |
---|
|
Deck |
---|
id | DebtorGroupMembershipPOSTRequest |
---|
|
Card |
---|
id | DebtorGroupMembershipPOSTRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipPOSTRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipPOSTRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Updates an existing group membership for a customer |
---|
|
Deck |
---|
id | DebtorGroupMembershipPATCHRequest |
---|
|
Card |
---|
id | DebtorGroupMembershipPATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipPATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipPATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Deletes an existing group membership for a customer |
---|
|
Deck |
---|
id | DebtorGroupMembershipDELETERequest |
---|
|
Card |
---|
id | DebtorGroupMembershipDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorGroupMembershipDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Get all notes for a customer |
---|
|
Deck |
---|
id | DebtorNotesGETManyRequest |
---|
|
Card |
---|
id | InventoryNotesGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorNotesGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Get a specific note |
---|
|
Deck |
---|
|
Card |
---|
id | DebtorNotesGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotesGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X GET https://api.jiwa.com.au/Debtors/0000000061000000001V/Notes/80C3C46B-9D64-4451-BE6B-9CF68C9BCBE3 |
|
Card |
---|
id | InventoryNotesGETRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Add a new note to a customer |
---|
|
Deck |
---|
|
Card |
---|
id | InventoryNotePOSTRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotePOSTRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNotePOSTRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Update an existing note |
---|
|
Deck |
---|
|
Card |
---|
id | DebtorNotePATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryNotePATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | InventoryNotePATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Delete a specific note |
---|
|
Deck |
---|
id | DeleteNoteDELETERequest |
---|
|
Card |
---|
id | InventoryNoteDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNoteDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DeleteNoteDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Get all documents for a customer |
---|
|
Deck |
---|
id | InventoryDocumentsGETManyRequest |
---|
|
Card |
---|
id | DebtorDocumentsGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Get a specific document |
---|
|
Deck |
---|
id | DebtorDocumentGETRequest |
---|
|
Card |
---|
id | DebtorDocumentGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDocumentGETRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Add a new document to a customer |
---|
|
Deck |
---|
id | DebtorDocumentPOSTRequest |
---|
|
Card |
---|
id | DebtorDocumentPOSTRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| var client = new ServiceStack.JsonServiceClient("https://api.jiwa.com.au");
var authResponse = client.Get(new ServiceStack.Authenticate() { UserName = "admin", Password = "password" });
var debtorDocumentPOSTRequest = new JiwaFinancials.Jiwa.JiwaServiceModel.DebtorDocumentPOSTRequest() { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/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+WltdgYMyZfyywz78AAAAA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XOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") };
var debtorDocumentPOSTResponse = client.Post(debtorDocumentPOSTRequest); |
|
Card |
---|
id | DebtorDocumentPOSTRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| using (var webClient = new System.Net.WebClient())
{
// Authenticate
webClient.QueryString.Add("username", "Admin");
webClient.QueryString.Add("password", "password");
string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");
// Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
// Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
var sessionId = authResponse.SessionId;
webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/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///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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inIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==") } );
responsebody = webClient.UploadString("https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents", "POST", json);
} |
|
Card |
---|
id | DebtorDocumentPOSTRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X POST https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents -d '{"Description":"A new document", "PhysicalFileName":"Test.png", "FileBinary": "R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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KE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/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
notedocument
Panel |
---|
borderStyle | solid |
---|
title | Update an existing notedocument |
---|
|
Deck |
---|
id | DebtorNotePATCHRequestDebtorDocumentPATCHRequest |
---|
|
Card |
---|
id | DebtorNotePATCHRequestDebtorDocumentPATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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/Zkx9jE0mx48eJCbmxcdrQwJCfHz83NxcZNIbGxtbe3sNjk4OHh4ePBSofgRU4yYXC4PClL09PToIf60D9DE2N7eLpf7ubm6hYaEqdWa0tKypqamW7du8ezs7CQ6zj9+/Li3t/fOnTtNTc2DzwdJi5xqamr8/QPIRo81Yh+gz5zJ8PDwvH79enNz8+3bt8G6e/fu/fv37927xwIHfCotLb148VJ+fn5jIy9ulZeVt7W2CWxcunTp4MGDY5nRQxcVFYWHh0MosRNaa2tbXV0dh2GT3bxkz+DgIF6fPn0Kv8XFxXV119LTf2poaGi82Tg8PEz4wcE7iUkAxHTQvA0LC+vr62NNcRobGwU4EiTSkW06q6qqGhoa4j1ALF68eNHS0lJZWUlthGCvXbsWGhoKmrBfB80mf39/drMeGBjg5MuXL3nyk8CFkDFeEq9SqXRycrKzs1MEKXDMfnIVNrBwcHCEd+GnCAiNJjYhIeHXEcONl9d2U1PTJSZLFIod2m6tAE0sOTk5YrH1lStX3N08Phk34bMJkxcvNsnMzESIeGUbx0tKStauXdvb+1gHnZFxNioqisqQ18OHDyF0z569q78ymzVr9rQp002Mv5B5yziJyzVrvk1IOG5hYUHIEREHdu4M2WBuQekoADUnIVJsbW1NT08nuP7+flF8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yqVS6auWXDlscJRJJQEAA/iiadLM9g5TxT36MfEYKgwkV0krsZJYKjI+aDvro0aPcHcw2pEoI7BCo1Gq5bloRDy0jzGU6kBldW1vHPOALuLTb/v37YUOAG2sigCIiIpA6I4LW4DLt6OhApKwRL2fQE9AjV+3dy5cvczUTb8ONhhhljKurK55Gr5WPTAftJ/dDsPQrVzhTm/CJEYooAGVhCuflXcjNze3svA/7FDwuLs7ZyZkgyEMP81emIyQuLv5sxlkWVJ8rAx+cwQETDh/A8R7DGVLjvxHaj5cjx//JdNCkv9XZ5fTp03A9thQIAzhopesk1rY2NjZH449Bnf7zv5kOGuMAOrG0tPL2lnFrMFX27dvPHYoxySgm1AsD9r+bHlowokZP/AdCoRApXMOD/tv/tffv/wAyAr/0hHrPvgAAAABJRU5ErkJggg==") };
var debtorNotePOSTResponsedebtorDocumentPATCHResponse = client.Patch(debtorNotePATCHRequestdebtorDocumentPATCHRequest);
|
|
Card |
---|
id | InventoryNotePATCHRequestDebtorDocumentPATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACx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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 |
---|
id | InventoryNotePATCHRequestDebtorDocumentPATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZ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ljKurK55Gr5WPTAftJ/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 |
---|
borderStyle | solid |
---|
title | Delete a specific notedocument |
---|
|
Deck |
---|
id | DeleteNoteDELETERequestDebtorDocumentDELETERequest |
---|
|
Card |
---|
id | InventoryNoteDELETERequestDebtorDocumentDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorNoteDELETERequestDebtorDocumentDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DeleteNoteDELETERequestDebtorDocumentDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
borderStyle | solid |
---|
title | Get all documents delivery addresses for a customer |
---|
|
Deck |
---|
id | InventoryDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest |
---|
|
Card |
---|
id | DebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDocumentsGETManyRequestDebtorDeliveryAddressesGETManyRequest_webbrowser |
---|
label | Web 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 |
---|
borderStyle | solid |
---|
title | Get a specific documentdebtor delivery address |
---|
|
Deck |
---|
id | DebtorDocumentGETRequestDebtorDeliveryAddressGETRequest |
---|
|
Card |
---|
id | DebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentGETRequestDebtorDeliveryAdddressGETRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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 |
---|
id | DebtorDocumentGETRequestDebtorDeliveryAddressGETRequest_webbrowser |
---|
label | Web 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
documentdelivery address for a customer
Panel |
---|
borderStyle | solid |
---|
title | Add a new document delivery address to a customer |
---|
|
Deck |
---|
id | DebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest |
---|
|
Card |
---|
id | DebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc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yGWMS1FSKJOMRB/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 |
---|
id | DebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| using (var webClient = new System.Net.WebClient())
{
// Authenticate
webClient.QueryString.Add("username", "Admin");
webClient.QueryString.Add("password", "password");
string responsebody = webClient.DownloadString("https://api.jiwa.com.au/auth");
// Above returns something like this: {"SessionId":"0hKBFAnutUk8Mw6YY6DN","UserName":"api","DisplayName":"","ResponseStatus":{}}
// Deserialise response into a dynamic - below requires the Newtonsoft.Json nuget package
var authResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responsebody);
var sessionId = authResponse.SessionId;
webClient.Headers.Add(System.Net.HttpRequestHeader.Cookie, string.Format("ss-id={0}", sessionId));
webClient.Headers[System.Net.HttpRequestHeader.ContentType] = "application/json";
string json = Newtonsoft.Json.JsonConvert.SerializeObject(new { DebtorID = "0000000061000000001V", Description = "A new document", PhysicalFileName = "Test.png", FileBinary = Convert.FromBase64String("R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38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gByfIL7/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 |
---|
id | DebtorDocumentPOSTRequestDebtorDeliveryAddressPOSTRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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", "FileB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DAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/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
documentcustomer delivery address
Panel |
---|
borderStyle | solid |
---|
title | Update Updates an existing documentdelivery address for a customer |
---|
|
Deck |
---|
id | DebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest |
---|
|
Card |
---|
id | DebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR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DLt6OhApKwRL2fQE9AjV+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 |
---|
id | DebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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("iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZd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zhTm/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 |
---|
id | DebtorDocumentPATCHRequestDebtorDeliveryAddressPATCHRequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| curl -H 'Accept: application/json' -H 'Content-Type: application/json' --cookie 'ss-id=6w1nLX8r0sIrJHClX9Vj' -X PATCH https://api.jiwa.com.au/Debtors/0000000061000000001V/Documents/ba141e00-23bd-440d-8754-595ffbc24620 -d '{"FileBinary":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAdCAIAAAAyxktbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTM0A1t6AAAG60lEQVRIS5WWh1NUVxTG948w0djHiRUsIMZKJpKJGY2IsCygixSpIgtLILARAbEhsKi7i6AI0jJjQSQIqIAC0gMoIlItYIEFFVASo2DLb3kbZJzUM8ybu+/d+51zvvOdcx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m1AsD9r+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 |
---|
borderStyle | solid |
---|
title | Delete a specific documentDeletes an existing delivery address for a customer |
---|
|
Deck |
---|
id | DebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest |
---|
|
Card |
---|
id | DebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_csharp_servicestack |
---|
label | ServiceStack Client C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_csharp |
---|
label | C# |
---|
|
Code Block |
---|
| 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 |
---|
id | DebtorDocumentDELETERequestDebtorDeliveryAddressDELETERequest_curl |
---|
label | Curl |
---|
|
Code Block |
---|
| 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 |
---|
| 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