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

# Upload receipt

> Upload a receipt image for an expense report. The receipt will be parsed using AI to extract amount, date, and merchant information. Accepts PNG, JPEG, WebP, and PDF formats.



## OpenAPI

````yaml post /expense-report/receipt
openapi: 3.1.0
info:
  title: Slash Public API
  description: API description
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.slash.com
    description: production
security:
  - api_key: []
  - partner_api_key: []
  - bearer: []
  - developer_application: []
paths:
  /expense-report/receipt:
    post:
      description: >-
        Upload a receipt image for an expense report. The receipt will be parsed
        using AI to extract amount, date, and merchant information. Accepts PNG,
        JPEG, WebP, and PDF formats.
      parameters:
        - name: filter:legalEntityId
          description: >-
            The legal entity ID. Required if authenticating with access to
            multiple legal entities.
          in: query
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The receipt image file to upload.
            encoding:
              file:
                contentType: image/png, image/jpeg, image/jpg, image/webp, application/pdf
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  documentId:
                    type: string
                    description: >-
                      The document ID of the uploaded receipt. Use this in `POST
                      /expense-report` to attach the receipt.
                  url:
                    type: string
                    description: A presigned URL to access the uploaded receipt.
                  expiresAt:
                    type: string
                    format: date-time
                    description: When the presigned URL expires.
                  parsedReceipt:
                    $ref: >-
                      #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceipt.yaml
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/ParsedReceipt
                      sourcePath: entity/ExpenseReport/ParsedReceipt.yaml
                      title: ParsedReceipt
                      origin: >-
                        /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
                      globalImport: true
                      typescript:
                        importPath: import  * as models from '@slashfi/models';
                        symbolValue: models.entity.ExpenseReport.ParsedReceipt
                        typeValue: models.entity.ExpenseReport.ParsedReceipt
                required:
                  - documentId
                  - url
                  - expiresAt
                  - parsedReceipt
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: TooManyRequests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - api_key: []
        - bearer: []
components:
  schemas:
    slashfi.models.entity.ExpenseReport.ParsedReceipt.yaml:
      type: object
      description: AI-extracted data from a receipt image or PDF
      properties:
        amount:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptAmount.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptAmount
            sourcePath: entity/ExpenseReport/ParsedReceiptAmount.yaml
            title: ParsedReceiptAmount
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        date:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptDate.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptDate
            sourcePath: entity/ExpenseReport/ParsedReceiptDate.yaml
            title: ParsedReceiptDate
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        merchant:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptMerchant.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptMerchant
            sourcePath: entity/ExpenseReport/ParsedReceiptMerchant.yaml
            title: ParsedReceiptMerchant
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
      required:
        - amount
        - date
        - merchant
      x-entrypoint:
        virtualPath: entity/ExpenseReport/ParsedReceipt
        sourcePath: entity/ExpenseReport/ParsedReceipt.yaml
        title: ParsedReceipt
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: ParsedReceipt
    Error:
      type: object
      properties:
        message:
          type: string
        name:
          type: string
        identifier:
          type: string
        rawStatus:
          type: number
        meta:
          type: object
          additionalProperties: true
      required:
        - message
        - name
        - identifier
        - rawStatus
      x-entrypoint:
        origin: ./src/publicApi
        sourcePath: ./src/publicApi/main.yaml
        title: Error
        virtualPath: components/Error
      title: Error
    slashfi.models.entity.ExpenseReport.ParsedReceiptAmount.yaml:
      type: object
      description: Extracted amount information from a receipt
      properties:
        valueCents:
          type: integer
          nullable: true
          description: Total amount in cents (e.g., 1846 for $18.46)
        currency:
          type: string
          nullable: true
          description: ISO 4217 currency code (defaults to USD)
        confidence:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptConfidence.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptConfidence
            sourcePath: entity/ExpenseReport/ParsedReceiptConfidence.yaml
            title: ParsedReceiptConfidence
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        rawText:
          type: string
          nullable: true
          description: Raw text extracted from receipt for this field
      required:
        - confidence
      x-entrypoint:
        virtualPath: entity/ExpenseReport/ParsedReceiptAmount
        sourcePath: entity/ExpenseReport/ParsedReceiptAmount.yaml
        title: ParsedReceiptAmount
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: ParsedReceiptAmount
    slashfi.models.entity.ExpenseReport.ParsedReceiptDate.yaml:
      type: object
      description: Extracted date information from a receipt
      properties:
        value:
          type: string
          format: date
          nullable: true
          description: Transaction date in YYYY-MM-DD format
        confidence:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptConfidence.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptConfidence
            sourcePath: entity/ExpenseReport/ParsedReceiptConfidence.yaml
            title: ParsedReceiptConfidence
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        rawText:
          type: string
          nullable: true
          description: Raw text extracted from receipt for this field
      required:
        - confidence
      x-entrypoint:
        virtualPath: entity/ExpenseReport/ParsedReceiptDate
        sourcePath: entity/ExpenseReport/ParsedReceiptDate.yaml
        title: ParsedReceiptDate
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: ParsedReceiptDate
    slashfi.models.entity.ExpenseReport.ParsedReceiptMerchant.yaml:
      type: object
      description: Extracted merchant information from a receipt
      properties:
        name:
          type: string
          nullable: true
          description: Merchant name as extracted from receipt
        merchantV2Id:
          $ref: '#/components/schemas/slashfi.models.id.MerchantV2Id.yaml'
          nullable: true
          description: ID of matched MerchantV2 entity (if found via similarity search)
          x-entrypoint:
            virtualPath: id/MerchantV2Id
            sourcePath: id/MerchantV2Id.yaml
            title: MerchantV2Id
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        merchantV2:
          $ref: '#/components/schemas/slashfi.models.entity.Merchant.MerchantV2.yaml'
          nullable: true
          description: >-
            Full MerchantV2 entity (if found via similarity search) - used for
            frontend cache population
          x-entrypoint:
            virtualPath: entity/Merchant/MerchantV2
            sourcePath: entity/Merchant/MerchantV2.yaml
            title: MerchantV2
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        confidence:
          $ref: >-
            #/components/schemas/slashfi.models.entity.ExpenseReport.ParsedReceiptConfidence.yaml
          x-entrypoint:
            virtualPath: entity/ExpenseReport/ParsedReceiptConfidence
            sourcePath: entity/ExpenseReport/ParsedReceiptConfidence.yaml
            title: ParsedReceiptConfidence
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        rawText:
          type: string
          nullable: true
          description: Raw text extracted from receipt for this field
      required:
        - confidence
      x-entrypoint:
        virtualPath: entity/ExpenseReport/ParsedReceiptMerchant
        sourcePath: entity/ExpenseReport/ParsedReceiptMerchant.yaml
        title: ParsedReceiptMerchant
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: ParsedReceiptMerchant
    slashfi.models.entity.ExpenseReport.ParsedReceiptConfidence.yaml:
      type: string
      enum:
        - high
        - medium
        - low
        - none
      description: |
        Confidence level for an extracted field:
        - high: Clearly visible and unambiguous
        - medium: Readable but may have minor issues (blur, partial visibility)
        - low: Partially visible, ambiguous, or assumptions were made
        - none: Not found or completely unreadable
      x-entrypoint:
        virtualPath: entity/ExpenseReport/ParsedReceiptConfidence
        sourcePath: entity/ExpenseReport/ParsedReceiptConfidence.yaml
        title: ParsedReceiptConfidence
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: ParsedReceiptConfidence
    slashfi.models.id.MerchantV2Id.yaml:
      type: string
      x-typescript:
        typeLiteral: merchant_v2_${string}
      description: Represent a Merchant V2 ID in the format of "merchant_v2_102jifoij01"
      x-entrypoint:
        virtualPath: id/MerchantV2Id
        sourcePath: id/MerchantV2Id.yaml
        title: MerchantV2Id
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: MerchantV2Id
    slashfi.models.entity.Merchant.MerchantV2.yaml:
      title: MerchantV2
      type: object
      required:
        - $entity
        - id
        - name
        - metadata
        - isLive
        - isInstantCashback
      properties:
        $entity:
          type: string
          enum:
            - merchant_v2
        id:
          type: string
        heronId:
          type: string
        name:
          type: string
        iconUrl:
          type: string
        logoUrl:
          type: string
        url:
          type: string
        isLive:
          type: boolean
        isInstantCashback:
          type: boolean
        merchantCategoryId:
          type: string
        metadata:
          $ref: '#/components/schemas/slashfi.models.entity.IMetadataModel.yaml'
          x-entrypoint:
            virtualPath: entity/IMetadataModel
            sourcePath: entity/IMetadataModel.yaml
            title: IMetadataModel
            origin: >-
              /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
      x-entrypoint:
        virtualPath: entity/Merchant/MerchantV2
        sourcePath: entity/Merchant/MerchantV2.yaml
        title: MerchantV2
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
    slashfi.models.entity.IMetadataModel.yaml:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
      required:
        - timestamp
      x-entrypoint:
        virtualPath: entity/IMetadataModel
        sourcePath: entity/IMetadataModel.yaml
        title: IMetadataModel
        origin: >-
          /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: IMetadataModel
  securitySchemes:
    api_key:
      type: apiKey
      description: |
        API key authentication for public API requests.

        Keys come in two flavors:

        - *Legal-entity-scoped keys* are pinned to a single legal entity.
          Minted via the dashboard under a specific entity; every request
          acts on that entity.
        - *User-scoped keys* are pinned to a user and span every legal
          entity that user has access to. Every request made with a
          user-scoped key (except `GET /legal-entity`, which lists the
          legal entities the user can access) must include an
          `x-legal-entity` header naming the legal entity the request is
          operating on. Requests without the header are rejected with
          `400`. The authenticated user must have an active permission
          role on the supplied legal entity, otherwise the request is
          rejected with `403`.
      name: X-API-Key
      in: header
    partner_api_key:
      type: apiKey
      description: |
        Partner-program API key authentication.

        Keys are minted in the partner dashboard (Developers → API Keys),
        are scoped to a single partner program, and are prefixed with
        `sk_partner_`. Partner keys are only accepted by routes that
        declare this scheme; they are rejected by `api_key` routes and
        vice versa.
      name: X-API-Key
      in: header
    bearer:
      type: http
      scheme: bearer
    developer_application:
      type: http
      scheme: basic

````