Skip to content

[PATCH] External Integration Status⚓︎

Use this request to set the External Integration Status of a task to a specific string value.

This request is usuful to identity and filter tasks that have already been integrated with your external system. You can set a custom status on the tasks that have already been integrated, and then filter them out on further requests according to their externalIntegrationStatus.

You can use the GET Task Status List or GET Task Status List Paginated requests to filter tasks that have the specific externalIntegrationStatus you set.

A successful request sets the value of ExternalIntegrationStatus to the value sent in the body.

Value of ExternalIntegrationStatus is reset if the task is reprocessed/recovered

Note that all reprocessed or recovered tasks will have the value of ExternalIntegrationStatus reset to the default of never, so you can re-track them in your external system.

External Integration Status⚓︎

PATCH/api/v1.0/external/sdtask/externalIntegrationStatus?taskId=104

Query Parameters⚓︎

NameTypeDescription
taskIdinteger (optional)The ID that identifies the task to reprocess. This ID is always unique and never changes after it has been created.
externalIdstring (optional)An optional External ID, valid for your organization and added to the Task at creation that uniquely identifies it in your Organization.

At least one of taskId or externalId must be specified. (What is an external id)

Body application/json PatchExternalIntegrationStatusRequest⚓︎

Name Type Description
externalIntegrationStatus string The external integration status to set. Must not be null, whitespace or longer than 32 characters.

See External Integration Status for more reference about this status.

Example Request (by taskId)⚓︎

curl --location --request PATCH 'https://cloud.smartdocumentor.net/api/v1.0/sdtask/externalIntegrationStatus?taskId=1234' \
--header 'Authorization: Bearer null' \
--header 'Content-Type: application/json' \
--data '{
    "externalIntegrationStatus": "my-custom-status",
}'
var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Patch, "https://cloud.smartdocumentor.net/api/v1.0/sdtask/externalIntegrationStatus?taskId=1234");
request.Headers.Add("Authorization", "Bearer null");

var content = new StringContent("{\"externalIntegrationStatus\": \"my-custom-status\"}", 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/sdtask/externalIntegrationStatus?taskId=1234"

payload = json.dumps({
  "externalIntegrationStatus": "my-custom-status"
})
headers = {
  'Authorization': 'Bearer null',
  'Content-Type': 'application/json'
}

response = requests.request("PATCH", 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({
    "externalIntegrationStatus": "my-custom-status",
});

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

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

Example Request (by externalId)⚓︎

curl --location --request PATCH 'https://cloud.smartdocumentor.net/api/v1.0/sdtask/externalIntegrationStatus?externalId={externalId}' \
--header 'Authorization: Bearer null' \
--header 'Content-Type: application/json' \
--data '{
    "externalIntegrationStatus": "my-custom-status",
}'
var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Patch, "https://cloud.smartdocumentor.net/api/v1.0/sdtask/externalIntegrationStatus?externalId={externalId}");
request.Headers.Add("Authorization", "Bearer null");

var content = new StringContent("{\"externalIntegrationStatus\": \"my-custom-status\"}", 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/sdtask/externalIntegrationStatus?externalId={externalId}"

payload = json.dumps({
  "externalIntegrationStatus": "my-custom-status"
})
headers = {
  'Authorization': 'Bearer null',
  'Content-Type': 'application/json'
}

response = requests.request("PATCH", 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({
    "externalIntegrationStatus": "my-custom-status",
});

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

fetch("https://cloud.smartdocumentor.net/api/v1.0/sdtask/externalIntegrationStatus?externalId={externalId}", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Responses⚓︎

Response body has no content.

Info

Note Returned when the patch request is accepted successfully.

Response body has no content.

Info

Note Returned when no Task was found with the specified taskId or externalId.

Response body has no content.

Info

Note Returned when a taskId or externalId are not specified, or the externalIntegrationStatus is not set to a valid value.