🎒Batch Methods
SIGNIUS Sealing Server REST API batch methods
Batch methods are used to start the process of signing, upload files, which are meant to be signed, download signed files and delete the batch from the cache.
A batch is a package that contains files for sign or validation. The package format is ZIP (without directories).
Create new batch
POST
/api/CreateBatch/{processId}
Method is used to create new batch with an assigned processId.
Path Parameters
processId
Integer
required
Response
{
"id": “2123”,
"providerSettingsId": “1”,
"creationDate": "2023-01-01 12:00:00",
"status": “1”
}
Upload package (ZIP)
POST
/api/upload/{batchId}
Method is used to upload a file to the batch. The Batch Id value generated and returned during the CreateBatch operation. The contents of the zip file should be sent as a binary octet stream (https://www.iana.org/assignments/media-types/application/octet-stream)
Path Parameters
batchId
Integer
required
Request Body
<binary-octet-stream>
<binary-octet-stream>
Response
{
"id": "1”,
"counterpartyId": “1”,
"name": "file_name.pdf",
"signed": "false”,
"hash": null,
"signature": null,
"batchId": 2123,
"creationDate": "2023-01-01 00:00:00",
"isZip": "true”,
"tsaId": “1”
}
Get batch status
GET
/api/BatchStatus/{batchId}
Use this method to get an information about the status of the batch. Possible statuses below.
Path Parameters
batchId
Integer
required
Response
{
"id":2123,
"status": "READY",
"creationDate": "2023-01-01 10:00:00",
"documents": [
{
"id": "1”,
"signed": "false”,
"fileName": "test.pdf",
"signingResult_Success": "false"
}
]
}
Possible statuses
0
NEW
New batch successfully created
1
UPLOADED
Zip package successfully received
2
ACCEPTED
Batch successfully created
3
READY
For internal use (awaiting processing)
4
IN_PROGRESS
Signing/stamping process in progress
5
FINISHING
For internal use
6
CLOSED
Batch closed, ready for download
7
DELETED
Batch romoved from cache
Accept batch
POST
/api/AcceptBatch
This method accepts batch, starts the signature/validation process
Path Parameters
batchId
Integer
required
{
"id": 2123,
"providerSettingsId": “1”,
"creationDate": "2023-01-01 10:00:00",
"status": “0”
}
Download signed batch
GET
/api/batchfile/{batchId}
This method provides a signed package for download
Path Parameters
batchId
Integer
required
<binary-octet-stream>
Delete batch from the cache
DELETE
/api/BatchDeleteCache/{batchId}
This method removes the batch from the cache on the server side
Path Parameters
batchId
Integer
required
{
"id":2123,
"status": "DELETED",
"creationDate": "2023-01-01 10:00:00",
"documents": [<“array of documents”>]
}
Last updated