🎒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
Create new batch
POST
/api/CreateBatch/{processId}
Method is used to create new batch with an assigned processID.
Path Parameters
processId*
Integer
{
"id": “2123”,
"providerSettingsId": “1”,
"creationDate": "2023-01-01 12:00:00",
"status": “1”
}
Upload package (ZIP)
Upload package (ZIP)
POST
/api/upload/{batchId}
Method is used to upload a file to the batch. The BatchId value generated and returned during the CreateBatch (2.1.1) 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
Request Body
<binary-octet-stream>
<binary-octet-stream>
{
"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 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
{
"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
ACCEPTED
Batch successfully created
2
READY
For internal use
3
IN_PROGRESS
Signing/stamping process in progress
4
FINISHING
For internal use
5
CLOSED
Batch closed, ready for download
6
DELETED
Batch romoved from cache
Delete batch from the cache
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
{
"id":2123,
"status": "DELETED",
"creationDate": "2023-01-01 10:00:00",
"documents": [<“array of documents”>]
}
Accept batch
Accept batch
POST
/api/AcceptBatch
This method accepts batch, starts the signature/validation process
Path Parameters
batchId
Integer
{
"id": 2123,
"providerSettingsId": “1”,
"creationDate": "2023-01-01 10:00:00",
"status": “0”
}
Download signed batch
Download signed batch
GET
/api/batchfile/{batchId}
This method provides a signed package for download
Path Parameters
batchId
Integer
Exaple response:
binary octet stream (https://www.iana.org/assignments/media-types/application/octet-stream)
Last updated