From 82614f3fb42aa29959dcdc3173c176fc5614606e Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Tue, 5 Feb 2013 13:46:04 +0000 Subject: [PATCH] api docs format updates --- api-docs/apiLive.htm | 318 ++++++++++++++++++++++++++----------------- 1 file changed, 195 insertions(+), 123 deletions(-) diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 59ac1f202..147b266a9 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -1404,8 +1404,9 @@
clients?fields=displayName,officeName,joinedDate
- GET https://Domain - Name/api/v1/clients + +GET https://DomainName/api/v1/clients + [ { "id": 2, "accountNo": "000000002", "externalId": "one/78", "fullname": "New Business to Create", "displayName": "New Business to Create", "officeId": 1, @@ -1435,8 +1436,9 @@
clients/template
- GET https://Domain - Name/api/v1/clients/template + +GET https://DomainName/api/v1/clients/template + { "officeId": 1, "joinedDate": [ 2013, 2, 5], "allowedOffices": [ { "id": 1, "name": "Head Office", "nameDecorated": "Head Office" } ] } @@ -1459,8 +1461,9 @@
clients/1?fields=id,displayName,officeName
- GET https://Domain - Name/api/v1/clients/{clientId} + +GET https://DomainName/api/v1/clients/{clientId} + { "id": 1, "accountNo": "000000001", "externalId": "786YYH7", "firstname": "Petra", "lastname": "Yton", "displayName": "Petra Yton", "officeId": 1, @@ -1490,8 +1493,9 @@
- POST https://Domain - Name/api/v1/clients + +POST https://DomainName/api/v1/clients + POST clients Content-Type: application/json Request Body: { "officeId": 1, "firstname": "Petra", "lastname": "Yton", "externalId": "786YYH7", @@ -1516,8 +1520,9 @@

Update a Client

- PUT https://Domain - Name/api/v1/clients/{clientId} + +PUT https://DomainName/api/v1/clients/{clientId} + PUT clients/1 Content-Type: application/json Request Body: { "externalId": "786444UUUYYH7", "dateFormat": "dd MMMM yyyy", "locale": "en", "joinedDate": "09 @@ -1548,8 +1553,9 @@
clients/1/loans?fields=openLoans,closedLoans,activeLoanCount
- GET https://Domain - Name/api/v1/clients/{clientId}/loans + +GET https://DomainName/api/v1/clients/{clientId}/loans + { "anyLoanCount": 9, "pendingApprovalLoanCount": 4, "pendingApprovalLoans": [ { "id": 48, "accountNo": "48", "productId": 1, "productName": @@ -1600,8 +1606,9 @@
clients/2/notes?fields=note,createdOn,createdByUsername
- GET https://Domain - Name/api/v1/clients/{clientId}/notes + +GET https://DomainName/api/v1/clients/{clientId}/notes + [ { "id": 2, "clientId": 1, "noteType": { "id": 100, "code": "noteType.client", "value": "Client note" }, "note": "First note\r\n\r\nedited", @@ -1618,8 +1625,9 @@

Add a Client Note

- POST https://Domain - Name/api/v1/clients/{clientId}/notes + +POST https://DomainName/api/v1/clients/{clientId}/notes + POST clients/1/notes Content-Type: application/json Request Body: { "note": "a note about the client" } @@ -1640,8 +1648,9 @@
clients/1/notes/76?fields=note,createdOn,createdByUsername
- GET https://Domain - Name/api/v1/clients/{clientId}/notes/{noteId} + +GET https://DomainName/api/v1/clients/{clientId}/notes/{noteId} + { "id": 76, "clientId": 1, "noteType": { "id": 100, "code": "noteType.client", "value": "Client note" }, "note": "a note about the client", "createdById": @@ -1658,8 +1667,9 @@

Update a Client Note

- PUT https://Domain - Name/api/v1/clients/{clientId}/notes/{noteId} + +PUT https://DomainName/api/v1/clients/{clientId}/notes/{noteId} + PUT clients/1/notes/76 Content-Type: application/json Request Body: { "note": "and here the note is updated nicely." } @@ -1829,8 +1839,9 @@
loans/template?clientId=1
- GET https://Domain - Name/api/v1/loans/template + +GET https://DomainName/api/v1/loans/template + { "clientId" : 1, "clientName" : "Patrick O'Meara", "productId" : 1, "productName" : "Agricultural Loan", "selectedProduct" : { "id" : 1, "name" : @@ -1966,8 +1977,9 @@
loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions
- GET https://Domain - Name/api/v1/loans/{loanId} + +GET https://DomainName/api/v1/loans/{loanId} + { "id": 1, "accountNo": "000000001", "clientId": 1, "clientName": "Petra Yton", "loanProductId": 1, "loanProductName": "A new loan product for @@ -2033,8 +2045,9 @@
- POST https://Domain - Name/api/v1/loans + +POST https://DomainName/api/v1/loans + POST loans Content-Type: application/json Request Body: { "dateFormat": "dd MMMM yyyy", "locale": "en_GB", "clientId": 1, "productId": 1, "principal": @@ -2081,8 +2094,9 @@
- POST https://Domain - Name/api/v1/loans/{loanId} + +POST https://DomainName/api/v1/loans/{loanId} + POST loans/1?command=approve Content-Type: application/json Request Body: { "locale": "en", "dateFormat": "dd MMMM yyyy", "eventDate": "20 September 2011", @@ -2104,8 +2118,9 @@

- DELETE https://Domain - Name/api/v1/loans/{loanId} + +DELETE https://DomainName/api/v1/loans/{loanId} + DELETE loans/1 Content-Type: application/json No Request Body: { "officeId": 1, "clientId": @@ -2149,8 +2164,9 @@
loans/10/transactions/template?command=repayment
- GET https://Domain - Name/api/v1/loans/{loanId}/transactions/template" + +GET https://DomainName/api/v1/loans/{loanId}/transactions/template" + { "transactionType" : { "id" : 2, "code" : "loanTransactionType.repayment", "value" : "Repayment" }, "date" : [ 2009, 8, 1 ], "total" : { "currencyCode" : "XOF", @@ -2175,8 +2191,9 @@
- POST https://Domain - Name/api/v1/loans/{loanId}/transactions + +POST https://DomainName/api/v1/loans/{loanId}/transactions + POST loans/37/transactions?command=repayment Content-Type: application/json Request Body: { "locale": "en_GB", "dateFormat": @@ -2195,8 +2212,9 @@
loans/10/transactions/20
- GET https://Domain - Name/api/v1/loans/{loanId}/transactions/{transactionId} + +GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} + { "id" : 10, "date" : [ 2009, 1, 29 ], "total" : { "currencyCode" : "XOF", "digitsAfterDecimal" : 0, "amount" : 300000, "defaultName" : "CFA Franc BCEAO", @@ -2224,8 +2242,9 @@
- POST https://Domain - Name/api/v1/loans/{loanId}/transactions/{transactionId} + +POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} + POST loans/16/transactions/32 Content-Type: application/json Request Body: { "locale": "en_GB", "dateFormat": "dd MMMM yyyy", "transactionDate": "25 May 2012", @@ -2290,8 +2309,9 @@
offices?fields=id,name,openingDate
- GET https://Domain - Name/api/v1/offices + +GET https://DomainName/api/v1/offices + [ { "id": 1, "name": "Head Office", "nameDecorated": "Head Office", "externalId": "1", "openingDate": [ 2009, 1, 1 ], "hierarchy": "." } ] @@ -2316,8 +2336,9 @@
offices/template
- GET https://Domain - Name/api/v1/offices/template + +GET https://DomainName/api/v1/offices/template + { "openingDate": [2013,2,4], "allowedParents": [ { "id": 1, "name": "Head Office", "nameDecorated": "Head Office" } ] } @@ -2339,8 +2360,9 @@
offices/1?fields=id,name,parentName
- GET https://Domain - Name/api/v1/offices/1 + +GET https://DomainName/api/v1/offices/1 + { "id": 1, "name": "Head Office", "nameDecorated": "Head Office", "externalId": "1", "openingDate": [2009,1,1], "hierarchy": "." } @@ -2361,8 +2383,9 @@
- POST https://Domain - Name/api/v1/offices + +POST https://DomainName/api/v1/offices + POST offices Content-Type: application/json Request Body: { "name": "Example New Branch", "dateFormat": "dd MMMM yyyy", "locale": "en", "openingDate": "01 @@ -2378,8 +2401,9 @@

Update Office

- PUT https://Domain - Name/api/v1/offices/{officeId} + +PUT https://DomainName/api/v1/offices/{officeId} + PUT offices/1 Content-Type: application/json Request Body: { "name": "Name is updated" } { "officeId": 1, "resourceId": @@ -2538,8 +2562,9 @@
loanproducts?fields=name,description,interestRateFrequencyType,amortizationType
- GET https://Domain - Name/api/v1/loanproducts + +GET https://DomainName/api/v1/loanproducts + [ { "id": 1, "name": "A new loan product for me", "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, "displaySymbol": "$", "nameCode": @@ -2582,8 +2607,9 @@
loanproducts/template
- GET https://Domain - Name/api/v1/loanproducts/template + +GET https://DomainName/api/v1/loanproducts/template + { "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, "displaySymbol": "$", "nameCode": "currency.USD", "displayLabel": "US Dollar ($)" }, @@ -2655,8 +2681,9 @@
loanproducts/1?fields=name,description,numberOfRepayments
- GET https://Domain - Name/api/v1/loanproducts/{productId} + +GET https://DomainName/api/v1/loanproducts/{productId} + { "id": 1, "name": "A new loan product for me", "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, "displaySymbol": "$", "nameCode": @@ -2701,8 +2728,9 @@
- POST https://Domain - Name/api/v1/loanproducts + +POST https://DomainName/api/v1/loanproducts + POST loanproducts Content-Type: application/json Request Body: { "name": "A new loan product for me", "currencyCode": "USD", "locale": "en_GB", @@ -2723,8 +2751,9 @@

Update a Loan Product

- PUT https://Domain - Name/api/v1/loanproducts/{loanId} + +PUT https://DomainName/api/v1/loanproducts/{loanId} + PUT loanproducts/1 Content-Type: application/json Request Body: { "locale": "en_GB", "principal": "70,000.00" } @@ -2758,8 +2787,9 @@
currencies?fields=selectedCurrencyOptions
- GET https://Domain - Name/api/v1/currencies + +GET https://DomainName/api/v1/currencies + { "selectedCurrencyOptions": [ { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, "displaySymbol": "$", "nameCode": "currency.USD", "displayLabel": @@ -2782,8 +2812,9 @@

Updates the list of currencies permitted for use.

- PUT https://Domain - Name/api/v1/currencies + +PUT https://DomainName/api/v1/currencies + PUT currencies Content-Type: application/json Request Body: { "currencies": ["KES", "BND", "LBP", "GHC", "USD", "XOF", "AED", "AMD"] } @@ -2811,8 +2842,9 @@
configurations
- GET https://Domain - Name/api/v1/configurations + +GET https://DomainName/api/v1/configurations + { "globalConfiguration": [ { "name": "maker-checker", "enabled": false } ] }
@@ -2826,8 +2858,9 @@

Updates an enable/disable global configuration item.

- PUT https://Domain - Name/api/v1/configurations?maker-checker=false + +PUT https://DomainName/api/v1/configurations?maker-checker=false + PUT configurations Content-Type: application/json Request Body: { } { "changes": {} } @@ -2858,8 +2891,9 @@ defined' and so system defined is marked as false.

- POST https://Domain - Name/api/v1/codes + +POST https://DomainName/api/v1/codes + POST codes Content-Type: application/json Request Body: { "name": "MyNewCode" } { "resourceId": 4 } @@ -2876,8 +2910,9 @@
codes
- GET https://Domain - Name/api/v1/codes + +GET https://DomainName/api/v1/codes + [ { "id": 1, "name": "Customer Identifier", "systemDefined": true }, { "id": 2, "name": "Gender", "systemDefined": true },{ "id": 3, "name": "Education", @@ -2895,8 +2930,9 @@
codes/1
- GET https://Domain - Name/api/v1/codes/1 + +GET https://DomainName/api/v1/codes/{codeId} + { "id": 1, "name": "Customer Identifier", "systemDefined": true }
@@ -2910,8 +2946,9 @@

Updates the details of a code if it is not system defined.

- PUT https://Domain - Name/api/v1/codes/4 + +PUT https://DomainName/api/v1/codes/{codeId} + PUT codes/4 Content-Type: application/json Request Body: { "name": "MyNewCode(changed)" } { "resourceId": 4, "changes": @@ -2927,8 +2964,9 @@

Deletes a code if it is not system defined.

- DELETE https://Domain - Name/api/v1/codes/4 + +DELETE https://DomainName/api/v1/codes/{codeId} + DELETE codes/4 Content-Type: application/json { "resourceId": 4 } @@ -2953,8 +2991,9 @@

Creates a fund.

- POST https://Domain - Name/api/v1/funds + +POST https://DomainName/api/v1/funds + POST funds Content-Type: application/json Request Body: { "name": "EU Agri Fund" } { "resourceId": 1 } @@ -2970,8 +3009,9 @@
funds
- GET https://Domain - Name/api/v1/funds + +GET https://DomainName/api/v1/funds + [ { "id": 1, "name": "EU Agri Fund" } ]
@@ -2986,8 +3026,9 @@
funds/1
- GET https://Domain - Name/api/v1/funds/1 + +GET https://DomainName/api/v1/funds/{fundId} + { "id": 1, "name": "EU Agri Fund" }
@@ -3000,8 +3041,9 @@

Updates the details of a fund.

- PUT https://Domain - Name/api/v1/funds/1 + +PUT https://DomainName/api/v1/funds/{fundId} + PUT funds/1 Content-Type: application/json Request Body: { "name": "EU Agri Fund (2010-2020)" } @@ -3028,8 +3070,9 @@

Creates a staff member.

- POST https://Domain - Name/api/v1/staff + +POST https://DomainName/api/v1/staff + POST staff Content-Type: application/json Request Body: { "officeId": 1, "firstname": "John", "lastname": "Doe", "isLoanOfficer": "true" } @@ -3047,8 +3090,9 @@
staff
- GET https://Domain - Name/api/v1/staff + +GET https://DomainName/api/v1/staff + [ { "id": 1, "firstname": "John", "lastname": "Doe", "displayName": "Doe, John", "officeId": 1, "officeName": "Head Office", "isLoanOfficer": true } ] @@ -3065,7 +3109,8 @@
GET https://Domain - Name/api/v1/staff/1 + Name/api/v1/staff/{staffId} + { "id": 1, "firstname": "John", "lastname": "Doe", "displayName": "Doe, John", "officeId": 1, "officeName": "Head Office", "isLoanOfficer": true } @@ -3079,8 +3124,9 @@

Updates the details of a staff member.

- PUT https://Domain - Name/api/v1/staff/1 + +PUT https://DomainName/api/v1/staff/{staffId} + PUT staff/1 Content-Type: application/json Request Body: { "isLoanOfficer": "false" } { "officeId": 1, "resourceId": @@ -3110,8 +3156,9 @@ products or loans.

- POST https://Domain - Name/api/v1/charges + +POST https://DomainName/api/v1/charges + POST charges Content-Type: application/json Request Body: { "name": "Loan service fee", "chargeAppliesTo": 1, "currencyCode": "USD", "locale": "en", @@ -3130,8 +3177,9 @@
charges
- GET https://Domain - Name/api/v1/charges + +GET https://DomainName/api/v1/charges + [ { "id": 1, "name": "Loan service fee", "active": true, "penalty": false, "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, @@ -3154,8 +3202,9 @@
charges/1
- GET https://Domain - Name/api/v1/charges/1 + +GET https://DomainName/api/v1/charges/{chargeId} + { "id": 1, "name": "Loan service fee", "active": true, "penalty": false, "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, @@ -3175,8 +3224,9 @@

Updates the details of a Charge.

- PUT https://Domain - Name/api/v1/charges/1 + +PUT https://DomainName/api/v1/charges/{chargeId} + PUT charges/1 Content-Type: application/json Request Body: { "name": "Loan service fee(changed)" } @@ -3192,8 +3242,9 @@

Deletes a Charge.

- DELETE https://Domain - Name/api/v1/charges/1 + +DELETE https://DomainName/api/v1/charges/{chargeId} + DELETE charges/1 Content-Type: application/json { "resourceId": 1 } @@ -3249,13 +3300,25 @@
datatables
- GET https://Domain - Name/api/v1/datatables - [ { "applicationTableName": - "m_client", "registeredTableName": "Additional Client Fields Data" - }, { "applicationTableName": "m_client", "registeredTableName": - "Extra Family Details Data" }, { "applicationTableName": "m_loan", - "registeredTableName": "Additional Loan Fields Data" } ] + +GET https://DomainName/api/v1/datatables + + +[ + { + "applicationTableName": "m_client", + "registeredTableName": "Additional Client Fields Data" + }, + { + "applicationTableName": "m_client", + "registeredTableName": "Extra Family Details Data" + }, + { + "applicationTableName": "m_loan", + "registeredTableName": "Additional Loan Fields Data" + } +] +
@@ -3269,11 +3332,15 @@ API.

- POST https://Domain - Name/api/v1/datatables/register/{datatable}/{apptable} - POST datatables/register/New - Table/m_client Content-Type: application/json Request Body: { } - { "resourceId": null } + +POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable} + + +POST datatables/register/NewTable/m_client +Content-Type: application/json Request Body: { } + + +{ "resourceId": null }
@@ -3287,8 +3354,9 @@ through the API.

- POST https://Domain - Name/api/v1/datatables/deregister/{datatable} + +POST https://DomainName/api/v1/datatables/deregister/{datatable} + POST datatables/register/New Table Content-Type: application/json Request Body: { } { "resourceId": null } @@ -3309,8 +3377,9 @@ have both "versions" in any data table.

- POST https://Domain - Name/api/v1/datatables/{datatable}/{apptableId} + +POST https://DomainName/api/v1/datatables/{datatable}/{apptableId} + POST datatables/Additional Client Fields Data/1 Content-Type: application/json Request Body: { "Business Description": "Livestock sales", Comment: "First @@ -3363,8 +3432,9 @@ Data/1?genericResultSet=true
- GET https://Domain - Name/api/v1/datatables/{datatable}/{apptableId} + +GET https://DomainName/api/v1/datatables/{datatable}/{apptableId} + [ {"client_id": 1, "Business Description": "Livestock sales", "Years in Business": 5, "Gender_cd": "21", "Education_cv": "Trade", "Next Visit": [2012, @@ -3382,8 +3452,9 @@

Updates the row (if it exists) of the data table.

- PUT https://Domain - Name/api/v1/datatables/{datatable}/{apptableId} + +PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId} + PUT datatables/Additional Client Fields Data/1 Content-Type: application/json Request Body: { "Business Description": "Livestock sales updated", Comment: @@ -3403,8 +3474,9 @@

Updates the row (if it exists) of the data table.

- PUT https://Domain - Name/api/v1/datatables/{datatable}/{apptableId}/{datatableId} + +PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId} + PUT datatables/Extra Family Details Data/1/2 Content-Type: application/json Request Body: { "Date of Birth": "01 June 1982", Education_cdHighest: "5", Name: