openapi: 3.0.1

info:
  title: Profit Tools Core API
  version: "1.0"
  description: Provide Core API services to access and manipulate Profit Tools TMS entities.
  contact:
    name: Profit Tools
    url: http://www.profittools.net
    email: support@profittools.net

servers:
  - url: https://core.envaseconnect.cloud
    description: Production Server
  - url: https://core-stg.envaseconnect.cloud
    description: Staging Server
  - url: https://core-dev.envaseconnect.cloud
    description: Development Server

tags:
  - name: admin
    description: Service information endpoints
  - name: carriers
    description: Carrier service endpoints
  - name: customers
    description: Customer service endpoints
  - name: divisions
    description: Divisions service endpoints
  - name: drivers
    description: Drivers service endpoints
  - name: equipment
    description: Equipment service endpoints
  - name: equipment-chassis
    description: Chassis service endpoints
  - name: equipment-containers
    description: Containers service endpoints
  - name: equipment-leases
    description: Lease service endpoints
  - name: equipment-tractors
    description: Tractors service endpoints
  - name: equipment-trailers
    description: Trailers service endpoints
  - name: equipment-trucks
    description: Trucks service endpoints
  - name: images
    description: images service endpoints
  - name: item-groups
    description: Items groups endpoints
  - name: locations-cross-docks
    description: Cross-Dock service endpoints
  - name: locations-sites
    description:  Site service endpoints
  - name: locations-yards
    description: Yard service endpoints
  - name: shipments
    description: Shipments service endpoints
  - name: shipment-equipment
    description: Shipment equipment service endpoints
  - name: shipment-chassis
    description: Shipment chassis service endpoints
  - name: shipment-containers
    description: Shipment containers service endpoints
  - name: shipment-trailers
    description: Shipment trailers service endpoints
  - name: shipment-images
    description: Shipment image types endpoint
  - name: shipment-line-items
    description: Shipment line items service endpoints
  - name: shipment-itinerary
    description: Shipment itinerary service endpoints
  - name: tracing
    description: Tracing endpoints


paths:
  /admin/about:
    $ref: 'schemas/admin.yaml#/paths/admin.about'

  /carriers :
    $ref: 'schemas/companies/carriers.yaml#/paths/carriers'

  /carriers/{carrierId}:
    $ref: 'schemas/companies/carriers.yaml#/paths/carriers.carrierId'

  /customers :
    $ref: 'schemas/companies/customers.yaml#/paths/customers'

  /customers/{customerId}:
    $ref: 'schemas/companies/customers.yaml#/paths/customers.customerId'

  /divisions:
    $ref: 'schemas/shipments/divisions.yaml#/paths/divisions'

  /drivers:
    $ref: 'schemas/employees/drivers.yaml#/paths/drivers'

  /drivers/{driverId}:
    $ref: 'schemas/employees/drivers.yaml#/paths/drivers.driverId'

  /drivers/{driverId}/endorsements:
    $ref: 'schemas/employees/drivers.yaml#/paths/endorsements'

  /drivers/{driverId}/plans:
    $ref: 'schemas/employees/drivers.yaml#/paths/plans'

  /drivers/{driverId}/non-shipment-events/{eventId}:
    $ref: 'schemas/employees/drivers.yaml#/paths/non-shipment.eventId'

  /equipment/chassis:
    $ref: 'schemas/equipment/chassis.yaml#/paths/equipment.chassis'

  /equipment/chassis/{chassisId}:
    $ref: 'schemas/equipment/chassis.yaml#/paths/equipment.chassis.chassisId'

  /equipment/containers:
    $ref: 'schemas/equipment/containers.yaml#/paths/containers'

  /equipment/containers/{containerId}:
    $ref: 'schemas/equipment/containers.yaml#/paths/containers.containerId'

  /equipment/leases:
    $ref: 'schemas/equipment/lease_types.yaml#/paths/leases'

  /equipment/leases/{leaseId}:
    $ref: 'schemas/equipment/lease_types.yaml#/paths/leases.leaseId'

  /equipment/tractors:
    $ref: 'schemas/equipment/tractors.yaml#/paths/tractors'

  /equipment/tractors/{tractorId}:
    $ref: 'schemas/equipment/tractors.yaml#/paths/tractors.tractorId'

  /equipment/trailers:
    $ref: 'schemas/equipment/trailers.yaml#/paths/trailers'

  /equipment/trailers/{trailerId}:
    $ref: 'schemas/equipment/trailers.yaml#/paths/trailers.trailerId'

  /equipment/trucks:
    $ref: 'schemas/equipment/trucks.yaml#/paths/trucks'

  /equipment/trucks/{truckId}:
    $ref: 'schemas/equipment/trucks.yaml#/paths/trucks.truckId'

  /images:
    $ref: 'schemas/images.yaml#/paths/images'

  /images/types:
    $ref: 'schemas/images.yaml#/paths/images.types'

  /item-groups:
    $ref: 'schemas/item_groups.yaml#/paths/item'

  /item-groups/{itemGroupId}:
    $ref: 'schemas/item_groups.yaml#/paths/item.itemGroupId'

  /locations/cross-docks:
    $ref: 'schemas/locations/cross_docks.yaml#/paths/cross-docks'

  /locations/cross-docks/{crossDockId}:
    $ref: 'schemas/locations/cross_docks.yaml#/paths/cross-docks.crossDockId'

  /locations/sites:
    $ref: 'schemas/locations/sites.yaml#/paths/sites'

  /locations/sites/{siteId}:
    $ref: 'schemas/locations/sites.yaml#/paths/sites.siteId'

  /locations/yards:
    $ref: 'schemas/locations/yards.yaml#/paths/yards'

  /locations/yards/{yardId}:
    $ref: 'schemas/locations/yards.yaml#/paths/yards.yardId'

  /shipments:
    $ref: 'schemas/shipments/shipments.yaml#/paths/shipments'

  /shipments/{shipmentId}:
    $ref: 'schemas/shipments/shipments.yaml#/paths/shipments.shipmentId'

  /shipments/{shipmentId}/equipment:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment'

  /shipments/{shipmentId}/images:
    $ref: 'schemas/shipments/shipments.yaml#/paths/shipments.shipmentId.images'

  /shipments/{shipmentId}/equipment/chassis:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.chassis'

  /shipments/{shipmentId}/equipment/chassis/{referenceId}:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.chassis.referenceId'

  /shipments/{shipmentId}/equipment/chassis/{chassisId}:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.chassis.chassisId'

  /shipments/{shipmentId}/equipment/containers:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.containers'

  /shipments/{shipmentId}/equipment/containers/{referenceId}:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.containers.referenceId'

  /shipments/{shipmentId}/equipment/containers/{containerId}:
      $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.containers.containerId'

  /shipments/{shipmentId}/equipment/trailers:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.trailers'

  /shipments/{shipmentId}/equipment/trailers/{referenceId}:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.trailers.referenceId'

  /shipments/{shipmentId}/equipment/trailers/{trailerId}:
    $ref: 'schemas/shipments/equipment.yaml#/paths/equipment.trailers.trailerId'

  /shipments/{shipmentId}/itinerary:
    $ref: 'schemas/shipments/itinerary.yaml#/paths/itinerary'

  /shipments/{shipmentId}/items:
    $ref: 'schemas/shipments/items.yaml#/paths/items'

  /shipments/{shipmentId}/items/{itemId}:
    $ref: 'schemas/shipments/items.yaml#/paths/items.itemId'

  /track-and-trace/results:
    $ref: 'schemas/tracing.yaml#/paths/results'

components:
  schemas:
    AboutInfo:
      $ref: 'schemas/admin.yaml#/components/schemas/AboutInfo'

    Carrier:
      $ref: 'schemas/companies/carriers.yaml#/components/schemas/Carrier'

    CarrierCollection:
      $ref: 'schemas/companies/carriers.yaml#/components/schemas/CarrierCollection'

    Chassis:
      $ref: 'schemas/equipment/chassis.yaml#/components/schemas/Chassis'

    ChassisCollection:
      $ref: 'schemas/equipment/chassis.yaml#/components/schemas/ChassisCollection'

    Container:
      $ref: 'schemas/equipment/containers.yaml#/components/schemas/Container'

    ContainerCollection:
      $ref: 'schemas/equipment/containers.yaml#/components/schemas/ContainerCollection'

    CrossDock:
      $ref: 'schemas/locations/cross_docks.yaml#/components/schemas/CrossDock'

    CrossDockCollection:
      $ref: 'schemas/locations/cross_docks.yaml#/components/schemas/CrossDockCollection'

    Customer:
      $ref: 'schemas/companies/customers.yaml#/components/schemas/Customer'

    CustomerCollection:
      $ref: 'schemas/companies/customers.yaml#/components/schemas/CustomerCollection'

    Data:
      $ref: 'schemas/core.yaml#/components/schemas/Data'

    DivisionCollection:
      $ref: 'schemas/shipments/divisions.yaml#/components/schemas/DivisionCollection'

    Driver:
      $ref: 'schemas/employees/drivers.yaml#/components/schemas/Driver'

    DriverCollection:
      $ref: 'schemas/employees/drivers.yaml#/components/schemas/DriverCollection'

    DriverEndorsements:
      $ref: 'schemas/employees/drivers.yaml#/components/schemas/DriverEndorsements'

    DriverPlans:
      $ref: 'schemas/employees/drivers.yaml#/components/schemas/DriverPlans'

    DriverNonShipmentEvent:
      $ref: 'schemas/employees/drivers.yaml#/components/schemas/DriverNonShipmentEvent'

    Eld:
      $ref: 'schemas/comm_devices/eld.yaml#/components/schemas/Eld'

    Error:
      $ref: 'schemas/core.yaml#/components/schemas/Error'

    Event:
      $ref: 'schemas/shipments/itinerary.yaml#/components/schemas/Event'

    Itinerary:
      $ref: 'schemas/shipments/itinerary.yaml#/components/schemas/Itinerary'

    ImagesArrayPath:
      $ref: 'schemas/images.yaml#/components/schemas/PublishArrayImageDataPath'

    ImagesTypes:
      $ref: 'schemas/images.yaml#/components/schemas/ImagesTypes'

    SingleImagesPath:
      $ref: 'schemas/images.yaml#/components/schemas/PublishSingleImageDataPath'

    ImagesArrayURL:
      $ref: 'schemas/images.yaml#/components/schemas/PublishArrayImageDataURL'

    SingleImagesURL:
      $ref: 'schemas/images.yaml#/components/schemas/PublishSingleImageDataURL'

    ItemGroup:
      $ref: 'schemas/item_groups.yaml#/components/schemas/ItemGroup'

    ItemGroupsCollection:
      $ref: 'schemas/item_groups.yaml#/components/schemas/ItemGroupsCollection'

    Lease:
      $ref: 'schemas/equipment/lease_types.yaml#/components/schemas/Lease'

    LeaseCollection:
      $ref: 'schemas/equipment/lease_types.yaml#/components/schemas/LeaseCollection'

    Shipment:
      $ref: 'schemas/shipments/shipments.yaml#/components/schemas/Shipment'

    ShipmentChassis:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentChassis'

    ShipmentChassisCollection:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentChassisCollection'

    ShipmentsCollection:
      $ref: 'schemas/shipments/shipments.yaml#/components/schemas/ShipmentsCollection'

    ShipmentContainer:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentContainer'

    ShipmentContainerCollection:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentContainerCollection'

    ShipmentTrailerCollection:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentTrailerCollection'

    ShipmentTrailer:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentTrailer'

    ShipmentEquipmentCollection:
      $ref: 'schemas/shipments/equipment.yaml#/components/schemas/ShipmentEquipmentCollection'

    ShipmentImages:
      $ref: 'schemas/shipments/shipments.yaml#/components/schemas/ShipmentImages'

    ShipmentItem:
      $ref: 'schemas/shipments/items.yaml#/components/schemas/ShipmentItem'

    ShipmentItemCollection:
      $ref: 'schemas/shipments/items.yaml#/components/schemas/ShipmentItemCollection'

    Site:
      $ref: 'schemas/locations/sites.yaml#/components/schemas/Site'

    SiteCollection:
      $ref: 'schemas/locations/sites.yaml#/components/schemas/SiteCollection'

    TracedContainer:
      $ref: 'schemas/tracing.yaml#/components/schemas/TracedContainer'

    Tractor:
      $ref: 'schemas/equipment/tractors.yaml#/components/schemas/Tractor'

    TractorCollection:
        $ref: 'schemas/equipment/tractors.yaml#/components/schemas/TractorCollection'

    Trailer:
      $ref: 'schemas/equipment/trailers.yaml#/components/schemas/Trailer'

    TrailerCollection:
        $ref: 'schemas/equipment/trailers.yaml#/components/schemas/TrailerCollection'

    Truck:
      $ref: 'schemas/equipment/trucks.yaml#/components/schemas/Truck'

    TruckCollection:
        $ref: 'schemas/equipment/trucks.yaml#/components/schemas/TruckCollection'

    Yard:
      $ref: 'schemas/locations/yards.yaml#/components/schemas/Yard'

    YardCollection:
      $ref: 'schemas/locations/yards.yaml#/components/schemas/YardCollection'
