Updated Transaction Upload API (markdown)
parent
757e2ba485
commit
01c863f917
1 changed files with 40 additions and 5 deletions
|
@ -15,9 +15,9 @@ The JSON can be one of the following types:
|
||||||
* Known but Unvalidated Organisation
|
* Known but Unvalidated Organisation
|
||||||
* Unknown 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.
|
**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 : <error 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
|
Reference in a new issue