File Upload

Scope

New file adding to the specific file processing session.

Description

1. The file is attached to the file processing session;
2. The file description information is returned.

Request

The Service provider's application sends the following GET request using TLS:

PUT /api-storage/v1.0/{sessionId}/upload 
PropertyTypeUsageDescription
sessionId
String (64)MandatoryFile processing session identifier

Authorization

The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.

Unable to render {include} The included page could not be found.

Body

PropertyTypeUsageDescription
file
Binary dataMandatoryFile to be uploaded


Example

PUT /api-storage/v1.0/77740b301f0880ef498cb1e474e8060b3e538cfeea8ebf508c2bad4b72b56a87/upload HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv

Response

JSON object:

{
    "data": [ 
				{
        	"includedDocuments": [
            	{
              	  "id": {String},
             	   "name": {String},
             	   "size": {Number},
					"type": {String}
				}
        	],
        	"id": {String},
        	"name": {String},
       		"size": {Number},
			"type": {String}
		 		}
			]
}
PropertyTypeDescription
data
Object
Data Object
data.includedDocuments
Array
If uploaded file is ASICE (EDOC), list of files included in ASIC container.
data.includedDocuments.id
String
Included file identifier, must be used if you need to download current included file.
data.includedDocuments.name
String
Included file name.
data.includedDocuments.size
Number
Included file size in bytes
data.includedDocuments.type
String

Processed file type.

"file" - In case of file or ASICE container

data.id
String
File Identifier (documentId)
data.name
String
File name
data.size
Integer
File size in bytes
data.type
String

Processed file type:

"file" - In case of file or ASICE container

Example if uploaded file is not ASICE container

{
    "data": {
        "id": "cc8bcb560bbfee4c190433ea63c549d1",
        "name": "test.doc",
        "size": 41280,
		"type": "file"
 			}
}

Example if ASICE container is uploaded 

{
    "data": {
        "includedDocuments": [
            {
                "id": "3cbc266934776e581bcb406f15bb5ffd",
                "name": "Receipt.doc",
                "size": 22528,
				"type": "file"
 			}
        ],
        "id": "23a3abe0a211478ae55554649178568e",
        "name": "Receipt.edoc",
        "size": 14805,
		"type": "file"
 			}
}




  • No labels