From a557367215ec74b14144201ba570fe33b06aaf1b Mon Sep 17 00:00:00 2001
From: John Woodlock
If you want to check out the POST, PUT and DELETE (update) examples a good approach is to take a moment to - install a REST plugin for your browser e.g. RESTClient for FireFox
+ install a REST plugin for your browser e.g. RESTClient for FireFox The REST plugins will allow you to- All API requests must be made over HTTPS. - Calls made over plain HTTP will fail. You must authenticate for all requests. + The platform has been configured to reject plain HTTP requests and to expect all API requests to be made over HTTPS. + All requests must be authenticated.
JPW:Need to update this - Stripe uses conventional HTTP response codes to indicate - success or failure of an API request. In general, - codes in the 2xx range indicate success, codes in the - 4xx range indicate an error that resulted from the - provided information (e.g. a required parameter was - missing, a charge failed, etc.), and codes in the 5xx - range indicate an error with Stripe's servers. -
+- Not all errors map cleanly onto HTTP response codes, - however. When a request is valid but does not complete - successfully (e.g. a card is declined), we return a 402 - error code. + All errors are return in JSON.
- -- All errors return JSON with a type (one of card_error, invalid_request_error, - or api_error) and message describing the particular problem. -
- -Type: invalid_request_error
-
- Type: api_error
-
- Type: card_error
- | Code | -Details | -
|---|---|
| invalid_number | -The card number is invalid | -
| incorrect_number | -The card number is incorrect | -
| invalid_expiry_month | -The card's expiration month is invalid | -
| invalid_expiry_year | -The card's expiration year is invalid | -
| invalid_cvc | -The card's security code is invalid | -
| expired_card | -The card has expired | -
| invalid_amount | -An invalid amount was entered | -
| incorrect_cvc | -The card's security code is incorrect | -
| card_declined | -The card was declined. | -
| missing | -There is no card on a customer that is being charged. | -
| duplicate_transaction | -A transaction with identical amount and credit card information was submitted very recently. | -
| processing_error | -An error occurred while processing the card. | -
+Error Message returned when attempting to create an Office without passing any parameters
+{
+ "developerMessage": "The request was invalid. This typically will happen due to validation errors which are provided.",
+ "developerDocLink": "https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes",
+ "httpStatusCode": "400",
+ "defaultUserMessage": "Validation errors exist.",
+ "userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
+ "errors": [
+ {
+ "developerMessage": "The parameter name cannot be blank.",
+ "defaultUserMessage": "The parameter name cannot be blank.",
+ "userMessageGlobalisationCode": "validation.msg.office.name.cannot.be.blank",
+ "parameterName": "name",
+ "value": null,
+ "args": []
+ },
+ {
+ "developerMessage": "The parameter openingDate cannot be blank.",
+ "defaultUserMessage": "The parameter openingDate cannot be blank.",
+ "userMessageGlobalisationCode": "validation.msg.office.openingDate.cannot.be.blank",
+ "parameterName": "openingDate",
+ "value": null,
+ "args": []
+ },
+ {
+ "developerMessage": "The parameter parentId cannot be blank.",
+ "defaultUserMessage": "The parameter parentId cannot be blank.",
+ "userMessageGlobalisationCode": "validation.msg.office.parentId.cannot.be.blank",
+ "parameterName": "parentId",
+ "value": null,
+ "args": []
+ }
+ ]
+}
+
exception
org.mifosng.platform.loan.domain.InvalidLoanTimelineDate: The date of when loan is approved cannot be before its submittal date.
@@ -41,7 +41,7 @@ Loan Transactions (repay and waive - and maybe reversal - but not disbursement)
"principal" : null, "interest" : null, total, "totalWaived" : null, "overpaid" : null, and the offset - are nulls ever put in? DOING
adjust:
- when adjusting a disbursal - The server encountered an internal error () that prevented it from fulfilling this request.exception
java.lang.IllegalArgumentException: Only repayment and waiver transactions can be adjusted. DONE
+ when adjusting a disbursal - The server encountered an internal error () that prevented it from fulfilling this request.exception
java.lang.IllegalArgumentException: Only repayment and waiver transactions can be adjusted. DOING
on create and adjust, app returns clientId can it be transaction id or loanId?
@@ -55,8 +55,7 @@ list of loan transactions not available (except in summary - presume repayments
DOCUMENTATION REMAINING
-
-Just Errors section to do in the Overview section
+maybe PlatformDomainRule should be in 400 rather than 403
describe waiver CHECK RULES AFTER
@@ -81,3 +80,5 @@ inherited from loan product. KW DOING - CHECK AFTER
?DOMAIN NAME
+
+