Skip to content

Files

Latest commit

 

History

History
594 lines (402 loc) · 20.9 KB

WorkflowApi.md

File metadata and controls

594 lines (402 loc) · 20.9 KB

ultracart\v2\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

\ultracart\v2\models\WorkflowAgentAuthResponse getWorkflowAgentWebsocketAuthorization()

Get agent websocket authorization

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getWorkflowAgentWebsocketAuthorization();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowAgentWebsocketAuthorization: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\WorkflowAgentAuthResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowAssignmentGroups

\ultracart\v2\models\WorkflowGroupsResponse getWorkflowAssignmentGroups($_limit, $_offset)

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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$_limit = 100; // int | The maximum number of records to return on this one API call. (Max 200)
$_offset = 0; // int | Pagination of the record set.  Offset is a zero based index.

try {
    $result = $apiInstance->getWorkflowAssignmentGroups($_limit, $_offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowAssignmentGroups: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\ultracart\v2\models\WorkflowGroupsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowAssignmentUsers

\ultracart\v2\models\WorkflowUsersResponse getWorkflowAssignmentUsers($_limit, $_offset)

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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$_limit = 100; // int | The maximum number of records to return on this one API call. (Max 200)
$_offset = 0; // int | Pagination of the record set.  Offset is a zero based index.

try {
    $result = $apiInstance->getWorkflowAssignmentUsers($_limit, $_offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowAssignmentUsers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\ultracart\v2\models\WorkflowUsersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowMe

\ultracart\v2\models\WorkflowUserResponse getWorkflowMe()

Retrieve a user object for myself

Retrieve a user object for myself

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getWorkflowMe();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowMe: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\WorkflowUserResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTask

\ultracart\v2\models\WorkflowTaskResponse getWorkflowTask($task_uuid)

Retrieve a workflow task

Retrieve a workflow task

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$task_uuid = "task_uuid_example"; // string | 

try {
    $result = $apiInstance->getWorkflowTask($task_uuid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTask: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
task_uuid string

Return type

\ultracart\v2\models\WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTaskAttachmentUploadUrl

\ultracart\v2\models\WorkflowAttachmentUploadUrlResponse getWorkflowTaskAttachmentUploadUrl($extension)

Get a presigned workflow task attachment upload URL

Get a presigned workflow task attachment upload URL

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$extension = "extension_example"; // string | 

try {
    $result = $apiInstance->getWorkflowTaskAttachmentUploadUrl($extension);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTaskAttachmentUploadUrl: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
extension string

Return type

\ultracart\v2\models\WorkflowAttachmentUploadUrlResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTaskByObjectType

\ultracart\v2\models\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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$object_type = "object_type_example"; // string | 
$object_id = "object_id_example"; // string | 

try {
    $result = $apiInstance->getWorkflowTaskByObjectType($object_type, $object_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTaskByObjectType: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
object_type string
object_id string

Return type

\ultracart\v2\models\WorkflowTasksResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTaskOpenCount

\ultracart\v2\models\WorkflowTaskOpenCountResponse getWorkflowTaskOpenCount()

Retrieve workflow task open count

Retrieve workflow task open count

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getWorkflowTaskOpenCount();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTaskOpenCount: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\WorkflowTaskOpenCountResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTaskTags

\ultracart\v2\models\WorkflowTaskTagsResponse getWorkflowTaskTags()

Get a list of existing workflow task tags

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getWorkflowTaskTags();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTaskTags: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\WorkflowTaskTagsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflowTasks

\ultracart\v2\models\WorkflowTasksResponse getWorkflowTasks($workflow_tasks_query, $_limit, $_offset, $_sort)

Search workflow tasks

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$workflow_tasks_query = new \ultracart\v2\models\WorkflowTasksRequest(); // \ultracart\v2\models\WorkflowTasksRequest | Workflow tasks query
$_limit = 100; // int | The maximum number of records to return on this one API call. (Default 100, Max 500)
$_offset = 0; // int | 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.

try {
    $result = $apiInstance->getWorkflowTasks($workflow_tasks_query, $_limit, $_offset, $_sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->getWorkflowTasks: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
workflow_tasks_query \ultracart\v2\models\WorkflowTasksRequest Workflow tasks query
_limit int The maximum number of records to return on this one API call. (Default 100, Max 500) [optional] [default to 100]
_offset int 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

\ultracart\v2\models\WorkflowTasksResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

insertWorkflowTask

\ultracart\v2\models\WorkflowTaskResponse insertWorkflowTask($workflow_task)

Insert a workflow task

Insert a workflow task

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$workflow_task = new \ultracart\v2\models\WorkflowTask(); // \ultracart\v2\models\WorkflowTask | workflow task

try {
    $result = $apiInstance->insertWorkflowTask($workflow_task);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->insertWorkflowTask: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
workflow_task \ultracart\v2\models\WorkflowTask workflow task

Return type

\ultracart\v2\models\WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWorkflowTask

\ultracart\v2\models\WorkflowTaskResponse updateWorkflowTask($task_uuid, $workflow_task)

Update a workflow task

Update a workflow task

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\WorkflowApi::usingApiKey($simple_key);

$task_uuid = "task_uuid_example"; // string | 
$workflow_task = new \ultracart\v2\models\WorkflowTask(); // \ultracart\v2\models\WorkflowTask | Workflow task

try {
    $result = $apiInstance->updateWorkflowTask($task_uuid, $workflow_task);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowApi->updateWorkflowTask: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
task_uuid string
workflow_task \ultracart\v2\models\WorkflowTask Workflow task

Return type

\ultracart\v2\models\WorkflowTaskResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]