# Process Templates

**Process Templates** are the official name of processes that have been created for your organization.

{% hint style="danger" %}
Dont forget to include the **Authorization** and **X-Organization** headers in every request. They have been omitted from these endpoints for brevity.&#x20;
{% endhint %}

## Basic Endpoints

These endpoints allow you to index, view, update and delete process templates.

## Index

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/basic`

This endpoint retrieves the process templates that your account has permissions to see.

#### Path Parameters

| Name       | Type   | Description                                                                    |
| ---------- | ------ | ------------------------------------------------------------------------------ |
| launchable | string | If true, include only processes your user has permissions to create cases for. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Index - API Launchable

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/basic/launchables`

This endpoint retrieves the process templates that your account has permissions to see and create cases for **via the API**.

{% tabs %}
{% tab title="200 Process templates successfully retrieved." %}

```
{
    "process_templates": [
        {
            "name": "Time-off Requests",
            "uuid": "5c7549b6-3f7b-4c96-8346-141326da5cf0",
            "launchable": true,
            "resource_type": "process",
            "automated": true
        }
    ]
}

```

{% endtab %}
{% endtabs %}

## Index - Automated Processes

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/basic/automated_processes`

This endpoint retrieves the process templates in your organization that have been automated. You must have the ***EDIT\_PROCESSES*** permission in order to access this method.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Show Process Template

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/basic/:template_uuid`

This endpoint retrieves a specific process template that your account has permissions to see.

#### Path Parameters

| Name           | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| template\_uuid | string | UUID of the process template |

{% tabs %}
{% tab title="200 Process templates successfully retrieved." %}

```
{
    "process_template": {
        "name": "Time-off Requests",
        "uuid": "5c7549b6-3f7b-4c96-8346-141326da5cf0",
        "automated": true
    },
    "can_launch": true
}
```

{% endtab %}
{% endtabs %}

## Update Process Template

<mark style="color:orange;">`PUT`</mark> `https://api.seliom.com/process_templates/basic/:template_uuid`

Updates a given process template's name

#### Path Parameters

| Name           | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| template\_uuid | string | UUID of the process template |

#### Request Body

| Name | Type   | Description                       |
| ---- | ------ | --------------------------------- |
| name | string | New name for the process template |

{% tabs %}
{% tab title="200 Process templates successfully retrieved." %}

```
{
    "message": "Process updated successfully!"
}
```

{% endtab %}
{% endtabs %}

## Delete Process Template

<mark style="color:red;">`DELETE`</mark> `https://api.seliom.com/process_templates/directory/:template_uuid`

Deletes the given process template

#### Path Parameters

| Name           | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| template\_uuid | string | UUID of the process template |

{% tabs %}
{% tab title="200 Process templates successfully retrieved." %}

```
{
    "message": "You have successfully deleted the process"
}
```

{% endtab %}
{% endtabs %}

## Automation Endpoints

These endpoints allow you to request the information required by a process template in order to create a **case** for it.

## Start Definition

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/automation/:template_uuid/start_definition`

This endpoint retrieves the information required by the **start node** of a process template in order to create a case for it.

#### Path Parameters

| Name           | Type   | Description                  |
| -------------- | ------ | ---------------------------- |
| template\_uuid | string | UUID of the process template |

{% tabs %}
{% tab title="200 The response from the start definition." %}

```
{
    "process_template": {
        "name": "Time-off Requests",
        "uuid": "5c7549b6-3f7b-4c96-8346-141326da5cf0"
    }, 
    "manual_label": true,
    "definition_elements": [
        {
            "definition": {
                "label": "Start Date",
                "identifier": "0e49e482-b6f0-4f28-8a59-b5c506620760",
                "type": "date",
                "assignedID": "start_date",
                "required": true
            }
        },
        {
            "definition": {
                "label": "End Date",
                "identifier": "ad219870-183f-427c-b4c3-f2454447ecb6",
                "type": "date",
                "assignedID": "end_date",
                "required": true
            }
        }
    ]

```

{% endtab %}
{% endtabs %}

## Team Members - Start Definition

<mark style="color:blue;">`GET`</mark> `https://api.seliom.com/process_templates/automation/:template_uuid/definition_element/:definition_element_uuid/members`

Team member form fields require another request in order to retrieve the list of users that can be selected from the dropdown menu.

#### Path Parameters

| Name                      | Type   | Description                                                |
| ------------------------- | ------ | ---------------------------------------------------------- |
| definition\_element\_uuid | string | The UUID of the definition element of type *team\_members* |
| template\_uuid            | string | UUID of the process template                               |

{% tabs %}
{% tab title="200 The response from the start definition." %}

```
{
    "members": [
        {
            "uuid": "3cd4ca21-fa4d-4bed-9217-fb495c748d0c",
            "first_name": "Clark",
            "last_name": "Kent",
            "invitation_status": "accepted",
            "deleted": false,
            "slug": "clark-kent"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seliom.com/api/process-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
