{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-attachment-schema.json",
  "title": "Attachment",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-attachment-api-openapi.yml#/components/schemas/Attachment",
  "type": "object",
  "properties": {
    "vendorId": {
      "type": "integer",
      "format": "int32"
    },
    "vendorTransactionId": {
      "type": "integer",
      "format": "int32"
    },
    "vendorClaimId": {
      "type": [
        "string",
        "null"
      ]
    },
    "attachmentId": {
      "type": "integer",
      "format": "int32"
    },
    "clearinghouseTraceNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerId": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerName": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerReferenceNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerContactName": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumberQualifier1": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumber1": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumberQualifier2": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumber2": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumberQualifier3": {
      "type": [
        "string",
        "null"
      ]
    },
    "payerCommNumber3": {
      "type": [
        "string",
        "null"
      ]
    },
    "providerEntityType": {
      "type": "integer",
      "format": "int32"
    },
    "billingProviderTaxId": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderNpi": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderLastName": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderFirstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderTaxonomyCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderStreetAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderCity": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderState": {
      "type": [
        "string",
        "null"
      ]
    },
    "billingProviderZipCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "renderingProviderNpi": {
      "type": [
        "string",
        "null"
      ]
    },
    "renderingProviderLastName": {
      "type": [
        "string",
        "null"
      ]
    },
    "renderingProviderFirstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "patientControlNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "patientLastName": {
      "type": [
        "string",
        "null"
      ]
    },
    "patientFirstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "patientDob": {
      "type": "string",
      "format": "date-time"
    },
    "insuredId": {
      "type": [
        "string",
        "null"
      ]
    },
    "insuredLastName": {
      "type": [
        "string",
        "null"
      ]
    },
    "insuredFirstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "insuredDob": {
      "type": "string",
      "format": "date-time"
    },
    "serviceDateLow": {
      "type": "string",
      "format": "date-time"
    },
    "serviceDateHigh": {
      "type": "string",
      "format": "date-time"
    },
    "totalChargeAmt": {
      "type": "number",
      "format": "double"
    },
    "statusCode": {
      "type": "integer",
      "format": "int32"
    },
    "statusDate": {
      "type": "string",
      "format": "date-time"
    },
    "isServiceLineRequest": {
      "type": "boolean"
    },
    "serviceLineReferenceNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "serviceLineChargeAmt": {
      "type": "number",
      "format": "double"
    },
    "procedureCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "loincCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "requestDate": {
      "type": "string",
      "format": "date-time"
    },
    "isCommitted": {
      "type": "boolean"
    },
    "isSolicited": {
      "type": "boolean"
    },
    "attachmentFile": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/AttachmentFile"
      }
    },
    "links": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Link"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AttachmentFile": {
      "type": "object",
      "properties": {
        "attachmentFileId": {
          "type": "integer",
          "format": "int32"
        },
        "attachmentId": {
          "type": "integer",
          "format": "int32"
        },
        "vendorId": {
          "type": "integer",
          "format": "int32"
        },
        "dateProcessed": {
          "type": "string",
          "format": "date-time"
        },
        "documentTypeCode": {
          "type": "integer",
          "format": "int32"
        },
        "imageDate": {
          "type": "string",
          "format": "date-time"
        },
        "orientationCode": {
          "type": "integer",
          "format": "int32"
        },
        "narrative": {
          "type": [
            "string",
            "null"
          ]
        },
        "pageCount": {
          "type": "integer",
          "format": "int32"
        },
        "fileChecksum": {
          "type": [
            "string",
            "null"
          ]
        },
        "fileSize": {
          "type": "integer",
          "format": "int32"
        },
        "fileExtension": {
          "type": [
            "string",
            "null"
          ]
        },
        "fileName": {
          "type": [
            "string",
            "null"
          ]
        },
        "attachmentFileData": {
          "type": [
            "string",
            "null"
          ],
          "format": "byte"
        },
        "attachmentFileContent": {
          "type": [
            "string",
            "null"
          ]
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Link"
          }
        }
      },
      "additionalProperties": false
    },
    "Link": {
      "type": "object",
      "properties": {
        "rel": {
          "type": [
            "string",
            "null"
          ]
        },
        "href": {
          "type": [
            "string",
            "null"
          ]
        },
        "action": {
          "type": [
            "string",
            "null"
          ]
        },
        "types": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}