{
  "openapi": "3.0.1",
  "info": {
    "title": "Integration Hub API 3.0",
    "version": "3.0",
    "description": "This API allows for the integration and management of files within the Adra Suite, supporting both upload and download operations.",
    "contact": {
      "name": "API Support",
      "url": "https://success.adra.com/s/",
      "email": "support@adra.com"
    },
    "license": {
      "name": "Propietary License",
      "url": "https://www.trintech.com/terms-and-conditions/adra/"
    },
    "x-feedbackLink": {
      "url": "https://success.adra.com/s/resources/ideas",
      "label": "Give Feedback"
    }
  },
  "servers": [
    {
      "url": "https://integrationhub.adra.com",
      "description": "Production server"
    },
    {
      "url": "https://integrationhub.adrastage.com",
      "description": "Stage server"
    },
    {
      "url": "https://integrationhub.adratest.com",
      "description": "Test server"
    },
    {
      "url": "https://integrationhub.adradev.com",
      "description": "Dev server"
    }
  ],
  "tags": [
    {
      "name": "Files",
      "description": "Operations related to file management in the Adra Suite."
    }
  ],
  "externalDocs": {
    "description": "Adra Success Center",
    "url": "https://success.adra.com/s/article/Setup-User-Access-Page"
  },
  "paths": {
    "/api/v3.0/{engagementSid}/files/{inboundFileCategory}/{suggestedFileName}": {
      "post": {
        "tags": ["Files"],
        "summary": "Data upload endpoint for inbound files to Adra Suite",
        "description": "Upload a file to the Integration Hub for processing in Adra Suite. This endpoint supports various file types depending on the inboundFileCategory.\n\n### File Size Limits\n- Maximum file size: 100 MB\n\n### Required Headers\n- `Authorization`: Bearer token for authentication\n- `User-Agent`: Client identifier\n- `Content-Length`: File size in bytes\n\n### Optional Headers\n- `Content-Type`: File MIME type\n- `Last-Modified`: File's last modification timestamp\n\n### Processing\nAfter upload, the file will be:\n1. Validated for format and content\n2. Queued for processing\n3. Processed according to the inboundFileCategory\n\nUse the status endpoint to track the processing status using the returned uniqueFileName.",
        "operationId": "UploadInboundFile",
        "parameters": [
          {
            "name": "engagementSid",
            "in": "path",
            "description": "Short identifier for engagement (as in URLs)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inboundFileCategory",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/InboundFileCategory"
            }
          },
          {
            "name": "suggestedFileName",
            "in": "path",
            "description": "The name of the file with extension. Must not exceed 380 characters.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "description": "A string that enables identifying the client. Logic-Apps, Boomi, Postman, and other integration tools add this automatically. (required)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Length",
            "in": "header",
            "description": "The number of bytes for the file being uploaded (required)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-State",
            "in": "header",
            "description": "Optional HTTP header to denote state of the file.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Gw-Stloc-Hint",
            "in": "header",
            "description": "Optional HTTP header to optimize request routing and reduce latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East), USEA-01 (East US), NO01 (Norway East).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Upload file's content-type (optional)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Modified",
            "in": "header",
            "description": "Upload file's last modified date (optional)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request: see problem details for more information",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: Missing an authorization header or token, or the token has expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: You don't have access to the engagement, the engagement doesn't have IH or you don't have IH access on the engagement, or the client is trying to access an unauthorized tenant resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "noAccess": {
                    "summary": "No access to engagement",
                    "value": {
                      "type": "https://adra.com/errors/forbidden",
                      "title": "Forbidden",
                      "status": 403,
                      "detail": "You don't have access to the engagement, the engagement doesn't have IH or you don't have IH access on the engagement"
                    }
                  },
                  "unauthorizedTenant": {
                    "summary": "Unauthorized tenant access",
                    "value": {
                      "type": "https://adra.com/errors/forbidden",
                      "title": "Forbidden",
                      "status": 403,
                      "detail": "The client is trying to access an unauthorized tenant resource"
                    }
                  }
                }
              }
            }
          },
          "411": {
            "description": "Length Required: The file length information needs to be provided",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large: The file is too big, needs to be under 100 MB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "adra_personal_access_token": ["integrationhub_api.upload"],
            "adra_oauth_code_pkce": ["integrationhub_api.upload"],
            "adra_oauth_client_cred": ["integrationhub_api.upload"]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --http1.1 -X POST \\\n  'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx' \\\n  -H 'Authorization: Bearer YOUR_TOKEN' \\\n  -H 'User-Agent: MyAgent/1.1' \\\n  -H 'Content-Type: */*' \\\n  -H 'Content-Length: 1234' \\\n  --data-binary '@/path/to/your/file.xlsx' \\\n  -k \\\n  -v"
          },
          {
            "lang": "python",
            "source": "import requests\n\nurl = 'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx'\nheaders = {\n    'Authorization': 'Bearer YOUR_TOKEN',\n    'User-Agent': 'MyAgent/1.1',\n    'Content-Type': '*/*'\n}\n\nwith open('/path/to/your/file.xlsx', 'rb') as f:\n    response = requests.post(url, headers=headers, data=f, verify=False)\n\nprint(response.json())"
          },
          {
            "lang": "csharp",
            "label": "C# HttpClient",
            "source": "using System.Net.Http.Headers;\nusing System.Text.Json;\nusing IdentityModel.Client;\n\nvar baseAddress = \"https://integrationhub.adra.com/api/v3.0/\";\nvar engagementSid = \"YOUR_ENGAGEMENT_SID\";\nvar suggestedFileName = \"YOUR_FILE_NAME.txt\";\nvar fileCategory = \"BalancerBalanceUpload\";\nvar mediaTypeHeaderValue = \"text/plain\";\nvar uploadServiceUrl = \"{engagementSid}/files/{fileCategory}/{fileName}\";\nvar token = \"YOUR_TOKEN\";\nvar filePath = Path.Combine(\"TestData\", suggestedFileName);\n\nusing HttpClient httpClient = new()\n{\n    BaseAddress = new Uri(baseAddress)\n};\nhttpClient.SetBearerToken(token);\nhttpClient.DefaultRequestHeaders.Add(\"User-Agent\", \"integrationtest.agent\");\n\nvar uploadUrl = uploadServiceUrl\n    .Replace(\"{engagementSid}\", engagementSid, StringComparison.InvariantCulture)\n    .Replace(\"{fileCategory}\", fileCategory, StringComparison.InvariantCulture)\n    .Replace(\"{fileName}\", suggestedFileName, StringComparison.InvariantCulture);\n\nStream fileStream = new FileStream(filePath, FileMode.Open);\nusing var streamContent = new StreamContent(fileStream);\nstreamContent.Headers.ContentType = new MediaTypeHeaderValue(mediaTypeHeaderValue);\n\nHttpResponseMessage response = await httpClient.PostAsync(uploadUrl, streamContent);\nresponse.EnsureSuccessStatusCode();\nvar responseString = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(responseString);"
          },
          {
            "lang": "powershell",
            "label": "PowerShell",
            "source": "Invoke-WebRequest -Method 'POST' `\n  -Uri 'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx' `\n  -Headers @{\n    'Authorization' = 'Bearer YOUR_TOKEN'\n    'User-Agent' = 'MyAgent/1.1'\n    'Content-Type' = '*/*'\n  } `\n  -InFile '/path/to/your/file.xlsx' `\n  -Verbose"
          }
        ]
      }
    },
    "/api/v3.0/{engagementSid}/files/{outboundFileCategory}/{uniqueFileName}": {
      "get": {
        "tags": ["Files"],
        "summary": "Data download endpoint for outbound files",
        "description": "Download a file from Integration Hub. This endpoint allows you to retrieve files that have been created by Adra.\n\n### Response Format\n- Returns file as binary stream\n- Content-Type matches the original file format\n- Headers include:\n  - `Content-Length`: File size in bytes\n  - `Content-Type`: File MIME type\n  - `Last-Modified`: Timestamp of last modification\n  - `ETag`: File version identifier\n\n### Common Use Cases\n1. Downloading created reports\n2. Retrieving journal entries \n\n### Error Handling\n- 404: File not found or deleted\n- 403: Insufficient permissions\n- 401: Invalid or expired token\n\n### Best Practices\n- Cache files using ETag header\n- Implement retry logic with exponential backoff\n- Handle large files with streaming",
        "operationId": "GetFileStream",
        "parameters": [
          {
            "name": "engagementSid",
            "in": "path",
            "description": "Short identifier for engagement (as in URLs)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outboundFileCategory",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/OutboundFileCategory"
            }
          },
          {
            "name": "uniqueFileName",
            "in": "path",
            "description": "The name of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Gw-Stloc-Hint",
            "in": "header",
            "description": "Optional HTTP header to optimize request routing and reduce latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East), USEA-01 (East US), NO01 (Norway East).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Modified-Since",
            "in": "header",
            "description": "Browser cache instruction (optional)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "description": "Browser cache instruction (optional).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Unmodified-Since",
            "in": "header",
            "description": "Browser cache instruction (optional).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "Browser cache instruction (optional).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "description": "The file's ETag (hash)",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "description": "The file's modified date",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not modified",
            "headers": {
              "ETag": {
                "description": "The file's ETag (hash)",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "description": "The file's modified date",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request: see problem details for more information",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: Missing an authorization header or token, or the token has expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: You don't have access to the engagement, the engagement doesn't have IH or you don't have IH access on the engagement, or the client is trying to access an unauthorized tenant resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "noAccess": {
                    "summary": "No access to engagement",
                    "value": {
                      "type": "https://adra.com/errors/forbidden",
                      "title": "Forbidden",
                      "status": 403,
                      "detail": "You don't have access to the engagement, the engagement doesn't have IH or you don't have IH access on the engagement"
                    }
                  },
                  "unauthorizedTenant": {
                    "summary": "Unauthorized tenant access",
                    "value": {
                      "type": "https://adra.com/errors/forbidden",
                      "title": "Forbidden",
                      "status": 403,
                      "detail": "The client is trying to access an unauthorized tenant resource"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed: Access control list (ACL) validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "adra_personal_access_token": ["integrationhub_api.download"],
            "adra_oauth_code_pkce": ["integrationhub_api.download"],
            "adra_oauth_client_cred": ["integrationhub_api.download"]
          }
        ]
      }
    },
    "/api/v3.0/{engagementSid}/files/{inboundFileCategory}/{uniqueFileName}/status": {
      "get": {
        "tags": ["Files"],
        "summary": "Endpoint for getting the status for inbound files",
        "description": "Check the processing status of a file previously uploaded to Integration Hub. This endpoint allows you to track the progress of file processing.\n\n### Status Flow\nFiles progress through the following states:\n1. `Receiving`: Initial upload in progress\n2. `Queued`: File received and waiting for processing\n3. `Processing`: File is being validated and processed\n4. `WaitingInteraction`: Processing paused, waiting for user input\n5. `PartiallySucceeded`: Some records processed with errors\n6. `Succeeded`: All records processed successfully\n7. `Failed`: Processing failed\n8. `Discarded`: File processing was cancelled or discarded\n9. `Unknown`: Status cannot be determined\n\n### Response Details\nReturns a JSON object containing:\n- `uniqueFileName`: The file identifier\n- `status`: Current processing state\n- `submittedTime`: When the file was uploaded\n- `finishedTime`: When processing completed (null if not finished)\n\n### Common Use Cases\n- Polling for completion status\n- Error checking before retry\n- Monitoring processing progress\n\n### Best Practices\n- Poll at reasonable intervals\n- Implement exponential backoff\n- Handle all possible status values\n\n### Error Responses\n- 404: File not found\n- 403: Insufficient permissions\n- 401: Invalid authentication\n\nNote: Files are typically processed within 5 minutes, depending on size and complexity.",
        "operationId": "GetInboundFileStatus",
        "parameters": [
          {
            "name": "engagementSid",
            "in": "path",
            "description": "Short identifier for engagement (as in URLs)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inboundFileCategory",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/InboundFileCategory"
            }
          },
          {
            "name": "uniqueFileName",
            "in": "path",
            "description": "The name of the file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Gw-Stloc-Hint",
            "in": "header",
            "description": "Optional HTTP header to optimize request routing and reduce latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East), USEA-01 (East US), NO01 (Norway East).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request: see problem details for more information",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: Missing an authorization header or token, or the token has expired",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: You don't have access to the engagement, the engagement doesn't have IH or you don't have IH access on the engagement",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "adra_personal_access_token": ["integrationhub_api.upload"],
            "adra_oauth_code_pkce": ["integrationhub_api.upload"],
            "adra_oauth_client_cred": ["integrationhub_api.upload"]
          }
        ]
      }
    }
  },
  "webhooks": {
    "BalancerBalanceJobCompletedEvent": {
      "post": {
        "tags": ["Job Completed"],
        "x-state": "Technical Preview",
        "summary": "Receive Balancer Balance Job Completed Event",
        "description": "Webhook event triggered when a Balancer Balance job has completed processing",
        "operationId": "ReceiveBalancerBalanceJobCompletedEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalancerBalanceJobCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "BalancerTransactionJobCompletedEvent": {
      "post": {
        "tags": ["Job Completed"],
        "x-state": "Technical Preview",
        "summary": "Receive Balancer Transaction Job Completed Event",
        "description": "Webhook event triggered when a Balancer Transaction job has completed processing",
        "operationId": "ReceiveBalancerTransactionJobCompletedEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalancerTransactionJobCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "LegalEntityJobCompletedEvent": {
      "post": {
        "tags": ["Job Completed"],
        "summary": "Receive Legal Entity Job Completed Event",
        "description": "Webhook event triggered when a Legal Entity job has completed processing",
        "operationId": "ReceiveLegalEntityJobCompletedEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalEntityJobCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "MatcherTransactionJobCompletedEvent": {
      "post": {
        "tags": ["Job Completed"],
        "summary": "Receive Matcher Transaction Job Completed Event",
        "description": "Webhook event triggered when a Matcher Transaction job has completed processing",
        "operationId": "ReceiveMatcherTransactionJobCompletedEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatcherTransactionJobCompletedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "MatcherReportPublishedEvent": {
      "post": {
        "tags": ["Outbound File Available"],
        "summary": "Receive Matcher Report Published Event",
        "description": "Webhook event triggered when a matcher report has been published",
        "operationId": "ReceiveMatcherReportPublishedEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatcherReportPublishedEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FileStatusResponse": {
        "required": ["uniqueFileName", "status", "submittedTime"],
        "type": "object",
        "properties": {
          "uniqueFileName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "submittedTime": {
            "type": "string",
            "format": "date-time"
          },
          "finishedTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FileUploadResponse": {
        "required": ["uniqueFileName"],
        "type": "object",
        "properties": {
          "uniqueFileName": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "example": {
          "uniqueFileName": "uploaded_file_2024timestamp1234.csv"
        }
      },
      "InboundFileCategory": {
        "enum": [
          "BalancerBalanceUpload",
          "BalancerTransactionsUpload",
          "MatcherTransactionUpload",
          "LegalEntityUpload"
        ],
        "type": "string",
        "description": "Specifies the category of the inbound file. Each category corresponds to a specific type of data being uploaded."
      },
      "JobStatus": {
        "enum": [
          "Receiving",
          "Queued",
          "Processing",
          "PartiallySucceeded",
          "Succeeded",
          "Failed",
          "Rejected",
          "WaitingInteraction",
          "Discarded",
          "Deleted",
          "Unknown"
        ],
        "type": "string"
      },
      "OutboundFileCategory": {
        "enum": ["MatcherReport"],
        "type": "string"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LegalEntityJobCompletedEvent": {
        "type": "object",
        "properties": {
          "EventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique Event Identifier"
          },
          "CorrelationId": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation identifier"
          },
          "EventType": {
            "type": "string",
            "description": "Event type"
          },
          "EventMessage": {
            "type": "string",
            "description": "Human-readable event description"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the event"
          },
          "Payload": {
            "$ref": "#/components/schemas/LegalEntityJobCompleted"
          }
        },
        "required": [
          "EventId",
          "EventType",
          "EventMessage",
          "CreatedDate",
          "Payload"
        ]
      },
      "LegalEntityJobCompleted": {
        "type": "object",
        "properties": {
          "Engagement": {
            "type": "string",
            "description": "Engagement"
          },
          "UniqueFileName": {
            "type": "string",
            "description": "Unique file name"
          },
          "Result": {
            "$ref": "#/components/schemas/JobResult"
          }
        },
        "required": ["Engagement", "UniqueFileName", "Result"]
      },
      "MatcherTransactionJobCompletedEvent": {
        "type": "object",
        "properties": {
          "EventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique Event Identifier"
          },
          "CorrelationId": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation identifier"
          },
          "EventType": {
            "type": "string",
            "description": "Event type"
          },
          "EventMessage": {
            "type": "string",
            "description": "Human-readable event description"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the event"
          },
          "Payload": {
            "$ref": "#/components/schemas/MatcherTransactionJobCompleted"
          }
        },
        "required": [
          "EventId",
          "EventType",
          "EventMessage",
          "CreatedDate",
          "Payload"
        ]
      },
      "MatcherTransactionJobCompleted": {
        "type": "object",
        "properties": {
          "Engagement": {
            "type": "string",
            "description": "Engagement"
          },
          "UniqueFileName": {
            "type": "string",
            "description": "Unique file name"
          },
          "Result": {
            "$ref": "#/components/schemas/JobResult"
          }
        },
        "required": ["Engagement", "UniqueFileName", "Result"]
      },
      "BalancerBalanceJobCompletedEvent": {
        "type": "object",
        "properties": {
          "EventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique Event Identifier"
          },
          "CorrelationId": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation identifier"
          },
          "EventType": {
            "type": "string",
            "description": "Event type"
          },
          "EventMessage": {
            "type": "string",
            "description": "Human-readable event description"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the event"
          },
          "Payload": {
            "$ref": "#/components/schemas/BalancerBalanceJobCompleted"
          }
        },
        "required": [
          "EventId",
          "EventType",
          "EventMessage",
          "CreatedDate",
          "Payload"
        ]
      },
      "BalancerBalanceJobCompleted": {
        "type": "object",
        "properties": {
          "Engagement": {
            "type": "string",
            "description": "Engagement"
          },
          "UniqueFileName": {
            "type": "string",
            "description": "Unique file name"
          },
          "Result": {
            "$ref": "#/components/schemas/JobResult"
          }
        },
        "required": ["Engagement", "UniqueFileName", "Result"]
      },
      "BalancerTransactionJobCompletedEvent": {
        "type": "object",
        "properties": {
          "EventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique Event Identifier"
          },
          "CorrelationId": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation identifier"
          },
          "EventType": {
            "type": "string",
            "description": "Event type"
          },
          "EventMessage": {
            "type": "string",
            "description": "Human-readable event description"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the event"
          },
          "Payload": {
            "$ref": "#/components/schemas/BalancerTransactionJobCompleted"
          }
        },
        "required": [
          "EventId",
          "EventType",
          "EventMessage",
          "CreatedDate",
          "Payload"
        ]
      },
      "BalancerTransactionJobCompleted": {
        "type": "object",
        "properties": {
          "Engagement": {
            "type": "string",
            "description": "Engagement"
          },
          "UniqueFileName": {
            "type": "string",
            "description": "Unique file name"
          },
          "Result": {
            "$ref": "#/components/schemas/JobResult"
          }
        },
        "required": ["Engagement", "UniqueFileName", "Result"]
      },
      "JobResult": {
        "type": "string",
        "description": "The result of the job processing. Possible values:\n- Succeeded: All records processed successfully\n- PartiallySucceeded: Some records processed with errors\n- Failed: Processing failed\n- Rejected: File was rejected (e.g., malware)\n- WaitingInteraction: Waiting for user input\n- Discarded: Processing was cancelled or discarded\n- Deleted: File was deleted",
        "enum": [
          "Succeeded",
          "PartiallySucceeded",
          "Failed",
          "Rejected",
          "WaitingInteraction",
          "Discarded",
          "Deleted"
        ]
      },
      "MatcherReportPublishedEvent": {
        "type": "object",
        "properties": {
          "EventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique Event Identifier"
          },
          "CorrelationId": {
            "type": "string",
            "format": "uuid",
            "description": "Correlation identifier"
          },
          "EventType": {
            "type": "string",
            "description": "Event type"
          },
          "EventMessage": {
            "type": "string",
            "description": "Human-readable event description"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the event"
          },
          "Payload": {
            "$ref": "#/components/schemas/MatcherReportPublished"
          }
        },
        "required": [
          "EventId",
          "EventType",
          "EventMessage",
          "CreatedDate",
          "Payload"
        ]
      },
      "MatcherReportPublished": {
        "type": "object",
        "properties": {
          "UniqueFileName": {
            "type": "string",
            "description": "Unique file name"
          },
          "DownloadUrl": {
            "type": "string",
            "description": "Download URL"
          }
        },
        "required": ["UniqueFileName", "DownloadUrl"]
      }
    },
    "securitySchemes": {
      "adra_personal_access_token": {
        "type": "http",
        "description": "This API uses OAuth 2.0 Bearer tokens for authentication.\n\n**Authentication Token**: You can obtain a token using:\n   - **Personal Access Tokens**: Generate these tokens from your [user account settings](https://setup.adra.com/profile/access)\n\nOnce you have a token, include it in the `Authorization` header of your requests:\n\n```\nAuthorization: Bearer YOUR_TOKEN_HERE\n```\n\nEnsure that you keep your tokens secure and do not share them publicly.",
        "scheme": "Bearer"
      },
      "adra_oauth_client_cred": {
        "type": "oauth2",
        "description": "Restricted to internal clients. Requires client ID and secret obtained from Adra Engineering. Scopes are mandatory on token requests.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.adra.com/connect/token",
            "scopes": {
              "integrationhub_api.upload": "integrationhub_api.upload",
              "integrationhub_api.download": "integrationhub_api.download"
            }
          }
        }
      },
      "adra_oauth_code_pkce": {
        "type": "oauth2",
        "description": "OAuth 2.0 JWT Bearer Token Scheme",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.adra.com/connect/authorize",
            "tokenUrl": "https://login.adra.com/connect/token",
            "scopes": {
              "integrationhub_api.download": "integrationhub_api.download"
            }
          }
        }
      }
    }
  }
}
