Skip to content

Latest commit

 

History

History
620 lines (420 loc) · 19.2 KB

WorkflowApi.md

File metadata and controls

620 lines (420 loc) · 19.2 KB

UltraCartRestApiV2.WorkflowApi

All URIs are relative to https://secure.ultracart.com/rest/v2

Method HTTP request Description
getWorkflowAgentWebsocketAuthorization PUT /workflow/agent/auth Get agent websocket authorization
getWorkflowAssignmentGroups GET /workflow/assignment_groups Retrieve a list of groups that workflow tasks can be assigned to
getWorkflowAssignmentUsers GET /workflow/assignment_users Retrieve a list of users that workflow tasks can be assigned to
getWorkflowMe GET /workflow/me Retrieve a user object for myself
getWorkflowTask GET /workflow/tasks/{task_uuid} Retrieve a workflow task
getWorkflowTaskAttachmentUploadUrl GET /workflow/tasks/attachments/{extension} Get a presigned workflow task attachment upload URL
getWorkflowTaskByObjectType GET /workflow/tasks/by/{object_type}/{object_id} Retrieve a workflow task by object type and id
getWorkflowTaskOpenCount GET /workflow/tasks/open_count Retrieve workflow task open count
getWorkflowTaskTags GET /workflow/tasks/tags Get a list of existing workflow task tags
getWorkflowTasks POST /workflow/tasks/search Search workflow tasks
insertWorkflowTask POST /workflow/tasks Insert a workflow task
updateWorkflowTask PUT /workflow/tasks/{task_uuid} Update a workflow task

getWorkflowAgentWebsocketAuthorization

WorkflowAgentAuthResponse getWorkflowAgentWebsocketAuthorization()

Get agent websocket authorization

Retrieve a JWT to authorize an agent to make a websocket connection.

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowAgentWebsocketAuthorization(callback);

Parameters

This endpoint does not need any parameter.

Return type

WorkflowAgentAuthResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowAssignmentGroups

WorkflowGroupsResponse getWorkflowAssignmentGroups(opts)

Retrieve a list of groups that workflow tasks can be assigned to

Retrieve a list of groups that workflow tasks can be assigned to

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var opts = { 
  '_limit': 100, // Number | The maximum number of records to return on this one API call. (Max 200)
  '_offset': 0 // Number | Pagination of the record set.  Offset is a zero based index.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowAssignmentGroups(opts, callback);

Parameters

Name Type Description Notes
_limit Number The maximum number of records to return on this one API call. (Max 200) [optional] [default to 100]
_offset Number Pagination of the record set. Offset is a zero based index. [optional] [default to 0]

Return type

WorkflowGroupsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowAssignmentUsers

WorkflowUsersResponse getWorkflowAssignmentUsers(opts)

Retrieve a list of users that workflow tasks can be assigned to

Retrieve a list of users that workflow tasks can be assigned to

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var opts = { 
  '_limit': 100, // Number | The maximum number of records to return on this one API call. (Max 200)
  '_offset': 0 // Number | Pagination of the record set.  Offset is a zero based index.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowAssignmentUsers(opts, callback);

Parameters

Name Type Description Notes
_limit Number The maximum number of records to return on this one API call. (Max 200) [optional] [default to 100]
_offset Number Pagination of the record set. Offset is a zero based index. [optional] [default to 0]

Return type

WorkflowUsersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowMe

WorkflowUserResponse getWorkflowMe()

Retrieve a user object for myself

Retrieve a user object for myself

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowMe(callback);

Parameters

This endpoint does not need any parameter.

Return type

WorkflowUserResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTask

WorkflowTaskResponse getWorkflowTask(task_uuid)

Retrieve a workflow task

Retrieve a workflow task

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var task_uuid = "task_uuid_example"; // String | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTask(task_uuid, callback);

Parameters

Name Type Description Notes
task_uuid String

Return type

WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTaskAttachmentUploadUrl

WorkflowAttachmentUploadUrlResponse getWorkflowTaskAttachmentUploadUrl(extension)

Get a presigned workflow task attachment upload URL

Get a presigned workflow task attachment upload URL

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var extension = "extension_example"; // String | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTaskAttachmentUploadUrl(extension, callback);

Parameters

Name Type Description Notes
extension String

Return type

WorkflowAttachmentUploadUrlResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTaskByObjectType

WorkflowTasksResponse getWorkflowTaskByObjectType(object_type, object_id)

Retrieve a workflow task by object type and id

Retrieve a workflow task by object type and id

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var object_type = "object_type_example"; // String | 

var object_id = "object_id_example"; // String | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTaskByObjectType(object_type, object_id, callback);

Parameters

Name Type Description Notes
object_type String
object_id String

Return type

WorkflowTasksResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTaskOpenCount

WorkflowTaskOpenCountResponse getWorkflowTaskOpenCount()

Retrieve workflow task open count

Retrieve workflow task open count

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTaskOpenCount(callback);

Parameters

This endpoint does not need any parameter.

Return type

WorkflowTaskOpenCountResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTaskTags

WorkflowTaskTagsResponse getWorkflowTaskTags()

Get a list of existing workflow task tags

Retrieves a unique list of all the existing workflow task tags.

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTaskTags(callback);

Parameters

This endpoint does not need any parameter.

Return type

WorkflowTaskTagsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getWorkflowTasks

WorkflowTasksResponse getWorkflowTasks(workflow_tasks_query, opts)

Search workflow tasks

Retrieves a set of workflow tasks from the account based on a query object.

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var workflow_tasks_query = new UltraCartRestApiV2.WorkflowTasksRequest(); // WorkflowTasksRequest | Workflow tasks query

var opts = { 
  '_limit': 100, // Number | The maximum number of records to return on this one API call. (Default 100, Max 500)
  '_offset': 0, // Number | Pagination of the record set.  Offset is a zero based index.
  '_sort': "_sort_example" // String | The sort order of the items.  See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getWorkflowTasks(workflow_tasks_query, opts, callback);

Parameters

Name Type Description Notes
workflow_tasks_query WorkflowTasksRequest Workflow tasks query
_limit Number The maximum number of records to return on this one API call. (Default 100, Max 500) [optional] [default to 100]
_offset Number Pagination of the record set. Offset is a zero based index. [optional] [default to 0]
_sort String The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. [optional]

Return type

WorkflowTasksResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

insertWorkflowTask

WorkflowTaskResponse insertWorkflowTask(workflow_task)

Insert a workflow task

Insert a workflow task

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var workflow_task = new UltraCartRestApiV2.WorkflowTask(); // WorkflowTask | workflow task


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.insertWorkflowTask(workflow_task, callback);

Parameters

Name Type Description Notes
workflow_task WorkflowTask workflow task

Return type

WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateWorkflowTask

WorkflowTaskResponse updateWorkflowTask(task_uuid, workflow_task)

Update a workflow task

Update a workflow task

Example

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
var simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
UltraCartRestApiV2.ApiClient.usingApiKey(simpleKey, false)
var apiInstance = new UltraCartRestApiV2.WorkflowApi();


var task_uuid = "task_uuid_example"; // String | 

var workflow_task = new UltraCartRestApiV2.WorkflowTask(); // WorkflowTask | Workflow task


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateWorkflowTask(task_uuid, workflow_task, callback);

Parameters

Name Type Description Notes
task_uuid String
workflow_task WorkflowTask Workflow task

Return type

WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json