Phasio Customer Controller API

Endpoints for managing customer information

OpenAPI Specification

phasio-customer-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Customer 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 Controller
  description: Endpoints for managing customer information
paths:
  /api/customer/v1/customer:
    get:
      tags:
      - Customer Controller
      summary: Get current customer profile
      description: Retrieves information about the currently authenticated customer user
      operationId: getCustomer_2
      responses:
        '200':
          description: Successfully retrieved customer information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDto'
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Customer not found
    delete:
      tags:
      - Customer Controller
      summary: Delete customer account
      description: Deletes the currently authenticated customer's account and associated data
      operationId: deleteCustomer
      responses:
        '204':
          description: Customer successfully deleted
        '400':
          description: Unable to delete customer
        '401':
          description: Unauthorized - missing or invalid authentication
    patch:
      tags:
      - Customer Controller
      summary: Update customer profile
      description: Updates information for the currently authenticated customer
      operationId: updateCustomer_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerDto'
        required: true
      responses:
        '200':
          description: Customer successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDto'
        '400':
          description: Invalid update request
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Customer not found
components:
  schemas:
    UpdateCustomerDto:
      type: object
      description: Customer information to update
      properties:
        customerId:
          type: integer
          format: int64
        email:
          type: string
        phoneNumber:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        notificationPreference:
          type: string
        language:
          type: string
      required:
      - customerId
    CustomerDto:
      type: object
      properties:
        email:
          type: string
        customerId:
          type: integer
          format: int64
        organisationName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        phoneNumber:
          type: string
        language:
          type: string
        notificationPreference:
          type: string
        discountId:
          type: integer
          format: int64
        discountPercentage:
          type: number
        customerType:
          type: string
      required:
      - customerType
      - language
      - notificationPreference
  securitySchemes:
    Phasio API Bearer Token:
      type: http
      name: Authorization
      in: header
      scheme: bearer
      bearerFormat: JWT