Using Actions

Overview

Actions provide a way to complete simple tasks like adding tags or notes to applications, setting job statuses and posting dashboard notifications solely via API.

Available Actions

You may retrieve a list of available actions by making a GET request to https://api.applicant-tracking.com/api/v1/workflow/actions. The payload will be an array of action types and the required or optional data for each action type:

[
  {
    "tag_app": {
      "create_trigger": {
        "required_data": {
          "tag_text": {
            "type": "string"
          }
        }
      },
      "create_action": {
        "required_data": {
          "app_id": {
            "type": "integer"
          },
          "tag_text": {
            "type": "string"
          }
        }
      }
    }
  }
]

Action Data

Each action type requires a different set of data in order to execute. As you can see from the payload above, in order to create an action that will tag an application, you must supply an app_id in the form of an integer and tag_text in the from of a string. (Creating triggers will be covered in a separate article.)

Creating an Action

Now that you know the required data for the action you'd like to create, you can make the request. Make a POST request to https://api.applicant-tracking.com/api/v1/actions with the following body:

{
  "type": "tag_app",
  "data": {
  	"app_id": 1,
  	"tag_text": "Tagging an app via API!"
  }
}

A successful request will return data about the action you've created:

{
  "id": "1",
  "company_id": "1",
  "trigger_id": null,
  "type": "TagApp",
  "data": {
    "app_id": 1,
    "tag_text": "Tagging an app via API!"
  },
  "executed_at": null,
  "created_at": "2020-02-13T16:42:00Z",
  "updated_at": "2020-02-13T16:42:00Z"
}

Action Execution

Note that the value for executed_at is null in the response above. This is because actions are executed asynchronously, and the execution will not have happened yet when you receive the response. Once an action is executed, the executed_at attribute will be updated.

In order to check the status of your action, use the action's id attribute to make a GET request to https://api.applicant-tracking.com/api/v1/actions/:id. You will be able to see when the action was executed:

{
  "id": "1",
  "company_id": "1",
  "trigger_id": null,
  "type": "TagApp",
  "data": {
    "app_id": 1,
    "tag_text": "Tagging an app via API!"
  },
  "executed_at": "2020-02-13T16:52:43Z",
  "created_at": "2020-02-13T16:42:00Z",
  "updated_at": "2020-02-13T16:52:43Z"
}