{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fourthline/json-schema/fourthline-workflow-status-product-schema.json",
  "title": "WorkflowStatusProduct",
  "description": "Status block for one product domain in the workflow. Currently one product domain per workflow; this may be extended in the future.",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fourthline-identity-verification-api-v2-api-openapi.yml#/components/schemas/WorkflowStatusProduct",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Product key (PascalCase string value). <br />Enum: `IdentityVerification`, `Payments`, `Signatures`",
      "enum": [
        "IdentityVerification",
        "Payments",
        "Signatures"
      ]
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WorkflowStatusMessage"
      }
    },
    "status": {
      "type": "string",
      "description": "Product-specific status. See [Product statuses](https://docs.fourthline.com/v2.0/docs/product-statuses). <br /><br />For Identity Verification, `timed_out` means the workflow was not started within three days after it was created or was started but not completed within seven days after it was started.",
      "enum": [
        "new",
        "pending",
        "pending_verification",
        "success",
        "user_consent_required",
        "selfie_required",
        "kyc_required",
        "confirmation_required",
        "signed",
        "invalid_signature",
        "invalid_data",
        "inconsistent_data",
        "rejected",
        "fraud",
        "completed",
        "failed",
        "error",
        "timed_out"
      ]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "When this product status was last updated."
    },
    "transferData": {
      "type": "object",
      "description": "Payment transfer details. Returned only when the payment is successful.",
      "additionalProperties": true,
      "properties": {
        "iban": {
          "type": "string",
          "description": "The IBAN received in the transfer."
        },
        "name": {
          "type": "string",
          "description": "The accountholder name received in the transfer."
        },
        "transferReference": {
          "type": "string",
          "description": "The unique reference of the transfer."
        },
        "currency": {
          "type": "string",
          "description": "The currency of the transfer."
        }
      }
    }
  },
  "$defs": {
    "WorkflowStatusMessage": {
      "type": "object",
      "description": "A validation or lifecycle message for a product in the workflow.",
      "properties": {
        "description": {
          "type": "string",
          "description": "Human-readable description of the validation or result."
        },
        "statusCode": {
          "type": "integer",
          "description": "Numeric status code."
        },
        "areaOfAttention": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional area that requires attention."
        },
        "attemptId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Optional identifier for a signature-related attempt."
        }
      }
    }
  }
}