-
Notifications
You must be signed in to change notification settings - Fork 0
Transaction Upload API
Tom Bloor edited this page Apr 22, 2017
·
4 revisions
Last Updated 2017-04-22
Takes a multipart/form-data
upload, with the following parts:
- File under the form key
file
with the content typeimage/jpeg
- JSON Object with required arguments under
json
key
The JSON can be one of the following types:
- Known and Validated Organisation
- Known but Unvalidated Organisation
- Unknown Organisation
{
session_key : <current session key>,
transaction_type : 1,
transaction_value : 2.99,
organisation_id : <id_number>
}
{
session_key : <current session key>,
transaction_type : 2,
transaction_value : 2.99,
organisation_id : <id_number>
}
{
session_key : <current session key>,
transaction_type : 3,
transaction_value : 2.99,
organisation_name : 'Org Name',
street_name : '7 High Street',
town : 'Lancaster',
postcode : 'LA1 1AA',
}
Note street_name
and postcode
are optional.
Response code of 200 OK
{
success : true,
message : 'Upload Successful'
}
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>
error : <error type>
}
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'
error : 'server_error'
}
The error messages should describe what was wrong with the submission