Phasio Customer Expense Controller API

API for customers to view expenses on their orders

OpenAPI Specification

phasio-customer-expense-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Customer Expense Controller API
  description: This is the API documentation for the Phasio application.
  version: '1.0'
servers:
- url: https://m-api.eu.phas.io
  description: Generated server url
security:
- Phasio API Bearer Token: []
tags:
- name: Customer Expense Controller
  description: API for customers to view expenses on their orders
paths:
  /api/customer/v1/expense/{expenseId}:
    get:
      tags:
      - Customer Expense Controller
      summary: Get an expense by ID
      operationId: getExpense
      parameters:
      - name: expenseId
        in: path
        description: ID of the expense to retrieve
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      responses:
        '200':
          description: Expense retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseDto'
        '401':
          description: Unauthorized - missing customer or operator context
        '404':
          description: Expense not found
  /api/customer/v1/expense/order/{orderId}:
    get:
      tags:
      - Customer Expense Controller
      summary: Get all expenses for an order
      operationId: getExpensesByOrder
      parameters:
      - name: orderId
        in: path
        description: ID of the order to get expenses for
        required: true
        schema:
          type: integer
          format: int64
        example: 1
      responses:
        '200':
          description: Expenses retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseDto'
        '401':
          description: Unauthorized - missing customer or operator context
components:
  schemas:
    ExpenseDto:
      type: object
      properties:
        expenseId:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        type:
          type: string
      required:
      - expenseId
      - name
      - type
  securitySchemes:
    Phasio API Bearer Token:
      type: http
      name: Authorization
      in: header
      scheme: bearer
      bearerFormat: JWT