Updated Transaction Upload API (markdown)

Tom Bloor 2017-04-22 18:08:41 +01:00
parent 64907cdcbf
commit 615b28a45b

@ -1,12 +1,12 @@
# Transaction Upload API # Transaction Upload API
_Last Updated 2017-04-20_ _Last Updated 2017-04-22_
## `POST /api/upload` ## `POST /api/upload`
Takes a `multipart/form-data` upload, with the following parts: Takes a `multipart/form-data` upload, with the following parts:
* File under the form key `file` * File under the form key `file` with the content type `image/jpeg`
* JSON Object with required arguments under `json` key * JSON Object with required arguments under `json` key
The JSON can be one of the following types: The JSON can be one of the following types:
@ -76,6 +76,7 @@ If something is missing from the request, or is invalid, you will get a response
{ {
success : false, success : false,
message : <error message> message : <error message>
error : <error type>
} }
``` ```
@ -85,6 +86,7 @@ If there was a server error, you will get a `500 SERVER ERROR` and possibly the
{ {
success : false, success : false,
message : 'An unknown error occurred when adding the transaction' message : 'An unknown error occurred when adding the transaction'
error : 'server_error'
} }
``` ```