Slash Expense Report API

The Expense Report API from Slash — 7 operation(s) for expense report.

OpenAPI Specification

slash-expense-report-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Slash Public Account Expense Report 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: []
tags:
- name: Expense Report
paths:
  /expense-report:
    x-reference-path: paths/expense-report/route.yaml
    get:
      description: List expense reports for your legal entity. Supports pagination, filtering by status and submitter, and sorting.
      parameters:
      - name: cursor
        required: false
        in: query
        schema:
          type: string
        description: A cursor string to fetch the next page of results
        x-reference-path: schemas/Pagination/CursorParameter.yaml
      - name: filter:legalEntityId
        description: Filter by legal entity ID. Required if authenticating with access to multiple legal entities.
        in: query
        required: false
        schema:
          type: string
      - name: filter:status
        description: Filter expense reports by status.
        in: query
        required: false
        schema:
          type: string
          enum:
          - pending_review
          - cancelled
          - rejected
          - payment_processing
          - payment_completed
          - payment_failed
      - name: filter:submittedByUserId
        description: Filter expense reports by the user who submitted them.
        in: query
        required: false
        schema:
          type: string
      - name: sort
        description: Sort expense reports by a field. Default is by `submittedAt` descending.
        in: query
        required: false
        schema:
          type: string
          enum:
          - submittedAt
          - amountCents
          - transactionDate
      - name: sortDirection
        description: The direction to sort by. Defaults to DESC.
        in: query
        required: false
        schema:
          type: string
          enum:
          - ASC
          - DESC
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                      x-entrypoint:
                        virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                        sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                        title: PublicExpenseReportWithMetadata
                        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.PublicExpenseReportWithMetadata
                          typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                  metadata:
                    $ref: '#/components/schemas/Pagination.PaginationResponse'
                    x-entrypoint:
                      virtualPath: schemas/Pagination/PaginationResponse
                      sourcePath: schemas/Pagination/PaginationResponse.yaml
                      title: PaginationResponse
                      origin: ./src/publicApi
                required:
                - items
        '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: []
      tags:
      - Expense Report
    post:
      description: Submit a new expense report for reimbursement.
      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:
          application/json:
            schema:
              type: object
              properties:
                submittedByUserId:
                  type: string
                  description: The user ID of the employee submitting the expense report.
                amountCents:
                  type: integer
                  description: The expense amount in cents.
                currency:
                  type: string
                  description: ISO currency code (e.g., 'USD').
                  default: USD
                transactionDate:
                  type: string
                  format: date-time
                  description: The date of the transaction being reimbursed.
                memo:
                  type: string
                  nullable: true
                  description: Description or notes for the expense.
                destinationId:
                  type: string
                  description: The user's bank account ID for payout.
                documentIds:
                  type: array
                  items:
                    type: string
                  description: IDs of uploaded receipt documents to attach.
                merchant:
                  type: object
                  description: Merchant reference for the expense.
                  properties:
                    type:
                      type: string
                      enum:
                      - merchantV2
                      - customMerchant
                      description: Type of merchant reference.
                    id:
                      type: string
                      description: ID of the merchant.
                  required:
                  - type
                  - id
                fxRateToUsd:
                  type: string
                  nullable: true
                  description: FX rate from expense currency to USD at submission time. Required for non-USD currencies.
                fxRateUpdatedAt:
                  type: string
                  format: date-time
                  nullable: true
                  description: When the FX rate was captured.
                noReceiptReason:
                  type: string
                  nullable: true
                  description: Reason for not having a receipt. Required when no documentIds are provided.
              required:
              - submittedByUserId
              - amountCents
              - transactionDate
              - destinationId
              - merchant
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenseReport:
                    $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                      sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                      title: PublicExpenseReportWithMetadata
                      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.PublicExpenseReportWithMetadata
                        typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                required:
                - expenseReport
        '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: []
      tags:
      - Expense Report
  /expense-report/{expenseReportId}:
    x-reference-path: paths/expense-report/{expenseReportId}/route.yaml
    get:
      description: Get a single expense report by ID.
      parameters:
      - name: expenseReportId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenseReport:
                    $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                      sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                      title: PublicExpenseReportWithMetadata
                      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.PublicExpenseReportWithMetadata
                        typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                required:
                - expenseReport
        '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: []
      tags:
      - Expense Report
    patch:
      description: Update an existing expense report. Can only update reports with status `pending_review`. Set `status` to `cancelled` to cancel the report.
      parameters:
      - name: expenseReportId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                updatedByUserId:
                  type: string
                  description: The user ID of the person performing the update.
                amountCents:
                  type: integer
                  description: The expense amount in cents.
                currency:
                  type: string
                  description: ISO currency code (e.g., 'USD').
                transactionDate:
                  type: string
                  format: date-time
                  description: The date of the transaction being reimbursed.
                memo:
                  type: string
                  nullable: true
                  description: Description or notes for the expense.
                destinationId:
                  type: string
                  description: The user's bank account ID for payout.
                documentIds:
                  type: array
                  items:
                    type: string
                  description: IDs of uploaded receipt documents to attach.
                merchant:
                  type: object
                  description: Merchant reference for the expense.
                  properties:
                    type:
                      type: string
                      enum:
                      - merchantV2
                      - customMerchant
                      description: Type of merchant reference.
                    id:
                      type: string
                      description: ID of the merchant.
                  required:
                  - type
                  - id
                status:
                  type: string
                  enum:
                  - cancelled
                  description: Set to `cancelled` to cancel the expense report.
              required:
              - updatedByUserId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenseReport:
                    $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                      sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                      title: PublicExpenseReportWithMetadata
                      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.PublicExpenseReportWithMetadata
                        typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                required:
                - expenseReport
        '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: []
      tags:
      - Expense Report
  /expense-report/{expenseReportId}/approve:
    x-reference-path: paths/expense-report/{expenseReportId}/approve/route.yaml
    post:
      description: Approve an expense report and initiate payout.
      parameters:
      - name: expenseReportId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reviewedByUserId:
                  type: string
                  description: The user ID of the admin approving the expense report.
              required:
              - reviewedByUserId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenseReport:
                    $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                      sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                      title: PublicExpenseReportWithMetadata
                      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.PublicExpenseReportWithMetadata
                        typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                required:
                - expenseReport
        '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: []
      tags:
      - Expense Report
  /expense-report/{expenseReportId}/reject:
    x-reference-path: paths/expense-report/{expenseReportId}/reject/route.yaml
    post:
      description: Reject an expense report.
      parameters:
      - name: expenseReportId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reviewedByUserId:
                  type: string
                  description: The user ID of the admin rejecting the expense report.
                reason:
                  type: string
                  description: The reason for rejecting the expense report.
              required:
              - reviewedByUserId
              - reason
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenseReport:
                    $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.PublicExpenseReportWithMetadata.yaml'
                    x-entrypoint:
                      virtualPath: entity/ExpenseReport/PublicExpenseReportWithMetadata
                      sourcePath: entity/ExpenseReport/PublicExpenseReportWithMetadata.yaml
                      title: PublicExpenseReportWithMetadata
                      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.PublicExpenseReportWithMetadata
                        typeValue: models.entity.ExpenseReport.PublicExpenseReportWithMetadata
                required:
                - expenseReport
        '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: []
      tags:
      - Expense Report
  /expense-report/receipt:
    x-reference-path: paths/expense-report/receipt/route.yaml
    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: []
      tags:
      - Expense Report
  /expense-report/bulk-action:
    x-reference-path: paths/expense-report/bulk-action/route.yaml
    patch:
      description: Perform bulk actions on expense reports.
      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:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum:
                  - approve
                  - reject
                  - cancel
                  description: The action to perform on the expense reports.
                expenseReportIds:
                  type: array
                  items:
                    type: string
                  description: List of expense report IDs to act on.
                reviewedByUserId:
                  type: string
                  description: Required for `approve` and `reject` actions. The user ID of the admin performing the action.
                cancelledByUserId:
                  type: string
                  description: Required for `cancel` action. The user ID whose reports to cancel.
                reason:
                  type: string
                  description: Required for `reject` action. The reason for rejecting.
              required:
              - action
              - expenseReportIds
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  successCount:
                    type: integer
                    description: The number of expense reports successfully acted on.
                  failedIds:
                    type: array
                    items:
                      type: string
                    description: IDs of expense reports that failed to be acted on.
                required:
                - successCount
                - failedIds
        '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: []
      tags:
      - Expense Report
  /expense-report/reimbursement-sources:
    x-reference-path: paths/expense-report/reimbursement-sources/route.yaml
    get:
      description: Get connected bank accounts for a user that can be used as reimbursement payout destinations. Pass the `userId` query parameter to specify which user's bank accounts to retrieve.
      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
      - name: userId
        description: The user ID to get reimbursement sources for. Required.
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/slashfi.models.entity.ExpenseReport.ReimbursementSource.yaml'
                      x-entrypoint:
                        virtualPath: entity/ExpenseReport/ReimbursementSource
                        sourcePath: entity/ExpenseReport/ReimbursementSource.yaml
                        title: ReimbursementSource
                        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.ReimbursementSource
                          typeValue: models.entity.ExpenseReport.ReimbursementSource
                required:
                - data
        '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: []
      tags:
      - Expense Report
components:
  schemas:
    slashfi.models.entity.ExpenseReport.PublicReimbursementSource.yaml:
      type: object
      description: A minimal bank account summary for public API responses
      properties:
        id:
          type: string
        accountName:
          type: string
        mask:
          type: string
        institution:
          type: object
          required:
          - id
          - name
          properties:
            id:
              type: string
            name:
              type: string
        institutionLogo:
          type: string
          description: Base64 encoded institution logo
      required:
      - id
      - accountName
      - institution
      x-entrypoint:
        virtualPath: entity/ExpenseReport/PublicReimbursementSource
        sourcePath: entity/ExpenseReport/PublicReimbursementSource.yaml
        title: PublicReimbursementSource
        origin: /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
        globalImport: true
      title: PublicReimbursementSource
    slashfi.models.entity.Document.IDocumentModel.yaml:
      type: object
      properties:
        $entity:
          type: string
          enum:
          - document
        id:
          type: string
        accountType:
          type: string
          enum:
          - legalEntity
          - slashAccount
          - slashAccountGroup
          - loan
          - card
          - dispute
          - productApplication
          - ach
          - wire
          - adminNote
          - businessIdentity
          - subaccount
          - atomicInvestSleeve
          - atomicInvestAccount
          - accountingEntry
          - slashWalletAccount
          - slashWallet
          - affiliatePayoutProfile
          - user
          - notification
          - expenseReport
          - globalUsdAch
          - globalUsdWire
          - globalUsdSwift
          - globalUsdCrypto
          - featureAnnouncement
        accountId:
          type: string
        startDate:
          type: string
        endDate:
          type: string
        filename:
          type: string
        status:
          $ref: '#/components/schemas/slashfi.models.entity.Document.DocumentStatus.yaml'
          x-entrypoint:
            virtualPath: entity/Document/DocumentStatus
            sourcePath: entity/Document/DocumentStatus.yaml
            title: DocumentStatus
            origin: /home/packages/api-specs/server-api-v2/node_modules/@slashfi/models/schemas
            globalImport: true
        error:
          type: string
        checksum:
          type: string
        accessLevel:
          type: string
        documentType:
          $ref: '#/components/schem

# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/slash/refs/heads/main/openapi/slash-expense-report-api-openapi.yml