Retrieve Document Batch Information
Retrieves information about a batch of generated documents
Endpoint URL | SDK Method |
---|---|
https://api.inkit.com/v1/batch/{batchId} | Batch.get() |
Request properties
Property | Type | Required | Description |
---|---|---|---|
batchId | String | Yes | The ID of a batch that was previously created. |
Response properties
Property | Type | Description |
---|---|---|
created_at | String | The date and time the batch was created. |
destinations | Object | The status of document generations within the batch. |
id | String | The ID of the batch. |
name | String | The name of the batch. |
status | String | The batch creation status. |
total | Integer | The number of documents in the batch. |
destinations
destinations
Property | Type | Description |
---|---|---|
inkit_storage | Object | The status of Inkit Storage document generations within the batch. |
salesforce | Object | The status of Salesforce document generations within the batch. |
sepire | Object | The status of Sepire document generations within the batch. |
docusign | Object | The status of DocuSign document generations within the batch. |
magic_link | Object | The status of Magic Link document generations within the batch. |
inkit_storage
, salesforce
, sepire
, docusign
and magic_link
inkit_storage
, salesforce
, sepire
, docusign
and magic_link
Property | Type | Description |
---|---|---|
count | Integer | The total number of document generations within the batch for this destination. |
completed | Integer | The total number of completed document generations within the batch for this destination. |
failed | Integer | The total number of failed document generations within the batch for this destination. |
in_progress | Integer | The total number of in-progress document generations within the batch for this destination. |
Example request and response
# Import the Inkit Python package
import inkit
from inkit.exceptions import InkitResponseException
# Import json package
import json
# Replace the string below with your API key
inkit.api_token = "ENTER YOUR API KEY"
try:
# Get batch
resp = inkit.Batch.get('ENTER YOUR BATCH ID')
# Print the JSON repsonse code of the API call
print(json.dumps(resp.data, indent = 3))
except InkitResponseException as err:
# Print any error
print(err.response.data)
// Import the Inkit Node.js package
const Inkit = require("inkit");
// Replace the string below with your API key
Inkit.apiToken = "ENTER YOUR API KEY";
// Call get batch
getBatch();
// Get batch
async function getBatch() {
try {
const result = await Inkit.Batch.get('ENTER YOUR BATCH ID');
// Print the JSON response of the API call
console.log(JSON.stringify(result.data, null, 3));
} catch (error) {
// Print any error
console.error(error.response.status, error.response.statusText);
}
}
curl --request GET \
--url https://api.inkit.com/v1/batch/ENTER_YOUR_BATCH_ID \
--header 'X-Inkit-API-Token: ENTER YOUR API KEY' \
--header 'accept: application/json'
{
"created_at": "2023-08-14T14:32:48.872931Z",
"destinations": {
"inkit_storage": {
"completed": 1,
"count": 1,
"failed": 0,
"in_progress": 0
}
},
"id": "rb_6WtDgF7RGqdS5Uzea9neZJ",
"name": "test",
"status": "Completed",
"total": 1
}
Updated about 1 year ago