Locus Entity Management API

Manage core delivery-domain entities on the Locus platform: locations, riders, rider personas, rosters (including auto-create), shift managers, transporters, vehicles, vehicle models, homebases, and line items. Each entity supports create/update, fetch, and disable operations against base URL https://locus-api.com/v1.

Locus Entity Management API is one of 3 APIs that Locus publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Entities, Riders, Vehicles, Locations, and Rosters. The published artifact set on APIs.io includes API documentation and an OpenAPI specification.

OpenAPI Specification

locus-entities-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Locus API
  description: Manage your deliveries with the Locus API
  version: 1.0.0
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
  locusauth:
    type: basic
    description: HTTP Basic Authentication
  apiKeyAuth:
    type: apiKey
    in: header
    name: Authorization
paths:
  /client/{clientId}/location/{locationId}:
    get:
      summary: Get a location
      operationId: getLocation
      tags:
      - LocationMaster
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are CONTACT.
        required: false
        type: string
      responses:
        '200':
          description: location object
          schema:
            $ref: '#/definitions/MasterLocation'
      security:
      - locusauth: []
    put:
      summary: Create a location
      operationId: createLocation
      parameters:
      - name: location
        in: body
        description: Create location request
        required: true
        schema:
          $ref: '#/definitions/CreateLocationRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - LocationMaster
      responses:
        '200':
          description: Created location
          schema:
            $ref: '#/definitions/MasterLocation'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/LocationIdParam'
  /client/{clientId}/location/{locationId}/disable:
    post:
      description: Disable a specific location
      operationId: disableLocation
      tags:
      - LocationMaster
      responses:
        '200':
          description: Updated location
          schema:
            $ref: '#/definitions/MasterLocation'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/LocationIdParam'
  /client/{clientId}/lineitem/{lineItemId}:
    get:
      summary: Get a line item
      operationId: getLineItem
      tags:
      - SKUMaster
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are LOCATIONS.
        required: false
        type: string
      responses:
        '200':
          description: Line item object
          schema:
            $ref: '#/definitions/MasterLineItem'
      security:
      - locusauth: []
    put:
      summary: Create a line item
      operationId: createLineItem
      parameters:
      - name: lineItem
        in: body
        description: Create line item request
        required: true
        schema:
          $ref: '#/definitions/CreateLineItemRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - SKUMaster
      responses:
        '200':
          description: Created line item
          schema:
            $ref: '#/definitions/MasterLineItem'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/LineItemIdParam'
  /client/{clientId}/lineitem/{lineItemId}/disable:
    post:
      description: Disable a specific line item
      operationId: disableLineItem
      tags:
      - SKUMaster
      responses:
        '200':
          description: Updated line item
          schema:
            $ref: '#/definitions/MasterLineItem'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/LineItemIdParam'
  /client/{clientId}/transporter/{transporterId}:
    get:
      summary: Get a transporter
      operationId: getTransporter
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are CONTACT
        required: false
        type: string
      tags:
      - Transporter
      responses:
        '200':
          description: transporter object
          schema:
            $ref: '#/definitions/Transporter'
      security:
      - locusauth: []
    put:
      summary: Create a transporter
      operationId: createTransporter
      parameters:
      - name: transporter
        in: body
        description: Create transporter request
        required: true
        schema:
          $ref: '#/definitions/CreateTransporterRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - Transporter
      responses:
        '200':
          description: Created transporter
          schema:
            $ref: '#/definitions/Transporter'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/TransporterIdParam'
  /client/{clientId}/transporter/{transporterId}/disable:
    post:
      description: Disable a specific transporter
      operationId: disableTransporter
      tags:
      - Transporter
      responses:
        '200':
          description: Updated transporter
          schema:
            $ref: '#/definitions/Transporter'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/TransporterIdParam'
  /client/{clientId}/rider/{riderId}:
    get:
      summary: Get a rider
      operationId: getRider
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are SHIFTS, SALES_CATEGORIES,
          RIDER_PERSONA
        required: false
        type: string
      tags:
      - Rider
      responses:
        '200':
          description: rider object
          schema:
            $ref: '#/definitions/Rider'
      security:
      - locusauth: []
    put:
      summary: Create a rider
      operationId: createRider
      parameters:
      - name: rider
        in: body
        description: Create rider request
        required: true
        schema:
          $ref: '#/definitions/CreateRiderRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - Rider
      responses:
        '200':
          description: Created rider
          schema:
            $ref: '#/definitions/Rider'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RiderIdParam'
  /client/{clientId}/rider/{riderId}/disable:
    post:
      description: Disable a specific rider
      operationId: disableRider
      tags:
      - Rider
      responses:
        '200':
          description: Updated rider
          schema:
            $ref: '#/definitions/Rider'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RiderIdParam'
  /client/{clientId}/vehicle/{vehicleId}:
    get:
      summary: Get a vehicle by id
      operationId: getVehicle
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are SHIFTS, TRANSPORTER,
          RIDER, VEHICLE_MODEL.
        required: false
        type: string
      tags:
      - Vehicle
      responses:
        '200':
          description: Desired vehicle
          schema:
            $ref: '#/definitions/Vehicle'
      security:
      - locusauth: []
    put:
      summary: Create a new vehicle
      operationId: createVehicle
      parameters:
      - name: vehicle
        in: body
        description: Vehicle create request
        required: true
        schema:
          $ref: '#/definitions/CreateVehicleRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - Vehicle
      responses:
        '200':
          description: Created vehicle
          schema:
            $ref: '#/definitions/Vehicle'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/VehicleIdParam'
  /client/{clientId}/vehicle/{vehicleId}/disable:
    post:
      description: Disable a specific vehicle
      operationId: disableVehicle
      tags:
      - Vehicle
      responses:
        '200':
          description: Updated vehicle
          schema:
            $ref: '#/definitions/Vehicle'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/VehicleIdParam'
  /client/{clientId}/vehicle-model/{vehicleModelId}:
    get:
      summary: Get a vehicle model
      operationId: getVehicleModel
      parameters:
      - name: include
        in: query
        description: Extra field that should be returned. Supported value is TRANSPORTERS
        required: false
        type: string
      tags:
      - VehicleModel
      responses:
        '200':
          description: vehicle model object
          schema:
            $ref: '#/definitions/VehicleModel'
      security:
      - locusauth: []
    put:
      summary: Create a vehicle model
      operationId: createVehicleModel
      parameters:
      - name: vehicleModel
        in: body
        description: Create vehicle model request
        required: true
        schema:
          $ref: '#/definitions/CreateVehicleModelRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - VehicleModel
      responses:
        '200':
          description: Created vehicle model
          schema:
            $ref: '#/definitions/VehicleModel'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/VehicleModelIdParam'
  /client/{clientId}/vehicle-model/{vehicleModelId}/disable:
    post:
      description: Disable a specific vehicle model
      operationId: disableVehicleModel
      tags:
      - VehicleModel
      responses:
        '200':
          description: Updated vehicle model
          schema:
            $ref: '#/definitions/VehicleModel'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/VehicleModelIdParam'
  /client/{clientId}/rider-persona/{riderPersonaId}:
    get:
      summary: Get a rider persona by id
      operationId: getRiderPersona
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are TRANSPORTER.
        required: false
        type: string
      tags:
      - RiderPersona
      responses:
        '200':
          description: Desired rider persona
          schema:
            $ref: '#/definitions/RiderPersona'
      security:
      - locusauth: []
    put:
      summary: Create a new rider persona
      operationId: createRiderPersona
      parameters:
      - name: riderPersona
        in: body
        description: Rider persona create request
        required: true
        schema:
          $ref: '#/definitions/CreateRiderPersonaRequest'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - RiderPersona
      responses:
        '200':
          description: Created rider persona
          schema:
            $ref: '#/definitions/RiderPersona'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RiderPersonaIdParam'
  /client/{clientId}/rider-persona/{riderPersonaId}/disable:
    post:
      description: Disable a specific rider persona
      operationId: disableRiderPersona
      tags:
      - RiderPersona
      responses:
        '200':
          description: Updated rider persona
          schema:
            $ref: '#/definitions/RiderPersona'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RiderPersonaIdParam'
  /client/{clientId}/roster/{rosterId}:
    get:
      summary: Get Roster by Id
      operationId: getRoster
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are RESOURCES.
        required: false
        type: string
      tags:
      - Roster
      responses:
        '200':
          description: GetRosterResponse Object
          schema:
            $ref: '#/definitions/GetRosterResponse'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RosterIdParam'
  /client/{clientId}/rosters-auto-create:
    post:
      summary: API Bulk create rosters for api integrated clients
      operationId: createRostersApiRequest
      parameters:
      - name: CreateRostersApiRequest
        in: body
        description: Request body for api Integrated clients
        required: true
        schema:
          $ref: '#/definitions/CreateRostersApiRequest'
      tags:
      - Roster
      responses:
        '200':
          description: API Bulk create rosters response
          schema:
            $ref: '#/definitions/CreateRosterResponse'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/OverwriteParam'
  /client/{clientId}/roster/{rosterId}/disable:
    post:
      description: Disable a specific roster
      operationId: disableRoster
      tags:
      - Roster
      responses:
        '200':
          description: Updated roster
          schema:
            $ref: '#/definitions/Roster'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/RosterIdParam'
  /client/{clientId}/homebase-master/{homebaseId}:
    get:
      summary: Get a homebase
      operationId: getHomebase
      parameters:
      - name: include
        in: query
        description: Comma separated list of extra fields that should be returned. Supported values are CONTACT.
        type: string
      tags:
      - HomebaseMaster
      responses:
        '200':
          description: Homebase object
          schema:
            $ref: '#/definitions/Homebase'
      security:
      - locusauth: []
    put:
      summary: Create a homebase
      operationId: createHomebase
      parameters:
      - name: homebase
        in: body
        description: Create homebase request
        required: true
        schema:
          $ref: '#/definitions/Homebase'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - HomebaseMaster
      responses:
        '200':
          description: Created homebase
          schema:
            $ref: '#/definitions/Homebase'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/HomebaseIdParam'
  /client/{clientId}/homebase-master/{homebaseId}/status:
    post:
      description: Update status for a specific homebase
      operationId: updateHomebaseStatus
      parameters:
      - name: status
        in: body
        description: Updated status of homebase
        required: true
        schema:
          $ref: '#/definitions/EntityStatusUpdateRequest'
      tags:
      - HomebaseMaster
      responses:
        '200':
          description: Updated homebases
          schema:
            $ref: '#/definitions/Homebase'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/HomebaseIdParam'
  /client/{clientId}/shift-manager/{tagId}:
    get:
      summary: fetch shiftTag by id
      operationId: getShiftTag
      parameters:
      - name: include
        in: query
        description: Extra fields that should be returned.
        type: string
      tags:
      - ShiftTag
      responses:
        '200':
          description: ShiftTag object
          schema:
            $ref: '#/definitions/ShiftTag'
      security:
      - locusauth: []
    put:
      summary: Create a given shiftTag
      operationId: createShiftTag
      parameters:
      - name: shiftTag
        in: body
        description: Create shift tag request
        required: true
        schema:
          $ref: '#/definitions/ShiftTag'
      - $ref: '#/parameters/OverwriteParam'
      tags:
      - ShiftTag
      responses:
        '200':
          description: ShiftTag object
          schema:
            $ref: '#/definitions/ShiftTag'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/TagIdParam'
  /client/{clientId}/shift-manager/{tagId}/disable:
    post:
      description: Disable a specific Shift Tag
      operationId: disableShiftTag
      tags:
      - ShiftTag
      responses:
        '200':
          description: Updated shiftTag object
          schema:
            $ref: '#/definitions/ShiftTag'
      security:
      - locusauth: []
    parameters:
    - $ref: '#/parameters/ClientIdParam'
    - $ref: '#/parameters/TagIdParam'
parameters:
  ClientIdParam:
    name: clientId
    in: path
    description: Id of the client
    required: true
    type: string
  BatchIdParam:
    name: batchId
    in: path
    description: Id of the batch
    required: true
    type: string
  PlanIdParam:
    name: planId
    in: path
    description: Id of the plan
    required: true
    type: string
  ExportIdParam:
    name: exportId
    in: path
    description: Id of the export
    required: true
    type: string
  LocationIdParam:
    name: locationId
    in: path
    description: Id of the location
    required: true
    type: string
  LineItemIdParam:
    name: lineItemId
    in: path
    description: Id of the line item
    required: true
    type: string
  OutletIdParam:
    name: outletId
    in: path
    description: Id of the outlet
    required: true
    type: string
  PjpIdParam:
    name: pjpId
    in: path
    description: Id of the permanent journey plan
    required: true
    type: string
  ConfigIdParam:
    name: configId
    in: path
    description: Id of the scheduling configuration
    required: true
    type: string
  CarrierTeamQueryParam:
    name: carrierTeam
    in: query
    description: 'An option to filter based on teams, takes in a comma separated list of values and filter based on the same.

      If no value is provided, records are returned without filtering.

      '
    required: false
    type: string
  ContactIdParam:
    name: contactId
    in: path
    description: Id of the contact
    required: true
    type: string
  MultipartFileParam:
    name: file
    in: formData
    description: Multipart file
    required: true
    type: file
  TransporterIdParam:
    name: transporterId
    in: path
    description: Id of the transporter
    required: true
    type: string
  RiderIdParam:
    name: riderId
    in: path
    description: Id of the rider
    required: true
    type: string
  TeamIdParam:
    name: teamId
    in: path
    description: Id of the team
    required: true
    type: string
  MapIdParam:
    name: mapId
    in: path
    description: Id of the Map
    required: true
    type: string
  VersionIdParam:
    name: versionId
    in: path
    description: Id of the version
    required: true
    type: integer
    format: int32
  ShiftIdParam:
    name: shiftId
    in: path
    description: Id of the shift
    required: true
    type: string
  TagIdParam:
    name: tagId
    in: path
    description: Id of the shiftTag
    required: true
    type: string
  CustomerIdParam:
    name: customerId
    in: path
    description: Id of the customer
    required: true
    type: string
  AddressIdParam:
    name: addressId
    in: path
    description: Id of an address
    required: true
    type: string
  OverwriteParam:
    name: overwrite
    in: query
    description: Boolean flag if true, will overwrite the existing entity
    required: false
    type: boolean
  BulkImportParam:
    name: bulkImport
    in: query
    description: Boolean flag if true, indicates bulk import
    required: false
    type: boolean
  SalesCategoryIdParam:
    name: salesCategoryId
    in: path
    description: Id of salesCategory
    required: true
    type: string
  ContractIdParam:
    name: contractId
    in: path
    description: Id of the contract.
    required: true
    type: string
  VehicleModelIdParam:
    name: vehicleModelId
    in: path
    description: Id of a vehicle model
    required: true
    type: string
  VehicleIdParam:
    name: vehicleId
    in: path
    description: Id of the vehicle
    required: true
    type: string
  RiderPersonaIdParam:
    name: riderPersonaId
    in: path
    description: Id of the rider persona
    required: true
    type: string
  RosterIdParam:
    name: rosterId
    in: path
    description: Id of roster
    required: true
    type: string
  HomebaseIdParam:
    name: homebaseId
    in: path
    description: Id of homebase
    required: true
    type: string
  CostLookupIdParam:
    name: costLookupId
    in: path
    description: Id of cost lookup data
    required: true
    type: string
  FleetConfigIdParam:
    name: fleetConfigId
    in: path
    description: Id of the fleet configuration
    required: true
    type: string
  CostIdParam:
    name: costId
    in: path
    description: Id of the cost
    required: true
    type: string
  ManufacturingDependencyIdParam:
    name: manufacturingDependencyId
    in: path
    description: Id of the manufacturing dependency
    required: true
    type: string
  PersonnelIdParam:
    name: personnelId
    in: path
    description: Id of the personnel
    required: true
    type: string
  ShouldReturnTokenParam:
    name: shouldReturnToken
    in: query
    description: Boolean flag if true, send mail and then return token in response
    required: false
    type: boolean
    default: false
  NetworkDemandIdParam:
    name: networkDemandId
    in: path
    description: Id of the network demand
    required: true
    type: string
  DiscountIdParam:
    name: discountId
    in: path
    description: Id of the discount
    required: true
    type: string
  ConstraintIdParam:
    name: constraintId
    in: path
    description: Id of the constraint
    required: true
    type: string
  RoleIdParam:
    name: roleId
    in: path
    description: Id of the role
    required: true
    type: string
  InvoiceIdParam:
    name: invoiceId
    in: path
    description: Id of the invoice
    required: true
    type: string
  NoDueIdParam:
    name: noDueId
    in: path
    description: Id of the no-due certificate
    type: string
    required: true
  ChecklistConfigurationIdParam:
    name: checklistConfigurationId
    in: path
    description: Id of checklist configuration
    required: true
    type: string
  SmsConfigurationIdParam:
    name: smsConfigurationId
    in: path
    description: Id of the sms configuration
    required: true
    type: string
  RouteMasterIdParam:
    name: routeMasterId
    in: path
    description: Id of a route master
    required: true
    type: string
  MapUsecaseParam:
    name: mapUsecase
    in: path
    description: Use case of a map. Refer to the MapUsecaseType definition. Supported values are TRANSACTION_TIME
    required: true
    type: string
definitions:
  ClientId:
    required:
    - clientId
    properties:
      clientId:
        type: string
  GetOutletsResponse:
    description: Response of getOutlets API
    required:
    - outlets
    - paginationInfo
    properties:
      outlets:
        type: array
        items:
          $ref: '#/definitions/Outlet'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  GetMasterLocationsResponse:
    description: Response of getLocations API
    required:
    - clientId
    - locations
    - paginationInfo
    properties:
      clientId:
        type: string
      locations:
        type: array
        items:
          $ref: '#/definitions/MasterLocation'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  GetRidersResponse:
    description: Response of getRiders API
    required:
    - riders
    - paginationInfo
    properties:
      riders:
        type: array
        items:
          $ref: '#/definitions/Rider'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  CreateMasterLocationsResponse:
    required:
    - status
    properties:
      status:
        $ref: '#/definitions/CreateEntityResponseStatus'
  ExportStatusUpdateRequest:
    description: Wrapper for export status update request
    required:
    - status
    properties:
      status:
        $ref: '#/definitions/ExportStatusEnum'
  SchedulingConfigurationId:
    description: The id of configuration to use for the scheduling engine
    properties:
      clientId:
        type: string
      configId:
        type: string
      version:
        type: integer
        format: int32
  SerializedSchedulingConfigResponse:
    description: The wrapper for holding the serialized scheduling configuration
    required:
    - schedulingConfigurationId
    - serializedSchedulingConfig
    properties:
      schedulingConfigurationId:
        $ref: '#/definitions/SchedulingConfigurationId'
      serializedSchedulingConfig:
        description: The serialized scheduling configuration string
        type: string
  GetSalesCategoryResponse:
    description: Response of getSalesCategory API
    required:
    - salesCategories
    - paginationInfo
    properties:
      salesCategories:
        type: array
        items:
          $ref: '#/definitions/SalesCategory'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  CreateSalesCategoryRequest:
    description: Wrapper for sales category create request
    allOf:
    - $ref: '#/definitions/SalesCategory'
    - type: object
  CreateSalesCategoryResponse:
    description: Response of create sales categories request
    required:
    - status
    properties:
      status:
        $ref: '#/definitions/CreateEntityResponseStatus'
  Channel:
    description: A channel
    required:
    - id
    - name
    properties:
      id:
        description: Id of the channel
        type: string
      name:
        description: Name of the channel
        type: string
  GeocodingProvider:
    $ref: https://swagger.locus-api.com/geocoding.yaml#/definitions/GeocodingProvider
  GeocodingGoodness:
    $ref: https://swagger.locus-api.com/geocoding.yaml#/definitions/GeocodingGoodness
  GeocodingConfidence:
    $ref: https://swagger.locus-api.com/geocoding.yaml#/definitions/GeocodingConfidence
  AccuracyCategory:
    $ref: https://swagger.locus-api.com/geocoding.yaml#/definitions/AccuracyCategory
  GetMasterLineItemsResponse:
    description: Response of getLineItems API
    required:
    - lineItems
    - paginationInfo
    properties:
      lineItems:
        type: array
        items:
          $ref: '#/definitions/MasterLineItem'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  CreateMasterLineItemsResponse:
    required:
    - status
    properties:
      status:
        description: SUCCESS if all the line items are created. FAILURE if atleast one line item has failed.
        type: string
        enum:
        - SUCCESS
        - FAILURE
  MasterLineItemResponse:
    description: A line item
    allOf:
    - $ref: '#/definitions/MasterLineItem'
    - type: object
      properties:
        locations:
          type: array
          items:
            $ref: '#/definitions/MasterLocation'
  GetContactsResponse:
    description: Response of getContacts API
    required:
    - contacts
    - paginationInfo
    properties:
      contacts:
        type: array
        items:
          $ref: '#/definitions/Contact'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  GetTransportersResponse:
    description: Response of getTransporters API
    required:
    - transporters
    - paginationInfo
    properties:
      transporters:
        type: array
        items:
          $ref: '#/definitions/Transporter'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  CreateTransporterRequest:
    description: Wrapper for transporter create request
    allOf:
    - $ref: '#/definitions/Transporter'
    - type: object
  CreateTransportersResponse:
    description: Response for create transporters request
    required:
    - status
    properties:
      status:
        $ref: '#/definitions/CreateEntityResponseStatus'
  GeocodingEdits:
    description: The edits made by user for geocoded lat lngs
    properties:
      edits:
        type: array
        items:
          $ref: '#/definitions/GeocodingEditRequest'
  GeocodingEditRequest:
    description: Request object for editing the geocoded lat lngs
    required:
    - locationId
    - latLng
    properties:
      locationId:
        description: Id of the location.
        type: string
      latLng:
        $ref: '#/definitions/LatLng'
      verified:
        description: Boolean flag to indicate whether the lat lng is verified or not
        type: boolean
  GeocodingEdit:
    description: An edit made to the geocoded lat lng
    required:
    - latLng
    properties:
      latLng:
        $ref: '#/definitions/LatLng'
      provider:
        $ref: '#/definitions/GeocodingProvider'
      goodness:
        $ref: '#/definitions/GeocodingGoodness'
      confidence:
        $ref: '#/definitions/GeocodingConfidence'
  GetMapsResponse:
    description: Response of getMaps API
    required:
    - maps
    - paginationInfo
    properties:
      maps:
        type: array
        items:
          $ref: '#/definitions/CurrentKmlMap'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  CurrentKmlMap:
    description: Contains minimal KmlMap (without geometries), along with Active version and Latest version.
    properties:
      map:
        $ref: '#/definitions/KmlMap'
      currentVersion:
        type: integer
        format: int32
      activeVersion:
        type: integer
        format: int32
  GetVersionedMapsResponse:
    description: Response of getMapVersions API
    required:
    - maps
    - paginationInfo
    properties:
      maps:
        type: array
        items:
          $ref: '#/definitions/KmlMap'
      paginationInfo:
        $ref: '#/definitions/PaginationInfo'
  GetMapForTeamResponse:
    description: Response of getActiveMapByTeam API
    required:
    - map
    properties:
      map:
        $ref: '#/definitions/KmlMap'
  CreateServiceMapRequest:
    required:
    - geometries
    properties:
      geometries:
        type: array
        items:
          $ref: '#/definitions/ServiceMapGeometry'
  ServiceMap:
    description: A collection of region/localities serviced by a team/homebase for usecase as autosort, zonebased routing
      etc
    allOf:
    - $ref: '#/definitions/EntityDefinition'
    - type: object
      properties:
        geometries:
          type: array
          items:
            $ref: '#/definitions/ServiceMapGeometry'
        createdOn:
          description: Time of creation of first map version
          type: string
          format: date-time
        updatedOn:
          description: Time of updation of current map version
          type: string
          format: date-time
        actor:
          $ref: '#/definitions/Actor'
  ServiceMapGeometry:
    required:
    - id
    - name
    - geometry
    description: A shape on map, containing metedata as Name, Id, Localites etc. along actual LatLng geometry
    properties:
      id:
        $ref: '#/definitions/GeometryId'
      name:
        description: Name of the geometry
        type: string
      geometry:
        $ref: '#/definitions/LatLngGeometry'
      routeId:
        description: Id of autosort Route
        type: string
      teamId:
        description: Id of the team
        type: string
      homebaseId:
        description: Id of the homebase
        type: string
      description:
        description: Description text for the geometry
        type: string
      visualProperties:
        $ref: '#/definitions/GeometryVisualProperties'
      directoryId:
        description: folder directory id of the geomerty inside the map. If null, it exisits under default folder of map
        type: string
      transporterTypes:
        type: array
        items:
          $ref: '#/definitions/TransporterType'
  KmlMap:
    description: A collection of region/localities serviced by a team/homebase for usecase as autosort, zonebased routing
      etc
    allOf:
    - $ref: '#/definitions/EntityDefinition'
    - type: object
      properties:
        teamId:
          $ref: '#/definitions/TeamId'
        homebaseId:
          $ref: '#/definitions/LocationId'
        geometries:
          type: array
          items:
            $ref: '#/definitions/MapGeometry'
        de

# --- truncated at 32 KB (111 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/locus-sh/refs/heads/main/openapi/locus-entities-openapi.yml