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

# Trigger action

> Runs a server-side action against a previously uploaded content resource. The canonical use is calling `?action=scan` on a content that was uploaded without one, to add OCR after the fact; the scan result is persisted on the resource so subsequent GETs surface it via `include=scanResult`.



## OpenAPI

````yaml openapi/findity-expense-api.json PUT /content/{id}
openapi: 3.0.3
info:
  title: Findity Expense API
  description: Findity Expense API
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api/v1/expense
  - url: https://api.findity.com/api/v1/expense
security:
  - bearerAuth: []
paths:
  /content/{id}:
    put:
      tags:
        - Content
      summary: Trigger action
      description: >-
        Runs a server-side action against a previously uploaded content
        resource. The canonical use is calling `?action=scan` on a content that
        was uploaded without one, to add OCR after the fact; the scan result is
        persisted on the resource so subsequent GETs surface it via
        `include=scanResult`.
      operationId: triggerContentAction
      parameters:
        - $ref: '#/components/parameters/contentId'
        - name: action
          in: query
          required: true
          description: >-
            Server-side action to run against the content. `scan` triggers
            synchronous OCR; the result is persisted on the resource.
          schema:
            type: string
            enum:
              - scan
          example: scan
        - $ref: '#/components/parameters/organizationIdQuery'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
              example:
                result: error
                code: CONTENT_NOT_FOUND
                description: Content not found
components:
  parameters:
    contentId:
      in: path
      name: id
      required: true
      description: UUID of the content resource (returned by `POST /content`).
      schema:
        $ref: '#/components/schemas/Uuid'
      example: c2a54d163907430cadca07fffcd770c1
    organizationIdQuery:
      in: query
      name: organizationId
      required: false
      description: >-
        Organization scope for the request. Required when the caller has access
        to more than one organization; auto-inferred otherwise.
      schema:
        $ref: '#/components/schemas/Uuid'
      example: 05b8daba9ba14a49846fe77883248cf0
  schemas:
    Content:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        personId:
          $ref: '#/components/schemas/Uuid'
        contentType:
          type: string
        isTemporary:
          type: boolean
        signatureType:
          type: string
          enum:
            - EU
        signatureUrl:
          type: string
        name:
          type: string
        description:
          type: string
        qrScan:
          type: string
          description: >-
            Decoded fiscal QR string as sent in the `qrScan` request header on
            POST. Omitted when the resource has no QR data attached. Currently
            populated for Portuguese receipts.
        scanResult:
          type: object
          readOnly: true
          properties:
            id:
              $ref: '#/components/schemas/Uuid'
            amount:
              type: number
              format: double
            taxAmount:
              type: number
              format: double
            currency:
              type: string
            purchaseDate:
              type: string
            categoryIds:
              type: array
              items:
                $ref: '#/components/schemas/Uuid'
            categoryId:
              $ref: '#/components/schemas/Uuid'
      example:
        id: 62bfaa54dc9341819cd6f4ff4ae39f44
        personId: 063ee3c7fa4b4728b418097299447f9d
        contentType: application/pdf
        isTemporary: true
        signatureType: null
        signatureUrl: null
        name: receipt-photo.jpg
        description: Receipt photo
        qrScan: >-
          A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111
          26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116
        scanResult:
          id: a185160800524ac68cbf0a18ad59649b
          amount: 135
          taxAmount: 23
          currency: SEK
          purchaseDate: '2023-04-20'
          categoryIds:
            - 575ba2572de74f38b947a07df93a2909
            - 350dadb020694421aebc1d9473fa64a9
          categoryId: 575ba2572de74f38b947a07df93a2909
    404Error:
      type: object
      properties:
        result:
          type: string
        code:
          type: string
        description:
          type: string
    Uuid:
      type: string
      pattern: ^[0-9a-fA-F]{32}$
      description: UUID without dashes (32-character hex string)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````