Get workflow by id
curl --request GET \
--url https://api.orion.file.ai/prod/v1/workflows/{workflowId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orion.file.ai/prod/v1/workflows/{workflowId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orion.file.ai/prod/v1/workflows/{workflowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orion.file.ai/prod/v1/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.orion.file.ai/prod/v1/workflows/{workflowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.orion.file.ai/prod/v1/workflows/{workflowId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"workflow": {
"id": "649e2d2d2d2d2d2d2d2d2d2d",
"name": "PO <> Invoice",
"description": "Match purchase orders to invoices",
"status": "active",
"createdAt": "2024-10-18T16:45:50.064Z",
"updatedAt": "2024-10-18T16:45:50.064Z",
"workflowSteps": [
{
"id": "649e2d2d2d2d2d2d2d2d2d2e",
"stepType": "MATCH_COMPARE",
"stepExecutionOrder": 0,
"stepExecutionLevel": "DOCUMENT",
"status": "active"
}
]
}
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/not-found",
"title": "Not found",
"status": 404,
"detail": "Workflow with id 649e2d2d2d2d2d2d2d2d2d2d not found",
"instance": "/v1/{route}",
"code": "NOT_FOUND",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Workflow with id 649e2d2d2d2d2d2d2d2d2d2d not found",
"error": "Not Found",
"statusCode": 404
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "Invalid workflowId.",
"instance": "/v1/{route}",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Invalid workflowId.",
"error": "Unprocessable Entity",
"statusCode": 422
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}Endpoints
Get workflow by id
Retrieve a single workflow by its ID within the current organization and workspace.
The response includes workflow metadata and a summary of each workflow step (id, type, execution order, and level). Internal step configuration is not exposed.
GET
/
prod
/
v1
/
workflows
/
{workflowId}
Get workflow by id
curl --request GET \
--url https://api.orion.file.ai/prod/v1/workflows/{workflowId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orion.file.ai/prod/v1/workflows/{workflowId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orion.file.ai/prod/v1/workflows/{workflowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orion.file.ai/prod/v1/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.orion.file.ai/prod/v1/workflows/{workflowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.orion.file.ai/prod/v1/workflows/{workflowId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orion.file.ai/prod/v1/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"workflow": {
"id": "649e2d2d2d2d2d2d2d2d2d2d",
"name": "PO <> Invoice",
"description": "Match purchase orders to invoices",
"status": "active",
"createdAt": "2024-10-18T16:45:50.064Z",
"updatedAt": "2024-10-18T16:45:50.064Z",
"workflowSteps": [
{
"id": "649e2d2d2d2d2d2d2d2d2d2e",
"stepType": "MATCH_COMPARE",
"stepExecutionOrder": 0,
"stepExecutionLevel": "DOCUMENT",
"status": "active"
}
]
}
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/not-found",
"title": "Not found",
"status": 404,
"detail": "Workflow with id 649e2d2d2d2d2d2d2d2d2d2d not found",
"instance": "/v1/{route}",
"code": "NOT_FOUND",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Workflow with id 649e2d2d2d2d2d2d2d2d2d2d not found",
"error": "Not Found",
"statusCode": 404
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "Invalid workflowId.",
"instance": "/v1/{route}",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [],
"message": "Invalid workflowId.",
"error": "Unprocessable Entity",
"statusCode": 422
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}{
"type": "https://errors.file.ai/validation-failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields are invalid.",
"instance": "/v1/files/upload",
"code": "VALIDATION_FAILED",
"requestId": "0f1c8e03-978e-40d5-bc93-6894a57f9324",
"errors": [
{
"code": "REQUIRED",
"detail": "must not be empty",
"pointer": "#/fileName",
"parameter": "limit"
}
],
"message": "Validation failed",
"error": "Unprocessable Entity",
"statusCode": 422,
"retryAfter": 42
}Retrieve a single workflow by its ID within the organization and workspace bound
to your API key.
See Error responses for the response shape.
Request Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workflowId | string | Yes | The ID of the workflow |
Response Structure
Workflow Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique workflow identifier |
| name | string | Workflow name |
| description | string | Workflow description |
| status | string | Workflow status (e.g. active) |
| workflowSteps | array | Summary of each step in the workflow |
| createdAt | string | ISO 8601 timestamp of creation |
| updatedAt | string | ISO 8601 timestamp of last update |
Workflow Step Summary
| Field | Type | Description |
|---|---|---|
| id | string | Unique step identifier |
| stepType | string | Step type (e.g. MATCH_COMPARE) |
| stepExecutionOrder | number | Zero-based position of the step in the workflow |
| stepExecutionLevel | string | Level the step executes at (e.g. DOCUMENT) |
| status | string | Step status (e.g. active) |
Only the step summary is exposed. Internal step configuration is not returned
by the public API.
Example Response
{
"workflow": {
"id": "649e2d2d2d2d2d2d2d2d2d2d",
"name": "PO <> Invoice",
"description": "Match purchase orders to invoices",
"status": "active",
"createdAt": "2024-10-18T16:45:50.064Z",
"updatedAt": "2024-10-18T16:45:50.064Z",
"workflowSteps": [
{
"id": "649e2d2d2d2d2d2d2d2d2d2e",
"stepType": "MATCH_COMPARE",
"stepExecutionOrder": 0,
"stepExecutionLevel": "DOCUMENT",
"status": "active"
}
]
}
}
Errors
| Status | Meaning |
|---|---|
| 404 | No workflow with that ID exists in this workspace |
| 422 | workflowId is not a valid identifier |
⌘I