Document storage service

Document DOWNLOAD

# ENDPOINT
http://store.elcoin.co.uk/download
# REQUEST arguments
VariableNameTypeFormatUsageDescription
file File name GET String M Name file download
token Token GET String M Token
# REQUEST QUERY EXAMPLE
http://store.elcoin.co.uk/download?file=2021_08_1b2e742b-3633-4913-83e7-837928c17151&token=eyJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJ...
		
# POSITIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Empty string
data Data String Empty string
# RESPONSE POSITIVE EXAMPLE
{"status":"ok","error_description":"","data":""}
# NEGATIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Error description
data Data String Empty string
# NEGATIVE RESPONSE EXAMPLE
{
    "status": "error",
    "error_description": "File not exists or access denied. File \/var\/www\/store.elcoin.co.uk\/storage\/2021\/08\/2021_08_7cc06af3-0bf5-460c-8ca1-a33929f75bd8.dat",
    "data": {}		
		}

Document UPLOAD

# ENDPOINT
http://store.elcoin.co.uk/upload
# REQUEST BODY
VariableNameTypeFormatUsageDescription
authorization Authorization token GET body M Authorization token
uid Uid body String M UID
client_code Client code body String M Source client code
target_client_code Target client code body String M Target client code
counterparty_id Counterparty id body String M Counterparty id
category_code Category code body String M Category code
document_reference Document reference body String M Document reference
file_name File To Upload body String M File To Upload
file_content BASE64(file.content) body String M File BASE64 content
# REQUEST BODY EXAMPLE
		{
    "authorization": "eyJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJpc3M...",
    "uid": "f61bbb01-f5a9-4435-a441-912a6b015b25",    
    "client_code": "EN00012EH",
    "target_client_code": "",
    "counterparty_id": "",
    "category_code": "PASSPORT",
    "document_reference": "",
    "file_name":"kyrgyz.jpg",
"file_content": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUTExMWFhUXFx4YGBYXGBgVGhkdGhgWGBgdGhcYHSg..."

		}
		
# POSITIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Empty string
data Data String Empty string
counterparty_id counterparty id String
client_code client code String
document_reference document reference String
category_code category code String
description description String
file_extension file extension String
file_name file name String
endpoint endpoint String
# RESPONSE POSITIVE EXAMPLE
{
    "status": "ok",
    "error_description": "",
    "data": {
        "counterparty_id": 0,
        "client_code": "EN00012EH",
        "document_reference": "",
        "category_code": "PASSPORT",
        "description": "New document kyrgyz.jpg",
        "file_extension": "jpg",
        "file_name": "kyrgyz.jpg",
        "endpoint": "2021_09_f61bbb01-f5a9-4435-a441-912a6b015b25",
        "activation_date": "2021-09-14",
        "expiration_date": null,
        "uid": "f61bbb01-f5a9-4435-a441-912a6b015b25",
        "id": 195,
        "version": 967194330,
        "state": 0,
        "create_user": "file_store//",
        "create_date": "2021-09-14T13:25:40.413",
        "modify_user": "file_store//",
        "modify_date": "2021-09-14T13:25:40.423"

}
# NEGATIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Error description
data Data String Empty string
# NEGATIVE RESPONSE EXAMPLE
{
    "status": "error",
    "error_description": "Token expiered.",
    "data": {}		
		}

Document DELETE

# ENDPOINT
http://store.elcoin.co.uk/delete
# REQUEST arguments
VariableNameTypeFormatUsageDescription
file File name GET String M Name file download
token Token GET String M Token
# REQUEST QUERY EXAMPLE
http://store.elcoin.co.uk/download?file=2021_08_1b2e742b-3633-4913-83e7-837928c17151&token=eyJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJhbGciOiJIUzI1NiIsImN0eSI6IiJ9.eyJ...
		
# POSITIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Empty string
data Data String Empty string
# RESPONSE POSITIVE EXAMPLE
{"status":"ok","error_description":"","data":""}
# NEGATIVE RESPONSE
Type: object
VariableNameTypeFormatDescription
status Status String Result status
error_description Error description String Error description
data Data String Empty string
# NEGATIVE RESPONSE EXAMPLE
{
    "status": "error",
    "error_description": "File not exists or access denied. File \/var\/www\/store.elcoin.co.uk\/storage\/2021\/08\/2021_08_7cc06af3-0bf5-460c-8ca1-a33929f75bd8.dat",
    "data": {}		
		}