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

# Get deal snapshot

> Retrieve the exact lender input version used by a monitoring run or risk package, including its effective time and previous version.

Retrieve the exact lender input version used by a monitoring run or risk package, including its effective time and previous version. All IDs and cursors must belong to the authorized workspace and environment. Required scope: signal:read.

Examples use synthetic IDs. Replace them with values returned by your environment.


## OpenAPI

````yaml openapi/amlok.json GET /v1/deal-snapshots/{id}
openapi: 3.1.0
info:
  title: AMLOK API
  version: 1.0.0
  description: >-
    AMLOK API: borrower connections, Insights origination, immutable risk
    packages and Signal monitoring. Use your institution-issued API origin.
servers: []
security:
  - BearerAuth: []
paths:
  /v1/deal-snapshots/{id}:
    get:
      tags:
        - Signal
      summary: Get deal snapshot
      description: >-
        Retrieve the exact lender input version used by a monitoring run or risk
        package, including its effective time and previous version. All IDs and
        cursors must belong to the authorized workspace and environment.
        Required scope: signal:read.
      operationId: getDealSnapshot
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
          description: id
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DealSnapshot'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
                additionalProperties: false
              example:
                data:
                  id: ds_synthetic
                  monitor_id: mon_synthetic
                  borrower_id: bor_synthetic
                  previous_snapshot_id: ds_initial
                  sequence: 2
                  record_version: 1
                  effective_at: '2026-11-06T12:00:00Z'
                  received_at: '2026-11-06T12:00:00Z'
                  deal:
                    institution_reference: LOAN-0042
                    funded_amount:
                      amount: '50000.00'
                      currency: CAD
                    outstanding_amount:
                      amount: '48000.00'
                      currency: CAD
                    funded_at: '2026-11-05T12:00:00Z'
                    maturity_date: '2027-11-06'
                    repayment_frequency: monthly
                    terms_document_ids: []
                  performance: null
                meta:
                  request_id: req_synthetic
                  schema_version: 1.0.0
                  environment: sandbox
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '400':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: validation_error
                  message: Validation error.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '401':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: unauthenticated
                  message: Unauthenticated.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '403':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: forbidden
                  message: Forbidden.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '404':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: not_found
                  message: Not found.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '409':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: invalid_state
                  message: Invalid state.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '410':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: cursor_expired
                  message: Cursor expired.
                  retryable: false
                  request_id: req_synthetic
                  field: null
          headers:
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '429':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: rate_limited
                  message: Rate limited.
                  retryable: true
                  request_id: req_synthetic
                  field: null
          headers:
            Retry-After:
              description: Minimum delay in seconds before retry.
              schema:
                type: integer
                minimum: 0
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
        '503':
          description: >-
            Inspect structured error; retry only when retryable. 429 and 503 can
            include Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
                required:
                  - error
                additionalProperties: false
              example:
                error:
                  code: temporarily_unavailable
                  message: Temporarily unavailable.
                  retryable: true
                  request_id: req_synthetic
                  field: null
          headers:
            Retry-After:
              description: Minimum delay in seconds before retry.
              schema:
                type: integer
                minimum: 0
            X-Request-ID:
              schema:
                type: string
                minLength: 1
              description: Same request ID as meta.request_id or error.request_id.
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request GET --fail-with-body --max-time 30 \
              "${AMLOK_API_BASE_URL}/v1/deal-snapshots/record_synthetic" \
              --header "Authorization: Bearer ${AMLOK_API_KEY}" \
              --header 'Accept: application/json'
        - lang: Python
          source: >
            import os

            import requests


            headers = {'Accept': 'application/json'}

            headers["Authorization"] = "Bearer " + os.environ["AMLOK_API_KEY"]

            response = requests.request('GET', os.environ["AMLOK_API_BASE_URL"]
            + '/v1/deal-snapshots/record_synthetic', headers=headers,
            timeout=30, allow_redirects=False)

            response.raise_for_status()

            print(response.json())
        - lang: JavaScript
          source: >
            const headers = {"Accept": "application/json"};

            headers.Authorization = `Bearer ${process.env.AMLOK_API_KEY}`;

            const response = await fetch(process.env.AMLOK_API_BASE_URL +
            "/v1/deal-snapshots/record_synthetic", {
              method: "GET", headers, redirect: "error", signal: AbortSignal.timeout(30000)
            });

            if (!response.ok) throw new Error(`HTTP ${response.status}: ${await
            response.text()}`);

            console.log(await response.json());
components:
  schemas:
    DealSnapshot:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: Opaque identifier in the authorized workspace and environment.
        monitor_id:
          type: string
          minLength: 1
          description: Opaque identifier in the authorized workspace and environment.
        borrower_id:
          type: string
          minLength: 1
          description: Opaque identifier in the authorized workspace and environment.
        previous_snapshot_id:
          anyOf:
            - type: string
              minLength: 1
              description: Opaque identifier in the authorized workspace and environment.
            - type: 'null'
          description: >-
            Previous snapshot id for DealSnapshot. Constraints, requiredness and
            allowed values are defined by this schema.
        sequence:
          type: integer
          minimum: 1
          description: 1 for enrollment; strictly increments for each accepted snapshot.
        record_version:
          type: integer
          const: 1
          description: Monotonic resource version for event reconciliation.
        effective_at:
          type: string
          minLength: 1
          description: UTC timestamp in RFC 3339 format.
          format: date-time
        received_at:
          type: string
          minLength: 1
          description: UTC timestamp in RFC 3339 format.
          format: date-time
        deal:
          $ref: '#/components/schemas/Deal'
          description: >-
            Deal for DealSnapshot. Constraints, requiredness and allowed values
            are defined by this schema.
        performance:
          anyOf:
            - $ref: '#/components/schemas/DealPerformance'
            - type: 'null'
          description: >-
            Performance for DealSnapshot. Constraints, requiredness and allowed
            values are defined by this schema.
      required:
        - id
        - monitor_id
        - borrower_id
        - previous_snapshot_id
        - sequence
        - record_version
        - effective_at
        - received_at
        - deal
        - performance
      additionalProperties: false
    Meta:
      type: object
      properties:
        request_id:
          type: string
          minLength: 1
          description: >-
            Opaque identifier, authorized within the API key workspace and
            environment.
        schema_version:
          type: string
          minLength: 1
          description: >-
            Schema version for Meta. Constraints, requiredness and allowed
            values are defined by this schema.
        environment:
          type: string
          enum:
            - sandbox
            - live
          description: >-
            Environment for Meta. Constraints, requiredness and allowed values
            are defined by this schema.
      required:
        - request_id
        - schema_version
        - environment
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - validation_error
            - unauthenticated
            - forbidden
            - not_found
            - invalid_state
            - idempotency_conflict
            - insufficient_credits
            - precondition_failed
            - cursor_expired
            - rate_limited
            - temporarily_unavailable
            - deal_snapshot_conflict
            - payload_too_large
            - unsupported_media_type
            - document_rejected
            - processing_failed
            - session_expired
            - consent_purpose_missing
            - sandbox_only
            - scenario_not_available
            - idempotency_result_expired
          description: >-
            Code for Error. Constraints, requiredness and allowed values are
            defined by this schema.
        message:
          type: string
          minLength: 1
          description: >-
            Message for Error. Constraints, requiredness and allowed values are
            defined by this schema.
        retryable:
          type: boolean
          description: >-
            Retryable for Error. Constraints, requiredness and allowed values
            are defined by this schema.
        request_id:
          type: string
          minLength: 1
          description: >-
            Opaque identifier, authorized within the API key workspace and
            environment.
        field:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          description: >-
            Field for Error. Constraints, requiredness and allowed values are
            defined by this schema.
      required:
        - code
        - message
        - retryable
        - request_id
        - field
      additionalProperties: false
    Deal:
      type: object
      properties:
        institution_reference:
          type: string
          minLength: 1
          description: >-
            Institution reference for Deal. Constraints, requiredness and
            allowed values are defined by this schema.
        funded_amount:
          $ref: '#/components/schemas/Money'
          description: >-
            Funded amount for Deal. Constraints, requiredness and allowed values
            are defined by this schema.
        outstanding_amount:
          $ref: '#/components/schemas/Money'
          description: >-
            Outstanding amount for Deal. Constraints, requiredness and allowed
            values are defined by this schema.
        funded_at:
          type: string
          minLength: 1
          format: date-time
          description: >-
            Funded at for Deal. Constraints, requiredness and allowed values are
            defined by this schema.
        maturity_date:
          type: string
          minLength: 1
          format: date
          description: >-
            Maturity date for Deal. Constraints, requiredness and allowed values
            are defined by this schema.
        repayment_frequency:
          type: string
          enum:
            - daily
            - weekly
            - biweekly
            - monthly
            - at_maturity
            - variable
          description: >-
            Repayment frequency for Deal. Constraints, requiredness and allowed
            values are defined by this schema.
        terms_document_ids:
          type: array
          items:
            type: string
            minLength: 1
            description: >-
              Opaque identifier, authorized within the API key workspace and
              environment.
          uniqueItems: true
          description: >-
            Terms document ids for Deal. Constraints, requiredness and allowed
            values are defined by this schema.
      required:
        - institution_reference
        - funded_amount
        - outstanding_amount
        - funded_at
        - maturity_date
        - repayment_frequency
        - terms_document_ids
      additionalProperties: false
      description: >-
        Complete institution-supplied deal terms at one point in time. Initial
        input is captured during enrollment; later inputs are append-only deal
        snapshots.
    DealPerformance:
      type: object
      properties:
        status:
          type: string
          enum:
            - current
            - delinquent
            - defaulted
            - paid_off
            - charged_off
          description: >-
            Current lifecycle state. See the product lifecycle and recovery
            guides.
        days_past_due:
          type: integer
          minimum: 0
          description: >-
            Days past due for DealPerformance. Constraints, requiredness and
            allowed values are defined by this schema.
        amount_past_due:
          $ref: '#/components/schemas/Money'
          description: >-
            Amount past due for DealPerformance. Constraints, requiredness and
            allowed values are defined by this schema.
        next_payment_due_at:
          anyOf:
            - type: string
              minLength: 1
              format: date
            - type: 'null'
          description: >-
            Next payment due at for DealPerformance. Constraints, requiredness
            and allowed values are defined by this schema.
        last_payment_at:
          anyOf:
            - type: string
              minLength: 1
              description: UTC timestamp in RFC 3339 format.
              format: date-time
            - type: 'null'
          description: >-
            Last payment at for DealPerformance. Constraints, requiredness and
            allowed values are defined by this schema.
      required:
        - status
        - days_past_due
        - amount_past_due
        - next_payment_due_at
        - last_payment_at
      additionalProperties: false
      description: >-
        Lender-reported performance, not an AMLOK servicing command. Currency
        must match the deal. Unknown values cannot be fabricated; omit
        performance entirely (null) when unavailable.
    Money:
      type: object
      properties:
        amount:
          type: string
          minLength: 1
          pattern: ^(?:0|[1-9][0-9]*)\.[0-9]{2}$
          description: >-
            Amount for Money. Constraints, requiredness and allowed values are
            defined by this schema.
        currency:
          type: string
          minLength: 1
          pattern: ^[A-Z]{3}$
          description: >-
            Currency for Money. Constraints, requiredness and allowed values are
            defined by this schema.
      required:
        - amount
        - currency
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Server-to-server API key bound to exactly one workspace, institution
        tenant and environment. No caller-supplied workspace override is
        accepted. Do not use in public browser code.

````

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