Phasio Customer Shipment Controller API

Endpoints for managing customer shipments and shipping calculations

OpenAPI Specification

phasio-customer-shipment-controller-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Phasio Activity Internal Customer Shipment 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 Shipment Controller
  description: Endpoints for managing customer shipments and shipping calculations
paths:
  /api/customer/v1/shipment/rate:
    post:
      tags:
      - Customer Shipment Controller
      summary: Calculate shipping rates
      description: Calculates available shipping rates based on parts and destination
      operationId: calculateRates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateRatesDtov2'
        required: true
      responses:
        '200':
          description: Successfully calculated shipping rates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShippingRatesDto'
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized - missing or invalid authentication
components:
  schemas:
    CalculateRatesDtov2:
      type: object
      description: Rate calculation parameters
      properties:
        currency:
          type: string
          enum:
          - USD
          - SGD
          - EUR
          - INR
          - JPY
          - AUD
          - GBP
          - NZD
          - MYR
          - CAD
          - CHF
          - DKK
          - SEK
          - MXN
          - ZAR
          - UAH
          - NOK
          - PHP
          - TRY
        organisationId:
          type: integer
          format: int64
        toAddressId:
          type: integer
          format: int64
        parts:
          type: array
          items:
            $ref: '#/components/schemas/PartShippingDetailDto'
      required:
      - currency
      - organisationId
      - parts
      - toAddressId
    PartShippingDetailDto:
      type: object
      properties:
        partRevisionId:
          type: string
          format: uuid
        units:
          type: string
          enum:
          - CENTIMETERS
          - MILLIMETERS
          - METRES
          - INCHES
          - FEET
        quantity:
          type: integer
        processPricesId:
          type: string
          format: uuid
        materialId:
          type: integer
          format: int64
      required:
      - materialId
      - partRevisionId
      - processPricesId
      - quantity
      - units
    ShippingRatesDto:
      type: object
      properties:
        shippingMethodId:
          type: integer
          format: int64
        tooLargeForBoxes:
          type: boolean
        errorWithCarrier:
          type: boolean
        rates:
          type: array
          items:
            $ref: '#/components/schemas/ShippingRateDto'
      required:
      - errorWithCarrier
      - rates
      - tooLargeForBoxes
    ShippingRateDto:
      type: object
      properties:
        id:
          type: string
        rate:
          type: number
        currency:
          type: string
        serviceType:
          type: string
        serviceName:
          type: string
        shippingMethodId:
          type: integer
          format: int64
      required:
      - currency
      - id
      - rate
      - serviceName
      - serviceType
      - shippingMethodId
  securitySchemes:
    Phasio API Bearer Token:
      type: http
      name: Authorization
      in: header
      scheme: bearer
      bearerFormat: JWT