> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.idenfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export a SAR as XML or PDF

> Downloads the report as a file — `exportFormat=xml` for machine filing, `pdf` for a readable copy — returned as an attachment rather than as JSON.

An XML download carries `X-SAR-Conformance`, which is the only thing that tells a filing-ready document apart from one a regulator would refuse: `CERTIFIED` means the regulator's own published schema accepted it, `FAILED` means that schema rejected it, and `NOT_VALIDATED` means no schema is held for the jurisdiction, so conformance is unknown — read it as unknown and not as a pass. The download is never blocked on it: a non-conformant document is still usable for your own records and for a correspondent bank. PDF carries no such header, being no regulator input.

An XML download of a report that has been handed over for filing serves the document that was handed over, byte for byte, not a fresh render of the report as it stands — `X-SAR-Snapshot` tells you which you hold and how the two relate: `MATCHES` means the report still produces that document, `DIVERGED` means it no longer does and the filed copy is what you are holding, `UNCOMPARED` means the comparison could not be made, `LIVE` means the report has not been handed over, and `NOT_CAPTURED` means it was handed over before this service kept copies, so what was filed cannot be reproduced from here.

Every export is recorded in the report's history with those verdicts, including who took the copy, because that is a question examiners ask.



## OpenAPI

````yaml /openapi/transaction-monitoring.json get /api/v1/sars/{sar_id}/export/
openapi: 3.0.3
info:
  title: iDenfy Transaction Monitoring API
  version: v1
  description: >-
    Submit transactions and events for AML monitoring, and read back the alerts,
    cases and reports they produce.
servers:
  - url: https://ivs-tx-monitoring.idenfy.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Ingest
    description: Submit transactions and events for monitoring.
  - name: Transactions
    description: Read back submitted transactions and their rule hits.
  - name: Rules
    description: Detection rules evaluated against every submission.
  - name: Alerts
    description: Alerts opened when a rule matches.
  - name: Investigations
    description: Cases opened from one or more alerts.
  - name: SARs
    description: Suspicious activity reports and their attachments.
  - name: Sanctions screening
    description: Sanctions and PEP screening of transaction parties.
  - name: AML monitoring
    description: Ongoing AML monitoring of screened parties.
  - name: Party suspensions
    description: ''
  - name: Webhooks
    description: Outbound event delivery to your endpoints.
  - name: Custom fields
    description: Your own transaction attributes, declared so rules can match them.
  - name: Reference lists
    description: Named value lists rules can reference.
  - name: Notification rules
    description: Slack and email notifications for alerts.
  - name: Reports
    description: Generated compliance reports.
paths:
  /api/v1/sars/{sar_id}/export/:
    get:
      tags:
        - SARs
      summary: Export a SAR as XML or PDF
      description: >-
        Downloads the report as a file — `exportFormat=xml` for machine filing,
        `pdf` for a readable copy — returned as an attachment rather than as
        JSON.


        An XML download carries `X-SAR-Conformance`, which is the only thing
        that tells a filing-ready document apart from one a regulator would
        refuse: `CERTIFIED` means the regulator's own published schema accepted
        it, `FAILED` means that schema rejected it, and `NOT_VALIDATED` means no
        schema is held for the jurisdiction, so conformance is unknown — read it
        as unknown and not as a pass. The download is never blocked on it: a
        non-conformant document is still usable for your own records and for a
        correspondent bank. PDF carries no such header, being no regulator
        input.


        An XML download of a report that has been handed over for filing serves
        the document that was handed over, byte for byte, not a fresh render of
        the report as it stands — `X-SAR-Snapshot` tells you which you hold and
        how the two relate: `MATCHES` means the report still produces that
        document, `DIVERGED` means it no longer does and the filed copy is what
        you are holding, `UNCOMPARED` means the comparison could not be made,
        `LIVE` means the report has not been handed over, and `NOT_CAPTURED`
        means it was handed over before this service kept copies, so what was
        filed cannot be reproduced from here.


        Every export is recorded in the report's history with those verdicts,
        including who took the copy, because that is a question examiners ask.
      operationId: sars_export_retrieve
      parameters:
        - in: path
          name: sar_id
          schema:
            type: string
            format: uuid
            description: Primary key
          required: true
          description: Identifies the suspicious activity report.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SARResponse'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SARResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        partnerId:
          type: integer
          readOnly: true
        investigationId:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        referenceNumber:
          type: string
          readOnly: true
          description: Formatted SAR-{year}-{seq:03d} reference number
        jurisdiction:
          type: string
          readOnly: true
          description: >-
            ISO 3166-1 alpha-2 filing jurisdiction; validated against
            SARJurisdictionRegistry
        templateFamily:
          allOf:
            - $ref: '#/components/schemas/TemplateFamilyEnum'
          readOnly: true
          description: >-
            Regulator form shape, derived from jurisdiction so export and
            analytics can filter on it


            * `GOAML` - goAML (EU and most of the world)

            * `FINCEN` - FinCEN (United States)

            * `UK_NCA` - UK NCA (United Kingdom)

            * `SI_UPPD` - UPPD (Slovenia)

            * `GENERIC` - Generic / Universal
        sarType:
          allOf:
            - $ref: '#/components/schemas/SarTypeEnum'
          readOnly: true
          description: >-
            Report type chosen first, before jurisdiction-specific sections are
            shown


            * `CLIENT` - Client

            * `TRANSACTIONAL` - Transactional
        reportCode:
          type: string
          readOnly: true
          nullable: true
          description: >-
            goAML report_code this filing is submitted under, resolved from the
            FIU's own schema. Orthogonal to sar_type rather than a widening of
            it: STR/SAR, TFTR/TFR and PEPTR/PEPR are each one subject matter
            across the transaction and activity axes. Deliberately without
            model-level choices, because the allowed values are enumerated per
            FIU and one enum here would hardcode a single jurisdiction's list as
            universal
        status:
          allOf:
            - $ref: '#/components/schemas/SARResponseStatusEnum'
          readOnly: true
          description: |-
            SAR lifecycle state

            * `DRAFT` - Draft
            * `UNDER_REVIEW` - Under Review
            * `APPROVED` - Approved
            * `SUBMITTED` - Submitted
            * `ACCEPTED` - Accepted by regulator
            * `FILING_REJECTED` - Rejected by regulator
            * `REJECTED` - Rejected
        subjectType:
          allOf:
            - $ref: '#/components/schemas/SubjectTypeEnum'
          readOnly: true
          description: |-
            Whether the subject is a natural person or a legal entity

            * `INDIVIDUAL` - Individual
            * `ENTITY` - Entity
        subjectName:
          type: string
          readOnly: true
          description: Name of the subject the report concerns
        subjectAddress:
          type: string
          readOnly: true
          nullable: true
          description: Subject's physical address
        subjectAccount:
          type: string
          readOnly: true
          nullable: true
          description: Subject's account identifier
        suspiciousActivityDescription:
          type: string
          readOnly: true
          description: Narrative description of the suspicious activity
        internalActionTaken:
          readOnly: true
          nullable: true
          description: |-
            What the reporting entity itself did about the activity

            * `NONE` - No action taken
            * `MONITORED` - Monitored
            * `BLOCKED` - Blocked
            * `TERMINATED` - Relationship terminated
          oneOf:
            - $ref: '#/components/schemas/InternalActionTakenEnum'
            - $ref: '#/components/schemas/NullEnum'
        totalAmount:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,8})?$
          readOnly: true
          nullable: true
          description: Total amount of the reported activity
        currency:
          type: string
          readOnly: true
          nullable: true
          description: ISO 4217 currency code
        periodStart:
          type: string
          format: date
          readOnly: true
          nullable: true
          description: Start of the reported activity period
        periodEnd:
          type: string
          format: date
          readOnly: true
          nullable: true
          description: End of the reported activity period
        preparedBy:
          type: integer
          description: Unique identifier of the user
          readOnly: true
        preparedByName:
          type: string
          nullable: true
          readOnly: true
          description: Name of the assigned user, or null when nobody is assigned
        reviewedBy:
          type: integer
          description: Unique identifier of the user
          readOnly: true
        submittedAt:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: When the report was submitted to the regulator
        externalReference:
          type: string
          readOnly: true
          nullable: true
          description: >-
            Receipt code the FIU returned when the report was filed through its
            portal
        rejectionReason:
          type: string
          readOnly: true
          nullable: true
          description: Why the report was rejected in review
        reportData:
          readOnly: true
          description: Jurisdiction-specific report form fields
        isTest:
          type: boolean
          readOnly: true
          description: >-
            True when this record is test data rather than live monitoring data;
            derived from the record it originates from, never set by hand
        filingBlockedReason:
          type: string
          nullable: true
          description: >-
            `TEST_SAR` — a report that must never reach a regulator — is the
            only blocking reason.
          readOnly: true
        filingIntegrationReason:
          type: string
          nullable: true
          description: >-
            A warning and not a block: the partner files on the FIU's own
            channel and records that they did.
          readOnly: true
        autoFilingEnabled:
          type: boolean
          description: >-
            False for every report today: no regulator we support publishes a
            transport a multi-tenant

            service can file over, so a report is handed over and recorded,
            never transmitted for the partner.
          readOnly: true
        filingErrors:
          readOnly: true
          nullable: true
          description: >-
            The regulator's own reasons for refusing the report, verbatim, so it
            can be corrected and refiled
        filingOutcomeAt:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: >-
            When the regulator accepted or refused the report, as reported by
            the filer
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/SARAttachmentResponse'
          readOnly: true
        handoverSnapshot:
          type: object
          additionalProperties: {}
          nullable: true
          description: >-
            The most recent handover of this report, or null when none was
            captured.


            Null equally on a report never handed over and on one handed over
            before snapshots were kept:

            those rows are deliberately not backfilled, and the status tells the
            two apart. Read off the

            prefetched relation, so a register page costs no extra query per
            row.
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        completeness:
          type: object
          additionalProperties: {}
          readOnly: true
      required:
        - attachments
        - autoFilingEnabled
        - completeness
        - createdAt
        - currency
        - externalReference
        - filingBlockedReason
        - filingErrors
        - filingIntegrationReason
        - filingOutcomeAt
        - handoverSnapshot
        - id
        - internalActionTaken
        - investigationId
        - isTest
        - jurisdiction
        - partnerId
        - periodEnd
        - periodStart
        - preparedBy
        - preparedByName
        - referenceNumber
        - rejectionReason
        - reportCode
        - reportData
        - reviewedBy
        - sarType
        - status
        - subjectAccount
        - subjectAddress
        - subjectName
        - subjectType
        - submittedAt
        - suspiciousActivityDescription
        - templateFamily
        - totalAmount
        - updatedAt
    TemplateFamilyEnum:
      enum:
        - GOAML
        - FINCEN
        - UK_NCA
        - SI_UPPD
        - GENERIC
      type: string
      description: |-
        * `GOAML` - goAML (EU and most of the world)
        * `FINCEN` - FinCEN (United States)
        * `UK_NCA` - UK NCA (United Kingdom)
        * `SI_UPPD` - UPPD (Slovenia)
        * `GENERIC` - Generic / Universal
    SarTypeEnum:
      enum:
        - CLIENT
        - TRANSACTIONAL
      type: string
      description: |-
        * `CLIENT` - Client
        * `TRANSACTIONAL` - Transactional
    SARResponseStatusEnum:
      enum:
        - DRAFT
        - UNDER_REVIEW
        - APPROVED
        - SUBMITTED
        - ACCEPTED
        - FILING_REJECTED
        - REJECTED
      type: string
      description: |-
        * `DRAFT` - Draft
        * `UNDER_REVIEW` - Under Review
        * `APPROVED` - Approved
        * `SUBMITTED` - Submitted
        * `ACCEPTED` - Accepted by regulator
        * `FILING_REJECTED` - Rejected by regulator
        * `REJECTED` - Rejected
    SubjectTypeEnum:
      enum:
        - INDIVIDUAL
        - ENTITY
      type: string
      description: |-
        * `INDIVIDUAL` - Individual
        * `ENTITY` - Entity
    InternalActionTakenEnum:
      enum:
        - NONE
        - MONITORED
        - BLOCKED
        - TERMINATED
      type: string
      description: |-
        * `NONE` - No action taken
        * `MONITORED` - Monitored
        * `BLOCKED` - Blocked
        * `TERMINATED` - Relationship terminated
    NullEnum:
      enum:
        - null
    SARAttachmentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        fileName:
          type: string
          readOnly: true
          description: Original file name as uploaded
        contentType:
          type: string
          readOnly: true
          description: Detected MIME type
        sizeBytes:
          type: integer
          readOnly: true
          description: File size in bytes
        checksumSha256:
          type: string
          readOnly: true
          description: SHA-256 of the stored bytes, for integrity checks
        uploadedBy:
          type: integer
          description: Unique identifier of the user
          readOnly: true
        uploadedAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - checksumSha256
        - contentType
        - fileName
        - id
        - sizeBytes
        - uploadedAt
        - uploadedBy
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

## Related topics

- [Download the handover package](https://documentation.idenfy.com/api-reference/transaction-monitoring/sars/download-the-handover-package.md)
- [Transaction Monitoring API: Alerts, Investigations and SARs](https://documentation.idenfy.com/transaction-monitoring/case-management.md)
- [Retrieve a SAR's activity](https://documentation.idenfy.com/api-reference/transaction-monitoring/sars/retrieve-a-sars-activity.md)
- [Transaction Monitoring Dashboard: Suspicious Activity Reports](https://documentation.idenfy.com/guides/dashboard/transaction-monitoring/sar.md)
- [Create an attachment on a SAR](https://documentation.idenfy.com/api-reference/transaction-monitoring/sars/create-an-attachment-on-a-sar.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.