SmartDocumentor
  • Overview
    • SmartDocumentor
  • GETTING STARTED
    • About SmartDocumentor
    • How SmartDocumentor Works
    • Main concepts
      • Workspaces
      • Organization
    • Quickstart 101
    • Licenses
      • How to Buy?
      • Support
    • Privacy
    • Security
  • Technical
    • Initial Setup
    • Mappings
    • API Reference
      • [POST] Client Credentials Access Token
      • [GET] Task Status
      • [GET] Task Status List
      • [GET] Task Status List Paginated
      • [GET] Get Workspaces
      • [PATCH] Reprocess Task
      • [POST] Create Task
      • [POST] Create Batch
      • [GET] Get Batch
      • [GET] Get Batch Paginated
      • Transcripts
        • Speakers
          • Workspaces
            • [GET] Workspace Speakers
            • [PUT] Workspace Speakers
          • Tasks
            • [GET] Task Speakers
            • [POST] Task Speaker
            • [PUT] Task Speaker
            • [DELETE] Task Speaker
      • Invite Users
        • [GET] List Available Roles
        • Tenants
          • [GET] List All Tenant Users
          • [POST] Invite Users
        • Workspaces
          • [GET] List All Workspace Users
          • [POST] Invite Users
    • Folder Worker
    • Export
      • Webhooks
        • Webhook (Text Documents)
        • Webhook (Transcripts)
        • Webhook Url To File (Transcripts)
        • Webhook Url to File (Anonymization)
    • Changelog
  • FAQs
    • FAQs
Powered by GitBook
On this page
  • Create Batch
  • Body application/json CreateBatchRequest
  • Example Request
  • Responses
  1. Technical
  2. API Reference

[POST] Create Batch

Use this request to create a new Batch in a given Workspace.

You can use batches to process and organize Tasks together.

Create Batch

POST/api/v1.0/external/sdbatch

Batches and Workspaces

All batches are tied to a Workspace. You can have multiple batches per workspace, and you can mix tasks with or without a batch in the same workspace.

Body application/json CreateBatchRequest

Name
Type
Description

displayName

string

A required display name for your batch.

description

string (optional)

An optional description for your batch.

workspaceId

integer (optional)

Example Request

curl --location 'https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch' \
--header 'Authorization: Bearer null' \
--header 'Content-Type: application/json' \
--data '{
    "displayName": "YourBatchName",
    "description": "AnOptionalDescriptionForYourBatch"
}'
var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Post, "https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch");
request.Headers.Add("Authorization", "Bearer null");

var content = new StringContent("{\r\n    \"displayName\": \"YourBatchName\",\r\n    \"description\": \"AnOptionalDescriptionForYourBatch\"\r\n}", null, "application/json");
request.Content = content;

var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();

Console.WriteLine(await response.Content.ReadAsStringAsync());
import requests
import json

url = "https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch"

payload = json.dumps({
  "displayName": "YourBatchName",
  "description": "AnOptionalDescriptionForYourBatch"
})
headers = {
  'Authorization': 'Bearer null',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer null");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "displayName": "YourBatchName",
  "description": "AnOptionalDescriptionForYourBatch"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Responses

{
  "batchId": 1,
  "workspaceId": 1,
  "displayName": "YourBatchName",
  "description": "AnOptionalDescriptionForYourBatch",
  "createdOn": "2023-08-08T08:55:29.7831583Z",
  "totalTasks": 0,
  "totalTasksInHistory": 0
}

Response Body GetBatchResponse

Name
Type
Description

batchId

integer

The unique identifier assigned to your batch.

workspaceId

integer

The workspace ID you assigned to this batch, or the ID of the default Workspace in your Organization, if none was provided.

displayName

string

The display name you assigned to your batch.

description

string (optional)

The description you provided to your batch.

createdOn

datetime

UTC timestamp of when the batch was created in our system.

totalTasks

integer

The total number of tasks assigned to this batch. Will always equal zero when the task is created.

totalTasksInHistory

integer

The total number of tasks in history assigned to this batch. Will always equal zero when the task is created.

Response body has no content.

Note Returned if:

  • the workspace provided (or the default workspace) is not valid or does not exist in your Organization.

Previous[POST] Create TaskNext[GET] Get Batch

Last updated 6 months ago

The ID of the workspace to add this batch to. Note, each workspace processes a specific - since a batch is tied to its workspace, all tasks in the batch will have the same Task Type as the workspace. If not specified, the default workspace in your tenant is used.

You can use the request to create tasks and add them to a previously created Batch.

Create Task
Task Type