Phasio Internal Customer Organisation Controller API

Endpoints for managing customer organizations from internal services

OpenAPI Specification

phasio-internal-customer-organisation-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Internal Customer Organisation 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: Internal Customer Organisation Controller
  description: Endpoints for managing customer organizations from internal services
paths:
  /api/internal/v1/customer-organisation/{organisationId}:
    get:
      tags:
      - Internal Customer Organisation Controller
      summary: Get customer organisation by ID
      description: Retrieves information about a specific customer organisation
      operationId: get_28
      parameters:
      - name: organisationId
        in: path
        description: Customer organisation ID to retrieve
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully retrieved customer organisation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerOrganisationDto'
        '400':
          description: Invalid organisation ID
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Customer organisation not found
  /api/internal/v1/customer-organisation/{organisationId}/custom-pricing:
    get:
      tags:
      - Internal Customer Organisation Controller
      summary: Check if customer organisation has custom pricing
      description: Determines whether a customer organisation has custom pricing configured
      operationId: hasCustomPricing
      parameters:
      - name: organisationId
        in: path
        description: Customer organisation ID to check
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully checked custom pricing status
          content:
            application/json:
              schema:
                type: boolean
        '400':
          description: Invalid organisation ID
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Customer organisation not found
  /api/internal/v1/customer-organisation/customer/{customerId}:
    get:
      tags:
      - Internal Customer Organisation Controller
      summary: Get customer organisation by customer ID
      description: Retrieves information about a specific customer organisation based on customer ID
      operationId: getByCustomer_2
      parameters:
      - name: customerId
        in: path
        description: Customer ID to retrieve
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully retrieved customer organisation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerOrganisationDto'
        '400':
          description: Invalid organisation ID
        '401':
          description: Unauthorized - missing or invalid authentication
        '404':
          description: Customer organisation not found
components:
  schemas:
    CustomerAddressDto:
      type: object
      properties:
        addressId:
          type: integer
          format: int64
        isBillingAddress:
          type: boolean
        isShippingAddress:
          type: boolean
        street1:
          type: string
        street2:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        countryAlpha2Code:
          type: string
        countryAlpha3Code:
          type: string
        jurisdictionIsoCode:
          type: string
        zip:
          type: string
        name:
          type: string
        company:
          type: string
        phone:
          type: string
        email:
          type: string
        residential:
          type: boolean
        taxId:
          type: string
    CustomerOrganisationDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        taxExempt:
          type: boolean
        customerType:
          type: string
        createdAt:
          type: string
          format: date-time
        lastUpdated:
          type: string
          format: date-time
        customers:
          type: array
          items:
            $ref: '#/components/schemas/CustomerDto'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/CustomerAddressDto'
      required:
      - addresses
      - createdAt
      - customerType
      - customers
      - lastUpdated
      - taxExempt
    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