diff --git a/Transaction-Upload-API.md b/Transaction-Upload-API.md index 7eb6ed6..a91d3c6 100644 --- a/Transaction-Upload-API.md +++ b/Transaction-Upload-API.md @@ -15,9 +15,9 @@ The JSON can be one of the following types: * Known but Unvalidated Organisation * Unknown Organisation -### Known and Validated Organisation +### Request JSON -Request JSON +#### Known and Validated Organisation ``` { @@ -28,7 +28,7 @@ Request JSON } ``` -### Known but Unvalidated Organisation +#### Known but Unvalidated Organisation ``` { @@ -39,7 +39,7 @@ Request JSON } ``` -### Unknown Organisation +#### Unknown Organisation ``` { @@ -53,4 +53,39 @@ Request JSON } ``` -**Note** `street_name` and `postcode` are optional. \ No newline at end of file +**Note** `street_name` and `postcode` are optional. + +### Response JSON + +#### Success + +Response code of `200 OK` + +``` +{ + success : true, + message : 'Upload Successful' +} +``` + +#### Failure + +If something is missing from the request, or is invalid, you will get a response code of `400 BAD REQUEST` and the following: + +``` +{ + success : false, + message : +} +``` + +If there was a server error, you will get a `500 SERVER ERROR` and possibly the following: + +``` +{ + success : false, + message : 'An unknown error occurred when adding the transaction' +} +``` + +The error messages should describe what was wrong with the submission \ No newline at end of file