List Document Batches
Lists document batches created
Endpoint URL | SDK Method |
---|---|
https://api.inkit.com/v1/batch (GET) | Batch.list() |
Request properties
Property | Type | Required | Description |
---|---|---|---|
page | Integer | No | The page of the list you want to pull. The default is 1 . |
page_size | Integer | No | The number of records to pull per page. The default is 25 . |
sort | String | No | The sort key. If the key is preceded with a - , the request will sort the records in descending order. Otherwise it will sort in ascending order. |
search | String | No | The search key. The request will only return records with this key. |
destination_name | String | No | The request will only return records with this destination name. |
destination_status | String | No | The request will only return records with this destination status. |
Response properties
items
items
Property | Type | Description |
---|---|---|
created_at | String | The date and time the batch was created. |
destinations | Object | The status of generations within the batch. |
id | String | The ID of the batch. |
name | String | The name of the batch. |
status | String | The status of the batch. |
total | Integer | The number of the 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:
# List all batches
resp = inkit.Batch.list()
# Print the JSON repsonse code of the API call
print(json.dumps(dict(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 list batch
listBatches();
// List batches
async function listBatches() {
try {
const result = await Inkit.Batch.list();
// 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);
}
}
{
"items": [
{
"created_at": "2023-09-06T14:07:55.732858Z",
"destinations": {
"inkit_storage": {
"completed": 2,
"count": 2,
"failed": 0,
"in_progress": 0,
"status": "completed"
}
},
"id": "rb_CDh2Dg57evYHnBp7TbxJt",
"name": null,
"status": "Completed",
"total": 2
},
{
"created_at": "2023-08-24T14:41:21.969069Z",
"destinations": {
"inkit_storage": {
"completed": 2,
"count": 2,
"failed": 0,
"in_progress": 0,
"status": "completed"
}
},
"id": "rb_3uNFz4IL6MqH7A1kOy9YHs",
"name": null,
"status": "Completed",
"total": 2
},
{
"created_at": "2023-08-24T14:40:55.778626Z",
"destinations": {
"inkit_storage": {
"completed": 2,
"count": 2,
"failed": 0,
"in_progress": 0,
"status": "completed"
}
},
"id": "rb_4F0P2OBR3qkf0F14TSQ2WH",
"name": null,
"status": "Completed",
"total": 2
},
{
"created_at": "2023-08-14T14:32:48.872931Z",
"destinations": {
"inkit_storage": {
"completed": 1,
"count": 1,
"failed": 0,
"in_progress": 0,
"status": "completed"
}
},
"id": "rb_6WtDgF7RGqdS5Uzea9neZJ",
"name": "test",
"status": "Completed",
"total": 1
},
{
"created_at": "2023-08-02T13:36:49.089326Z",
"destinations": {},
"id": "rb_4R8u6FWWenZtmI7jiBl07r",
"name": null,
"status": "In Progress",
"total": 2
},
{
"created_at": "2023-08-01T17:13:40.643463Z",
"destinations": {},
"id": "rb_esvglATMyCTJ5JfeVrFA",
"name": null,
"status": "In Progress",
"total": 2
},
{
"created_at": "2023-08-01T16:14:24.514557Z",
"destinations": {},
"id": "rb_6vk9qlaW5kvkQTcZABx1XZ",
"name": null,
"status": "In Progress",
"total": 2
}
],
"metadata": {
"pagination": {
"current_page": 1,
"next_page": null,
"page_count": 1,
"page_size": 25,
"prev_page": null,
"total_count": 7
},
"sort": {
"key": "created_at",
"order": 1
}
}
}
Updated about 1 year ago