openapi: 3.0.3
info:
  title: CRO Software API
  version: 2.x
  description: REST API for the CRO Software waste management and logistics platform.
    Authenticate via OAuth2 (client_credentials or authorization_code). All requests
    require a Bearer token and an X-Tenant-Id header.
servers:
- url: https://api.crosoftware.com/v0
  description: Production
paths:
  /products:
    get:
      operationId: products_list_products
      summary: List Products
      description: List products.
      tags:
      - Products
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductListModel'
  /locations/{location_id}/jobs/{job_id}/additional_items:
    post:
      operationId: jobs_create_additional_item
      summary: Create Additional Item
      description: Create additional item for a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAdditionalItemModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdditionalItemModel'
  /locations/{location_id}/jobs:
    post:
      operationId: jobs_create_job
      summary: Create Job
      description: Create a new job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobRequestBodyModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
    get:
      operationId: jobs_list_jobs
      summary: List Jobs
      description: List jobs.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: completed
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked completed. If false, return
            only records marked incomplete. If unspecified, return all.
      - name: completed_by
        in: query
        required: false
        schema:
          type: integer
          description: Driver or dispatcher identifier.
      - name: completed_by_driver
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked completed by a driver.
            If false, return only records marked incomplete. If unspecified, return
            all.
      - name: created_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
      - name: deleted
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
      - name: driver_id
        in: query
        required: false
        schema:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
      - name: failed
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked deleted. If false, return
            only records marked as deleted. If unspecified, return all.
      - name: is_dispatched
        in: query
        required: false
        schema:
          type: boolean
          description: Filter jobs based on dispatch status. If true, records with
            a valid truck_id (dispatched) are returned. If false, records with no
            truck_id (not dispatched) are returned. If null, all records are returned.
      - name: last_updated_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      - name: returned_by
        in: query
        required: false
        schema:
          type: integer
          description: Driver or dispatcher identifier.
      - name: returned_by_driver
        in: query
        required: false
        schema:
          type: boolean
          description: Return only records returned by driver when TRUE.
      - name: schedule_gt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled after. If unspecified, return all.
      - name: schedule_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled on or after. If unspecified, return
            all.
      - name: schedule_lt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled before.
      - name: schedule_lte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled on or before.
      - name: truck_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobListModel'
  /locations/{location_id}/jobs/{job_id}/decline:
    post:
      operationId: jobs_decline_job
      summary: Decline Job
      description: Decline a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /locations/{location_id}/jobs/{job_id}/additional_items/{job_item_id}:
    delete:
      operationId: jobs_delete_additional_item
      summary: Delete Additional Item
      description: Delete additional item for a job. Drivers may only delete items
        not marked as required.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: job_item_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Additional item identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyContentResponseModel'
    patch:
      operationId: jobs_update_additional_item
      summary: Update Additional Item
      description: Update additional item for a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: job_item_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Additional item identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAdditionalItemModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdditionalItemModel'
  /locations/{location_id}/jobs/{job_id}/delete:
    post:
      operationId: jobs_delete_job
      summary: Delete Job
      description: Delete a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /locations/{location_id}/jobs/{job_id}/dispatch:
    patch:
      operationId: jobs_dispatch_job
      summary: Dispatch Job
      description: Dispatch a job by id.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DispatchJobRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /locations/{location_id}/jobs/{job_id}/fail:
    post:
      operationId: jobs_fail_a_job
      summary: Fail a Job
      description: Fail a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FailJobRequestBodyModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /locations/{location_id}/jobs/{job_id}:
    get:
      operationId: jobs_get_job
      summary: Get Job
      description: Get job configuration.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
    patch:
      operationId: jobs_update_job
      summary: Update Job
      description: Update a job by id.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateJobProfileModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /jobs:
    get:
      operationId: jobs_list_all_jobs
      summary: List All Jobs
      description: List jobs for all locations.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: completed
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked completed. If false, return
            only records marked incomplete. If unspecified, return all.
      - name: completed_by
        in: query
        required: false
        schema:
          type: integer
          description: Driver or dispatcher identifier.
      - name: completed_by_driver
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked completed by a driver.
            If false, return only records marked incomplete. If unspecified, return
            all.
      - name: created_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
      - name: deleted
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
      - name: driver_id
        in: query
        required: false
        schema:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
      - name: failed
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only records marked deleted. If false, return
            only records marked as deleted. If unspecified, return all.
      - name: is_dispatched
        in: query
        required: false
        schema:
          type: boolean
          description: Filter jobs based on dispatch status. If true, records with
            a valid truck_id (dispatched) are returned. If false, records with no
            truck_id (not dispatched) are returned. If null, all records are returned.
      - name: last_updated_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      - name: returned_by
        in: query
        required: false
        schema:
          type: integer
          description: Driver or dispatcher identifier.
      - name: returned_by_driver
        in: query
        required: false
        schema:
          type: boolean
          description: Return only records returned by driver when TRUE.
      - name: schedule_gt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled after. If unspecified, return all.
      - name: schedule_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled on or after. If unspecified, return
            all.
      - name: schedule_lt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled before.
      - name: schedule_lte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only jobs scheduled on or before.
      - name: truck_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobListModel'
  /jobs/{job_id}/sign:
    post:
      operationId: jobs_sign_job
      summary: Sign Job
      description: Sign off on a job.
      tags:
      - Jobs
      security:
      - oauth2:
        - api
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: image_file
        in: query
        required: true
        schema:
          type: string
          format: binary
          description: Image file (.jpg, .png, .gif).
      - name: ip_address
        in: query
        required: true
        schema:
          type: string
          description: V4 IP Address.
      - name: signator
        in: query
        required: true
        schema:
          type: string
          description: Signator.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobModel'
  /customers/{customer_id}/addresses:
    post:
      operationId: customer_addresses_add_address
      summary: Add Address
      description: Create a new customer address.
      tags:
      - Customer Addresses
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerAddressModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddressModel'
    get:
      operationId: customer_addresses_list_addresses
      summary: List Addresses
      description: List customer addresses.
      tags:
      - Customer Addresses
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddressListModel'
  /customers/{customer_id}/addresses/{customer_address_id}:
    delete:
      operationId: customer_addresses_deactivate_address
      summary: Deactivate Address
      description: Deactivate a customer address.
      tags:
      - Customer Addresses
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_address_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer address identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddressModel'
    get:
      operationId: customer_addresses_get_address
      summary: Get Address
      description: Get customer address by id.
      tags:
      - Customer Addresses
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_address_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer address identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddressModel'
    patch:
      operationId: customer_addresses_update_address
      summary: Update Address
      description: Update an existing customer address.
      tags:
      - Customer Addresses
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_address_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer address identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerAddressModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAddressModel'
  /locations/{location_id}/customers:
    post:
      operationId: customers_create_customer
      summary: Create Customer
      description: Create a new customer.
      tags:
      - Customers
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: max_address_edit_distance
        in: query
        required: false
        schema:
          type: integer
          description: Maximum address edit distance (levenshtein).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
    get:
      operationId: customer_locations_list_customers
      summary: List Customers
      description: List customers for given location.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: active
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
      - name: created_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
      - name: is_parent
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return accounts with no parent. If false, return accounts
            with a parent. If null, all records returned.
      - name: last_updated_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
      - name: name
        in: query
        required: false
        schema:
          type: string
          description: Name (free text).
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      - name: parent_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only children of the specified parent_id.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerListModel'
  /customers/{customer_id}:
    get:
      operationId: customers_get_customer
      summary: Get Customer
      description: Get a customer by id.
      tags:
      - Customers
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerModel'
    patch:
      operationId: customers_update_customer
      summary: Update Customer
      description: Update a customer.
      tags:
      - Customers
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerModel'
  /customers:
    get:
      operationId: customers_list_customers
      summary: List Customers
      description: List and filter customers.
      tags:
      - Customers
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: active
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
      - name: created_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
      - name: is_parent
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return accounts with no parent. If false, return accounts
            with a parent. If null, all records returned.
      - name: last_updated_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
      - name: location_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only records matching this location. If
            unspecified, return all location records.
      - name: name
        in: query
        required: false
        schema:
          type: string
          description: Name (free text).
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      - name: parent_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only children of the specified parent_id.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerListModel'
  /customers/{customer_id}/locations:
    get:
      operationId: customers_list_locations_for_customer
      summary: List Locations for Customer
      description: List customer locations.
      tags:
      - Customers
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationListModel'
  /customers/{customer_id}/locations/{customer_location_id}:
    post:
      operationId: customer_locations_add_customer_location
      summary: Add Customer Location
      description: Add customer to location.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer location identifier
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDispatchCustomerLocationModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
    delete:
      operationId: customer_locations_deactivate_customer
      summary: Deactivate Customer
      description: Deactivate a customer at a location.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer location identifier
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
    get:
      operationId: customer_locations_get_customer_location
      summary: Get Customer Location
      description: Get customer location by id.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer location identifier
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
    patch:
      operationId: customer_locations_update_customer_location
      summary: Update Customer Location
      description: Update an existing customer location.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer location identifier
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDispatchCustomerLocationModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
  /locations/{location_id}/customers/{customer_id}:
    get:
      operationId: customer_locations_get_customer
      summary: Get Customer
      description: Get a customer by id.
      tags:
      - Customer Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCustomerLocationModel'
  /asset_types/{asset_type_id}/assets/{asset_number}:
    get:
      operationId: assets_get_asset_by_number
      summary: Get Asset by Number
      description: Get asset by asset number.
      tags:
      - Assets
      security:
      - oauth2:
        - api
      parameters:
      - name: asset_type_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
      - name: asset_number
        in: path
        required: true
        schema:
          type: string
          description: User assigned asset number (free text).
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetModel'
  /asset_types:
    get:
      operationId: assets_list_asset_types
      summary: List Asset Types
      description: List asset types.
      tags:
      - Assets
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: deleted
        in: query
        required: false
        schema:
          type: boolean
          description: If TRUE, return only deleted records. If FALSE, return only
            active records. If unspecified, return all records.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetTypeListModel'
  /locations/{location_id}/assets:
    get:
      operationId: assets_list_assets
      summary: List Assets
      description: List assets for given location.
      tags:
      - Assets
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetListModel'
  /customers/{customer_id}/contacts:
    post:
      operationId: customer_contacts_create_contact
      summary: Create Contact
      description: Create a new customer contact.
      tags:
      - Customer Contacts
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerContactModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContactModel'
    get:
      operationId: customer_contacts_list_contacts
      summary: List Contacts
      description: List customer addresses.
      tags:
      - Customer Contacts
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContactListModel'
  /customers/{customer_id}/contacts/{customer_contact_id}:
    get:
      operationId: customer_contacts_get_contact
      summary: Get Contact
      description: Get customer contact by id.
      tags:
      - Customer Contacts
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_contact_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer contact identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContactModel'
    patch:
      operationId: customer_contacts_update_contact
      summary: Update Contact
      description: Update a customer contact.
      tags:
      - Customer Contacts
      security:
      - oauth2:
        - api
      parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer identifier.
      - name: customer_contact_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Customer contact identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerContactModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerContactModel'
  /locations/{location_id}/drivers/{driver_id}:
    get:
      operationId: drivers_get_driver
      summary: Get Driver
      description: Get driver at a given location.
      tags:
      - Drivers
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: driver_id
        in: path
        required: true
        schema:
          type: string
          description: Driver identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverModel'
  /driver_activity:
    get:
      operationId: drivers_list_driver_activities
      summary: List Driver Activities
      description: List driver activity.
      tags:
      - Drivers
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: driver_id
        in: query
        required: false
        schema:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
      - name: ended_on_gt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter ended_on later than given date.
      - name: ended_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter ended_on later than or on given date.
      - name: ended_on_lt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter ended_on earlier than given date.
      - name: ended_on_lte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter ended_on earlier than or on given date.
      - name: object_id
        in: query
        required: false
        schema:
          type: integer
          description: Filter object id.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      - name: started_on_gt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter started_on later than given date.
      - name: started_on_gte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter started_on later than or on given date.
      - name: started_on_lt
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter started_on earlier than given date.
      - name: started_on_lte
        in: query
        required: false
        schema:
          type: string
          format: date-time
          description: Filter started_on earlier than or on given date.
      - name: truck_id
        in: query
        required: false
        schema:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverActivityListResultsModel'
  /locations/{location_id}/drivers:
    get:
      operationId: drivers_list_drivers
      summary: List Drivers
      description: List drivers for location.
      tags:
      - Drivers
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverListModel'
  /locations/{location_id}/dump_destinations/{dump_destination_id}:
    get:
      operationId: dump_destinations_get_dump_destination
      summary: Get Dump Destination
      description: Get dump destination at a given location.
      tags:
      - Dump Destinations
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: dump_destination_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Dump destination identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DumpDestinationModel'
  /destinations:
    get:
      operationId: dump_destinations_list_all_dump_destinations
      summary: List All Dump Destinations
      description: List all dump destinations.
      tags:
      - Dump Destinations
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DumpDestinationListModel'
  /locations/{location_id}/dump_destinations:
    get:
      operationId: dump_destinations_list_location_dump_destinations
      summary: List Location Dump Destinations
      description: List dump destinations for location.
      tags:
      - Dump Destinations
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DumpDestinationListModel'
  /locations/{location_id}/gps_events:
    post:
      operationId: gps_log_gps_event
      summary: Log GPS Event
      description: Log a GPS event.
      tags:
      - GPS
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GpsEventProfileModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GpsStopModel'
  /hooks:
    post:
      operationId: webhooks_create_hook
      summary: Create Hook
      description: Create a new webhook.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookModel'
    get:
      operationId: webhooks_list_hooks
      summary: List Hooks
      description: List configured webhooks.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookListModel'
  /hooks/{hook_id}:
    delete:
      operationId: webhooks_delete_hook
      summary: Delete Hook
      description: Deactivate a webhook.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: hook_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Webhook identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookModel'
    get:
      operationId: webhooks_get_hook
      summary: Get Hook
      description: Get webhook configuration.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: hook_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Webhook identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookModel'
    patch:
      operationId: webhooks_update_hook
      summary: Update Hook
      description: Update an existing driver chat message.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: hook_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Webhook identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookModel'
  /hooks/{hook_id}/ping:
    get:
      operationId: webhooks_ping_hook
      summary: Ping Hook
      description: Ping webhook url to verify connectivity.
      tags:
      - Webhooks
      security:
      - oauth2:
        - webhook
        - api
      parameters:
      - name: hook_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Webhook identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookPingResultModel'
  /locations/{location_id}:
    get:
      operationId: locations_get_location
      summary: Get Location
      description: Get location configuration.
      tags:
      - Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationModel'
  /locations:
    get:
      operationId: locations_list_locations
      summary: List Locations
      description: List locations.
      tags:
      - Locations
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationListModel'
  /locations/{location_id}/materials:
    get:
      operationId: materials_list_materials
      summary: List Materials
      description: List materials.
      tags:
      - Materials
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaterialModelArray'
  /tenants:
    get:
      operationId: tenants_list_tenants
      summary: List Tenants
      description: List tenants.
      tags:
      - Tenants
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantListModel'
  /haulers/{hauler_uuid}/connections:
    post:
      operationId: haulers_create_connection
      summary: Create Connection
      description: Create a new hauler connection.
      tags:
      - Haulers
      security:
      - oauth2:
        - api
      parameters:
      - name: hauler_uuid
        in: path
        required: true
        schema:
          type: string
          format: uuid
          description: Third party hauler identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: false
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHaulerConnectionRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerConnectionModel'
    get:
      operationId: haulers_list_hauler_connections
      summary: List Hauler Connections
      description: List third party hauler connections.
      tags:
      - Haulers
      security:
      - oauth2:
        - api
      parameters:
      - name: hauler_uuid
        in: path
        required: true
        schema:
          type: string
          format: uuid
          description: Third party hauler identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: false
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerConnectionListModel'
  /haulers:
    post:
      operationId: haulers_create_hauler
      summary: Create Hauler
      description: Create a new hauler profile.
      tags:
      - Haulers
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHaulerRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerModel'
    get:
      operationId: haulers_list_haulers
      summary: List Haulers
      description: List third party haulers.
      tags:
      - Haulers
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: false
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerListModel'
  /haulers/{hauler_uuid}:
    get:
      operationId: haulers_get_hauler
      summary: Get Hauler
      description: Get hauler.
      tags:
      - Haulers
      security:
      - oauth2:
        - api
      parameters:
      - name: hauler_uuid
        in: path
        required: true
        schema:
          type: string
          format: uuid
          description: Third party hauler identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: false
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThirdPartyHaulerModel'
  /locations/{location_id}/trucks/{truck_id}/get_jobs_list_pdf:
    get:
      operationId: trucks_get_job_list
      summary: Get Job list
      description: List truck jobs (PDF format).
      tags:
      - Trucks
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: truck_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Truck identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrintJobListPdfFile'
  /locations/{location_id}/trucks/{truck_id}:
    get:
      operationId: trucks_get_truck
      summary: Get Truck
      description: Get truck profile.
      tags:
      - Trucks
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: truck_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Truck identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TruckModel'
    patch:
      operationId: trucks_update_truck
      summary: Update Truck
      description: Update truck.
      tags:
      - Trucks
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: truck_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Truck identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: driver_id
        in: query
        required: true
        schema:
          type: string
          description: Driver identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTruckRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TruckModel'
  /locations/{location_id}/trucks:
    get:
      operationId: trucks_list_trucks
      summary: List Trucks
      description: List truck profiles.
      tags:
      - Trucks
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TruckListModel'
  /users:
    post:
      operationId: users_create_user
      summary: Create User
      description: Create new user.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserModel'
  /users/current:
    get:
      operationId: users_get_current_user
      summary: Get Current User
      description: Get current user profile.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserModel'
  /locations/{location_id}/users/{user_id}:
    get:
      operationId: users_get_user
      summary: Get User
      description: Get user profile.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: User identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserModel'
  /users/current/locations:
    get:
      operationId: users_list_current_user_locations
      summary: List Current User Locations
      description: Get list of current user locations.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationListModel'
  /locations/{location_id}/users:
    get:
      operationId: users_list_users
      summary: List Users
      description: List user profiles.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      - name: has_role
        in: query
        required: false
        schema:
          type: string
          description: User role.
      - name: page_index
        in: query
        required: false
        schema:
          type: integer
          description: Paged results page index (starting from 1).
      - name: page_limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximun number of results per page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserListResultsModel'
  /users/pwreset:
    get:
      operationId: users_request_password_reset
      summary: Request Password Reset
      description: Request password reset.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: recaptcha
        in: query
        required: true
        schema:
          type: string
          description: Recaptcha answer.
      - name: username
        in: query
        required: true
        schema:
          type: string
          description: Username.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PwResetRequestResponseBodyModel'
    patch:
      operationId: users_reset_password
      summary: Reset Password
      description: Reset password.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PwResetQueryParameters'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PwResetResponseBodyModel'
  /users/verify_email:
    get:
      operationId: users_verify_new_user
      summary: Verify New User
      description: Verify new user profile.
      tags:
      - Users
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: token
        in: query
        required: true
        schema:
          type: string
          description: Email verification token.
      - name: verified_redirect_url
        in: query
        required: false
        schema:
          type: string
          description: Redirect URL.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email.verify.response_msg'
  /jobs/{job_id}/images/{s3_object}:
    delete:
      operationId: images_delete_image
      summary: Delete Image
      description: Delete job image.
      tags:
      - Images
      security:
      - oauth2:
        - api
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: s3_object
        in: path
        required: true
        schema:
          type: string
          description: S3 filename.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyContentResponseModel'
    get:
      operationId: images_get_image
      summary: Get Image
      description: Get job image record.
      tags:
      - Images
      security:
      - oauth2:
        - api
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: s3_object
        in: path
        required: true
        schema:
          type: string
          description: S3 filename.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobImageModel'
  /jobs/{job_id}/images:
    get:
      operationId: images_list_images
      summary: List Images
      description: List images.
      tags:
      - Images
      security:
      - oauth2:
        - api
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobImageModelArray'
    post:
      operationId: images_upload_image
      summary: Upload Image
      description: Upload image.
      tags:
      - Images
      security:
      - oauth2:
        - api
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Job identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImageRequestBodyModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobImageModel'
  /trailers:
    get:
      operationId: trailers_list_trailers
      summary: List Trailers
      description: List trailers.
      tags:
      - Trailers
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrailerListModel'
  /locations/{location_id}/asset_type_categories:
    post:
      operationId: asset_types_add_asset_category
      summary: Add Asset Category
      description: Add asset type category.
      tags:
      - Asset Types
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetTypeCategoryModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetTypeCategoryModel'
  /locations/{location_id}/asset_types:
    post:
      operationId: asset_types_add_asset_type
      summary: Add Asset Type
      description: Add asset type.
      tags:
      - Asset Types
      security:
      - oauth2:
        - api
      parameters:
      - name: location_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
          description: Location identifier.
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetTypeModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetTypeModel'
  /routes:
    post:
      operationId: routes_add_route
      summary: Add Route
      description: Add a new route.
      tags:
      - Routes
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRouteRequestBodyModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteModel'
    get:
      operationId: routes_list_routes
      summary: List Routes
      description: Get list of routes.
      tags:
      - Routes
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteListModel'
  /route_stops:
    post:
      operationId: routes_add_route_stop
      summary: Add Route Stop
      description: Add a new route stop.
      tags:
      - Routes
      security:
      - oauth2:
        - api
      parameters:
      - name: x-api-version
        in: header
        required: false
        schema:
          type: string
          description: Version identifier (date format).
      - name: x-tenant-id
        in: header
        required: true
        schema:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRouteStopRequestBodyModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteStopModel'
components:
  schemas:
    AddToRoutesSettingsModel:
      type: object
      description: Settings model for adding stops to routes during job completion.
      properties:
        id:
          type: integer
          format: int64
          description: Route stop identifier.
        priority:
          type: integer
          description: Assigned by dispatchers for job order completion determination
            for drivers.
        skip:
          type: boolean
          description: Skip adding route stop if TRUE.
      required:
      - id
    AddToRoutesSettingsModelArray:
      type: array
      items:
        $ref: '#/components/schemas/AddToRoutesSettingsModel'
    AdditionalItemModel:
      type: object
      description: Job item.
      properties:
        deduct_weight:
          type: string
        description:
          type: string
          description: Item description.
        heavy_weight:
          type: string
        id:
          type: integer
          format: int64
          description: Additional item identifier.
        is_completed:
          type: boolean
          description: Completion flag.
        is_declined:
          type: boolean
          description: Declined flag.
        is_failed:
          type: boolean
          description: Failed flag.
        job_id:
          type: integer
          format: int64
          description: Job identifier.
        light_weight:
          type: string
        material_item_id:
          type: integer
          format: int64
          description: Material item identifier.
        notes:
          type: string
          description: Item notes.
        quantity:
          type: string
          description: Item quantity.
        required:
          type: boolean
          description: Item required when TRUE.
      required:
      - deduct_weight
      - description
      - heavy_weight
      - id
      - is_completed
      - is_declined
      - is_failed
      - job_id
      - light_weight
      - material_item_id
      - notes
      - quantity
      - required
    AdditionalItemModelArray:
      type: array
      items:
        $ref: '#/components/schemas/AdditionalItemModel'
    AssetListModel:
      type: object
      description: Asset list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/AssetModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    AssetLocationModel:
      type: object
      description: Asset location model.
      properties:
        address:
          $ref: '#/components/schemas/LocationAddressModel'
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        description:
          type: string
          description: Asset location description (customer name, holding yard name,
            or location name).
        holding_yard_id:
          type: integer
          format: int64
          description: Holding yard for this asset. Not null if customer_id is null
            and in_main_inventory is false.
        in_main_inventory:
          type: boolean
          description: Currently always true.
        last_moved_on:
          type: string
          format: date-time
          description: Scheduled job completion date.
        name:
          type: string
          description: Customer name, holding yard name, or location main inventory
            name.
      required:
      - address
      - customer_id
      - description
      - holding_yard_id
      - in_main_inventory
      - last_moved_on
      - name
    AssetModel:
      type: object
      description: Asset model.
      properties:
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        asset_type_name:
          type: string
          description: Asset type name.
        condition:
          type: integer
          description: Asset condition id.
        is_anonymous:
          type: boolean
          description: Indicates whether this asset has a user-assigned asset id.
        last_incident_id:
          type: integer
          format: int64
          description: Resource identifier.
        last_job_completion_date:
          type: string
          format: date-time
          description: Scheduled job completion date.
        last_job_id:
          type: integer
          format: int64
          description: Job id for this asset.
        last_job_type:
          type: string
          description: Request type of the last completed job for this asset.
        last_job_type_name:
          type: string
          description: Display name of the request type for the last completed job.
        last_serviced_on:
          type: string
          format: date-time
          description: Scheduled job completion date.
        location:
          $ref: '#/components/schemas/AssetLocationModel'
        number:
          type: string
          description: Asset identifier.
        provider_location_id:
          type: integer
          format: int64
          description: Provider location id for this asset.
      required:
      - asset_type_id
      - asset_type_name
      - condition
      - is_anonymous
      - last_incident_id
      - last_job_completion_date
      - last_job_id
      - last_job_type
      - last_job_type_name
      - last_serviced_on
      - location
      - number
      - provider_location_id
    AssetModelArray:
      type: array
      items:
        $ref: '#/components/schemas/AssetModel'
    AssetTypeCategoryModel:
      type: object
      description: Customer address.
      properties:
        code:
          type: string
          description: Category code.
        description:
          type: string
          description: Category name.
        id:
          type: integer
          format: int64
          description: Asset type category id.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Category name.
      required:
      - code
      - description
      - id
      - location_id
      - name
    AssetTypeListModel:
      type: object
      description: Asset type list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/AssetTypeModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    AssetTypeModel:
      type: object
      description: Asset type profile.
      properties:
        deleted:
          type: boolean
          description: Is record deleted (soft delete).
        id:
          type: integer
          format: int64
          description: Asset type identifier.
        is_default:
          type: boolean
          description: Is asset the default asset.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Asset type name.
        quantity:
          type: integer
          description: Asset type quantity.
        require_numbers:
          type: boolean
          description: Require asset numbers.
        valid_trucks:
          $ref: '#/components/schemas/asset_type.valid_trucks'
        weight:
          type: string
      required:
      - deleted
      - id
      - is_default
      - location_id
      - name
      - quantity
      - require_numbers
      - valid_trucks
      - weight
    AssetTypeModelArray:
      type: array
      items:
        $ref: '#/components/schemas/AssetTypeModel'
    CreateAdditionalItemModel:
      type: object
      description: Create job item.
      properties:
        deduct_weight:
          type: string
        description:
          type: string
          description: Item description.
        heavy_weight:
          type: string
        light_weight:
          type: string
        material_item_id:
          type: integer
          format: int64
          description: Material item identifier.
        notes:
          type: string
          description: Item notes.
        quantity:
          type: string
          description: Item quantity.
        required:
          type: boolean
          description: Item required when TRUE.
      required:
      - description
      - material_item_id
      - required
    CreateAssetTypeCategoryModel:
      type: object
      description: Create asset type category model.
      properties:
        code:
          type: string
          description: Category code.
        description:
          type: string
          description: Category name.
        name:
          type: string
          description: Category name.
      required:
      - name
    CreateAssetTypeModel:
      type: object
      description: Create asset type.
      properties:
        category_id:
          type: integer
          format: int64
          description: Category identifier.
        name:
          type: string
          description: Asset type name.
        quantity:
          type: integer
          description: Asset type quantity.
        require_numbers:
          type: boolean
          description: Require asset numbers.
        weight:
          type: string
      required:
      - category_id
      - name
      - quantity
      - require_numbers
    CreateCustomerAddressModel:
      type: object
      description: Customer address.
      properties:
        country:
          type: string
          description: Country code [(ISO 3166-1 alpha 2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        is_billing:
          type: boolean
          description: If true, this is the customer's billing address.
        is_shipping:
          type: boolean
          description: Customer's shipping address if true.
        latitude:
          type: string
          description: Latitude.
        line_1:
          type: string
          description: Street address.
        line_2:
          type: string
          description: Street address line 2.
        line_3:
          type: string
          description: Street address line 3.
        line_4:
          type: string
          description: Street address line 4 (doubles as county).
        locality:
          type: string
          description: Address locality (e.g. city).
        longitude:
          type: string
          description: longitude.
        postcode:
          type: string
          description: Postal code (may include letters and symbols).
        region:
          type: string
          description: Address region (e.g. state).
      required:
      - country
      - is_billing
      - is_shipping
      - latitude
      - line_1
      - locality
      - longitude
      - postcode
      - region
    CreateCustomerAddressModelArray:
      type: array
      items:
        $ref: '#/components/schemas/CreateCustomerAddressModel'
    CreateCustomerContactModel:
      type: object
      description: Customer contact.
      properties:
        email:
          type: string
          format: email
          description: Email address comma-separated list.
        fax:
          type: string
          description: Fax number (free text).
        name:
          type: string
          description: Name (free text).
        notify_on_acknowledged_request:
          type: boolean
          description: Notify on acknowledge request.
        notify_on_completed_request:
          type: boolean
          description: Notify on completed request.
        notify_on_dispatched_request:
          type: boolean
          description: Notify on dispatched request.
        notify_on_failed_request:
          type: boolean
          description: Notify on failed request.
        notify_on_new_request:
          type: boolean
          description: Notify on new request.
        number:
          type: string
          description: Phone number (free text).
    CreateCustomerContactModelArray:
      type: array
      items:
        $ref: '#/components/schemas/CreateCustomerContactModel'
    CreateCustomerModel:
      type: object
      description: New customer profile.
      properties:
        account_number_1:
          type: string
          description: Customer account number.
        account_number_2:
          type: string
          description: Customer account number.
        addresses:
          $ref: '#/components/schemas/CreateCustomerAddressModelArray'
        contacts:
          $ref: '#/components/schemas/CreateCustomerContactModelArray'
        is_commercial:
          type: boolean
          description: Commercial address if true, private if false.
        name:
          type: string
          description: Name (free text).
        note:
          type: string
          description: Notes (free text).
        parent_id:
          type: integer
          format: int64
          description: Parent record identifier.
        reference_number:
          type: string
          description: Reference number (free text).
        renewal_date:
          type: string
          format: date-time
          description: Renewal date.
        sales_rep:
          type: string
          description: Name of sales representative.
        sales_rep_id:
          type: string
          description: Sales rep identifier. May be an integer provider id, the sales
            user UUID, or the username.
        suspension_id:
          type: integer
          format: int64
          description: Suspension identifier.
      required:
      - addresses
      - contacts
      - name
    CreateCustomerQueryParamsModel:
      type: object
      description: Create customer query params.
      properties:
        max_address_edit_distance:
          type: integer
          description: Maximum address edit distance (levenshtein).
    CreateDispatchCustomerLocationModel:
      type: object
      description: Create customer location profile.
      properties:
        account_number_1:
          type: string
          description: Customer account number.
        account_number_2:
          type: string
          description: Customer account number.
        is_commercial:
          type: boolean
          description: Commercial address if true, private if false.
        note:
          type: string
          description: Notes (free text).
        reference_number:
          type: string
          description: Reference number (free text).
        renewal_date:
          type: string
          format: date-time
          description: Renewal date.
        sales_rep:
          type: string
          description: Name of sales representative.
        sales_rep_id:
          type: string
          description: Sales rep identifier. May be an integer provider id, the sales
            user UUID, or the username.
        suspension_id:
          type: integer
          format: int64
          description: Suspension identifier.
    CreateHaulerConnectionRequestModel:
      type: object
      description: Create third party hauler connection request model.
      properties:
        tenant_code:
          type: string
          description: Confirmation code for hauler creation.
      required:
      - tenant_code
    CreateHaulerRequestModel:
      type: object
      description: Create hauler request body.
      properties:
        company_name:
          type: string
          description: Company name (free text).
        invite_token:
          type: string
          description: Signed HS256 JWT invite token from dispatch-backend.
        password:
          type: string
          description: New password.
        recaptcha:
          type: string
          description: Recaptcha answer.
        username:
          type: string
          description: New password.
      required:
      - company_name
      - password
      - recaptcha
      - username
    CreateJobRequestBodyModel:
      type: object
      description: Update job profile.
      properties:
        add_to_routes:
          type: string
          description: CSV of route IDs which the dropped asset should be assigned
            to.
        add_to_routes_settings:
          $ref: '#/components/schemas/AddToRoutesSettingsModelArray'
        address_id:
          type: integer
          format: int64
          description: Customer address identifier.
        alternate_drop_type_id:
          type: integer
          format: int64
          description: Alternate asset drop type identifier.
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: How many assets are being serviced within a cluster (for jobs
            assigned to an asset cluster). For jobs dispatched by routes, or manually
            dispatched route stops, this value is 0 or 1.
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        customer_notes:
          type: string
          description: Notes entered by customers to communicate with dispatchers.
        desired_asset_desc:
          type: string
          description: Free-form text entered by dispatchers and drivers to be used
            as the future asset description.
        desired_end_time:
          type: string
          format: date-time
          description: Future estimated time of job completion.
        desired_start_time:
          type: string
          format: date-time
          description: Time customer has requested job start, set by dispatchers for
            dispatchers and drivers.
        dispatch_priority:
          type: string
          description: Entered by dispatchers to determine dispatch order.
        dispatcher_notes:
          type: string
          description: Entered by dispatchers, read by drivers and dispatchers.
        do_confirm:
          type: boolean
          description: Tell dispatcher that a customer should be contacted before
            job is dispatched.
        driver_notes:
          type: string
          description: Entered by drivers when completing or failing a job for dispatchers.
        dump_location_id:
          type: integer
          description: Asset or asset cluster dump location identifier (e.g. trash
            bin needs dumped before returning from customer).
        ends_at_customer:
          type: boolean
          description: The job ends at the customer location when TRUE.
        final_location_id:
          type: integer
          format: int64
          description: Final location identifier. Used by dispatchers for prioritizing
            jobs. Used by drivers to know where to leave the asset on job completion.
        flags:
          type: string
          description: Job notes.
        is_acknowledged:
          type: boolean
          description: True if the job has been acknowledged.
        is_separate_from_route_list:
          type: boolean
          description: This job should be separate from any per-route job list when
            TRUE.
        job_group_id:
          type: integer
          format: int64
          description: Job group identifier for group jobs (vs service, exchange,
            etc.).
        line_1:
          type: string
          description: Street address.
        merged_with_route_id:
          type: integer
          format: int64
          description: IDs of the route which this job should be merged into.
        original_schedule_date:
          type: string
          format: date-time
          description: Original scheduling date.
        pickup_date:
          type: string
          format: date-time
          description: A pickup job is scheduled for this date upon job completion.
            If the asset or cluster is assigned to a route stop, the route stop will
            be deleted. Must be in the future.
        pickup_item:
          type: integer
          format: int64
        priority:
          type: integer
          description: Assigned by dispatchers for job order completion determination
            for drivers.
        reference_number:
          type: string
          description: Reference number (free text).
        requested_on:
          type: string
          format: date-time
          description: Requested date.
        require_image:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to upload
            one or more job images before completion.
        require_material:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to set a material
            before completing a job.
        require_materials:
          type: boolean
          description: The driver is required to report the weights of any additional
            materials related to the job when TRUE.
        require_signature:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to get a customer
            signature before job completion.
        require_weights:
          type: boolean
          description: Set by disptachers and drivers, requires drivers to set material
            weights before job completion.
        scale_ticket:
          type: string
          description: Scale ticket.
        schedule_date:
          type: string
          format: date-time
          description: Scheduled job completion date.
        start_location_id:
          type: integer
          format: int64
          description: Pickup location for asset or asset cluster Set by dispatchers
            and drivers for drivers.
        starts_at_customer:
          type: boolean
          description: The job begins at the customer location when TRUE.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
      required:
      - address_id
      - customer_id
      - type
    CreateRouteRequestBodyModel:
      type: object
      description: Create new route request body model.
      properties:
        auto_decline:
          type: boolean
          description: Auto decline.
        days_interval:
          type: integer
          description: Days interval.
        end_at_lat:
          type: string
          description: Latitude.
        end_at_lng:
          type: string
          description: Longitude.
        end_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        friday_on:
          type: boolean
          description: Friday on.
        interface_color:
          type: string
          description: Interface color.
        last_dispatched:
          type: string
          format: date-time
          description: Last time this route had a job dispatched.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        monday_on:
          type: boolean
          description: Monday on.
        name:
          type: string
          description: Route name.
        recure_date:
          type: string
          format: date-time
          description: Recure date.
        route_zone_id:
          type: integer
          description: Route zone id
        saturday_on:
          type: boolean
          description: Saturday on.
        start_at_lat:
          type: string
          description: Latitude.
        start_at_lng:
          type: string
          description: Longitude.
        start_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        sunday_on:
          type: boolean
          description: Sunday on.
        thursday_on:
          type: boolean
          description: Thursday on.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        tuesday_on:
          type: boolean
          description: Tuesday on.
        visualize_round_trip:
          type: boolean
          description: Visualize round trip.
        wednesday_on:
          type: boolean
          description: Wednesday on.
        will_rollover:
          type: boolean
          description: Will rollover.
      required:
      - location_id
      - name
      - truck_id
    CreateRouteStopRequestBodyModel:
      type: object
      description: Create new route request body model.
      properties:
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: Asset quantity.
        dispatcher_notes:
          type: string
          description: Dispatcher notes.
        old_request_for:
          type: integer
          description: Old request for.
        pickup_on:
          type: string
          format: date-time
          description: Pickup on.
        pickup_quantity:
          type: integer
          description: Pickup quantity.
        priority:
          type: integer
          description: Priority.
        request_for:
          type: integer
          description: Customer id.
        request_type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
        route_id:
          type: integer
          format: int64
          description: Trailer record identifier.
        skip_next_dispatch:
          type: string
          description: Comma separated list of route_ids to skip.
      required:
      - asset_id
      - request_for
      - request_type
      - route_id
    CreateUserRequestModel:
      type: object
      description: Create hauler request body.
      properties:
        password:
          type: string
          description: New password.
        recaptcha:
          type: string
          description: Recaptcha answer.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        user_type:
          type: string
          description: User type.
        username:
          type: string
          description: New password.
        verified_redirect_url:
          type: string
          description: Redirect URL.
      required:
      - password
      - recaptcha
      - user_type
      - username
    CreateWebhookModel:
      type: object
      description: Create webhook model.
      properties:
        events:
          $ref: '#/components/schemas/hook_events'
        secret:
          type: string
          description: Response body HMAC signing key.
        url:
          type: string
          description: Callback URL.
      required:
      - events
      - url
    CustomerAddressListModel:
      type: object
      description: Customer address list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/CustomerAddressModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    CustomerAddressModel:
      type: object
      description: Customer address.
      properties:
        country:
          type: string
          description: Country code [(ISO 3166-1 alpha 2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        id:
          type: integer
          format: int64
          description: Customer address identifier.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        is_billing:
          type: boolean
          description: If true, this is the customer's billing address.
        is_physical:
          type: boolean
          description: Physical address if true.
        is_shipping:
          type: boolean
          description: Customer's shipping address if true.
        latitude:
          type: string
          description: Latitude.
        line_1:
          type: string
          description: Street address.
        line_2:
          type: string
          description: Street address line 2.
        line_3:
          type: string
          description: Street address line 3.
        line_4:
          type: string
          description: Street address line 4 (doubles as county).
        locality:
          type: string
          description: Address locality (e.g. city).
        longitude:
          type: string
          description: longitude.
        postcode:
          type: string
          description: Postal code (may include letters and symbols).
        region:
          type: string
          description: Address region (e.g. state).
      required:
      - country
      - id
      - is_active
      - is_billing
      - is_physical
      - is_shipping
      - latitude
      - line_1
      - line_2
      - line_3
      - line_4
      - locality
      - longitude
      - postcode
      - region
    CustomerAddressModelArray:
      type: array
      items:
        $ref: '#/components/schemas/CustomerAddressModel'
    CustomerContactListModel:
      type: object
      description: Customer contact list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/CustomerContactModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    CustomerContactModel:
      type: object
      description: Customer contact.
      properties:
        email:
          type: string
          format: email
          description: Email address comma-separated list.
        fax:
          type: string
          description: Fax number (free text).
        id:
          type: integer
          format: int64
          description: Customer contact identifier.
        name:
          type: string
          description: Name (free text).
        notify_on_acknowledged_request:
          type: boolean
          description: Notify on acknowledge request.
        notify_on_completed_request:
          type: boolean
          description: Notify on completed request.
        notify_on_dispatched_request:
          type: boolean
          description: Notify on dispatched request.
        notify_on_failed_request:
          type: boolean
          description: Notify on failed request.
        notify_on_new_request:
          type: boolean
          description: Notify on new request.
        number:
          type: string
          description: Phone number (free text).
      required:
      - email
      - fax
      - id
      - name
      - notify_on_acknowledged_request
      - notify_on_completed_request
      - notify_on_dispatched_request
      - notify_on_failed_request
      - notify_on_new_request
      - number
    CustomerContactModelArray:
      type: array
      items:
        $ref: '#/components/schemas/CustomerContactModel'
    CustomerListModel:
      type: object
      description: Customer list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/CustomerModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    CustomerModel:
      type: object
      description: Customer profile.
      properties:
        addresses:
          $ref: '#/components/schemas/CustomerAddressModelArray'
        contacts:
          $ref: '#/components/schemas/CustomerContactModelArray'
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        id:
          type: integer
          format: int64
          description: Customer identifier.
        last_updated_on:
          type: string
          format: date-time
        locations:
          $ref: '#/components/schemas/DispatchCustomerSettingsModelArray'
        name:
          type: string
          description: Name (free text).
        parent_id:
          type: integer
          format: int64
          description: Parent record identifier.
      required:
      - addresses
      - contacts
      - created_on
      - id
      - last_updated_on
      - locations
      - name
      - parent_id
    CustomerModelArray:
      type: array
      items:
        $ref: '#/components/schemas/CustomerModel'
    DispatchCustomerLocationListModel:
      type: object
      description: Customer list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/DispatchCustomerLocationModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    DispatchCustomerLocationModel:
      type: object
      description: Customer location profile.
      properties:
        account_number_1:
          type: string
          description: Customer account number.
        account_number_2:
          type: string
          description: Customer account number.
        addresses:
          $ref: '#/components/schemas/CustomerAddressModelArray'
        contacts:
          $ref: '#/components/schemas/CustomerContactModelArray'
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        id:
          type: integer
          format: int64
          description: Customer identifier.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        is_commercial:
          type: boolean
          description: Commercial address if true, private if false.
        last_updated_on:
          type: string
          format: date-time
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        locations:
          $ref: '#/components/schemas/DispatchCustomerSettingsModelArray'
        name:
          type: string
          description: Name (free text).
        note:
          type: string
          description: Notes (free text).
        parent_id:
          type: integer
          format: int64
          description: Parent record identifier.
        reference_number:
          type: string
          description: Reference number (free text).
        renewal_date:
          type: string
          format: date-time
          description: Renewal date.
        sales_rep:
          type: string
          description: Name of sales representative.
        sales_rep_id:
          type: string
          description: Sales rep identifier.
        suspension_id:
          type: integer
          format: int64
          description: Suspension identifier.
      required:
      - account_number_1
      - account_number_2
      - addresses
      - contacts
      - created_on
      - id
      - is_active
      - last_updated_on
      - location_id
      - locations
      - name
      - parent_id
      - renewal_date
    DispatchCustomerLocationModelArray:
      type: array
      items:
        $ref: '#/components/schemas/DispatchCustomerLocationModel'
    DispatchCustomerSettingsModel:
      type: object
      description: Customer location profile.
      properties:
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        id:
          type: integer
          format: int64
          description: Customer identifier.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        is_commercial:
          type: boolean
          description: Commercial address if true, private if false.
        last_updated_on:
          type: string
          format: date-time
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        note:
          type: string
          description: Notes (free text).
        reference_number:
          type: string
          description: Reference number (free text).
        renewal_date:
          type: string
          format: date-time
          description: Renewal date.
        sales_rep:
          type: string
          description: Name of sales representative.
        sales_rep_id:
          type: string
          description: Sales rep identifier.
        suspension_id:
          type: integer
          format: int64
          description: Suspension identifier.
      required:
      - created_on
      - id
      - is_active
      - last_updated_on
      - location_id
      - renewal_date
    DispatchCustomerSettingsModelArray:
      type: array
      items:
        $ref: '#/components/schemas/DispatchCustomerSettingsModel'
    DispatchJobRequestModel:
      type: object
      description: JobApi.dispatch_job query parameters.
      properties:
        new_schedule_date:
          type: string
          format: date-time
          description: New schedule date.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
    DriverActivityListResultsModel:
      type: object
      description: DriverActivityModel list result.
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/DriverActivityModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    DriverActivityModel:
      type: object
      description: Driver activity model.
      properties:
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_number:
          type: string
          description: Client assigned asset number.
        assset_type_id:
          type: integer
          format: int64
          description: Asset type id.
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        driver:
          type: integer
          description: Driver id.
        dump_dest_id:
          type: integer
          format: int64
          description: Dump destination identifier.
        end_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        from_yard_id:
          type: integer
          format: int64
          description: Yard id.
        object_id:
          type: integer
          format: int64
          description: Object id.
        origin:
          type: string
          description: Origin.
        reason:
          type: string
          description: Reason field.
        start_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        to_yard_id:
          type: integer
          format: int64
          description: Yard id.
        trailer_id:
          type: integer
          format: int64
          description: Trailer record identifier.
        truck:
          type: integer
          format: int64
          description: Truck identifier.
      required:
      - asset_id
      - asset_number
      - assset_type_id
      - customer_id
      - driver
      - dump_dest_id
      - end_time
      - from_yard_id
      - object_id
      - origin
      - reason
      - start_time
      - to_yard_id
      - trailer_id
      - truck
    DriverActivityModelArray:
      type: array
      items:
        $ref: '#/components/schemas/DriverActivityModel'
    DriverActivityQueryParameters:
      type: object
      description: Driver activity query parameters.
      properties:
        driver_id:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
        ended_on_gt:
          type: string
          format: date-time
          description: Filter ended_on later than given date.
        ended_on_gte:
          type: string
          format: date-time
          description: Filter ended_on later than or on given date.
        ended_on_lt:
          type: string
          format: date-time
          description: Filter ended_on earlier than given date.
        ended_on_lte:
          type: string
          format: date-time
          description: Filter ended_on earlier than or on given date.
        object_id:
          type: integer
          description: Filter object id.
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
        started_on_gt:
          type: string
          format: date-time
          description: Filter started_on later than given date.
        started_on_gte:
          type: string
          format: date-time
          description: Filter started_on later than or on given date.
        started_on_lt:
          type: string
          format: date-time
          description: Filter started_on earlier than given date.
        started_on_lte:
          type: string
          format: date-time
          description: Filter started_on earlier than or on given date.
        truck_id:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
    DriverListModel:
      type: object
      description: Driver list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/DriverModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    DriverModel:
      type: object
      description: Driver profile.
      properties:
        address:
          type: string
          description: Street address.
        can_assign_to:
          $ref: '#/components/schemas/TruckIdArray'
        can_convert_to_group:
          type: boolean
          description: Can driver convert to group.
        can_create_requests:
          type: boolean
          description: Can driver create requests.
        can_dispatch_to:
          $ref: '#/components/schemas/TruckIdArray'
        can_edit_requests:
          type: boolean
          description: Can driver edit requests.
        can_reposition_asset:
          type: boolean
          description: Can driver reposition asset.
        city:
          type: string
          description: Driver city.
        disable_shift_tracking:
          type: boolean
          description: Disable shift tracking.
        email:
          type: string
          format: email
          description: Email address.
        id:
          type: integer
          format: int64
          description: Driver user identifier.
        interface_color:
          type: string
          description: Hex string color identifier.
        is_deactivated:
          type: boolean
          description: Driver inactive if TRUE.
        license_number:
          type: string
          description: Driver's license number.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Name (free text).
        phone_number:
          type: string
          description: Phone number.
        state:
          type: string
          description: Driver state.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        username:
          type: string
          description: Username.
        zip:
          type: string
          description: Postal code (may include letters and symbols).
      required:
      - address
      - can_convert_to_group
      - can_create_requests
      - can_edit_requests
      - can_reposition_asset
      - city
      - disable_shift_tracking
      - email
      - id
      - interface_color
      - is_deactivated
      - license_number
      - location_id
      - name
      - phone_number
      - state
      - third_party_hauler_id
      - username
      - zip
    DriverModelArray:
      type: array
      items:
        $ref: '#/components/schemas/DriverModel'
    DriverQueryParamsModel:
      type: object
      description: List drivers query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    DumpDestinationAddressModel:
      type: object
      description: Job dump destination address profile.
      properties:
        id:
          type: integer
          format: int64
          description: Dump destination address id, always null (synthesized).
        latitude:
          type: string
          description: Latitude.
        line_1:
          type: string
          description: Dump destination address.
        line_2:
          type: string
          description: Dump destination address.
        line_3:
          type: string
          description: Dump destination address.
        line_4:
          type: string
          description: Dump destination address.
        locality:
          type: string
          description: City.
        longitude:
          type: string
          description: longitude.
        postcode:
          type: string
          description: Zip code.
        region:
          type: string
          description: State.
      required:
      - id
      - latitude
      - line_1
      - line_2
      - line_3
      - line_4
      - locality
      - longitude
      - postcode
      - region
    DumpDestinationContactModel:
      type: object
      description: Job dump destination contact profile.
      properties:
        email:
          type: string
          format: email
          description: Email address comma-separated list.
        id:
          type: integer
          format: int64
          description: Dump destination contact id, always null (synthesized).
        name:
          type: string
          description: Contact name.
        number:
          type: string
          description: Contact phone number.
      required:
      - email
      - id
      - name
      - number
    DumpDestinationListModel:
      type: object
      description: Dump destination list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/DumpDestinationModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    DumpDestinationModel:
      type: object
      description: Job dump destination profile.
      properties:
        address:
          $ref: '#/components/schemas/DumpDestinationAddressModel'
        contact:
          $ref: '#/components/schemas/DumpDestinationContactModel'
        description:
          type: string
          description: Dump destination description.
        id:
          type: integer
          format: int64
          description: Dump destination record identifier.
        is_holding_yard:
          type: boolean
          description: Location is holding yard.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
      required:
      - address
      - contact
      - description
      - id
      - is_holding_yard
      - location_id
    DumpDestinationModelArray:
      type: array
      items:
        $ref: '#/components/schemas/DumpDestinationModel'
    EmptyContentResponseModel:
      type: string
      description: Empty content response.
    ErrorResponseModel:
      type: object
      description: Standard error response.
      properties:
        detail:
          type: string
          description: Error details.
        explanation:
          type: string
          description: General explanation.
        title:
          type: string
          description: Error summary.
      required:
      - detail
      - explanation
      - title
    FailJobRequestBodyModel:
      type: object
      description: Create signature request.
      properties:
        add_to_routes:
          type: string
          description: CSV of route IDs which the dropped asset should be assigned
            to.
        add_to_routes_settings:
          $ref: '#/components/schemas/AddToRoutesSettingsModelArray'
        alternate_drop_type_id:
          type: integer
          format: int64
          description: Alternate asset drop type identifier.
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: How many assets are being serviced within a cluster (for jobs
            assigned to an asset cluster). For jobs dispatched by routes, or manually
            dispatched route stops, this value is 0 or 1.
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        customer_notes:
          type: string
          description: Notes entered by customers to communicate with dispatchers.
        desired_asset_desc:
          type: string
          description: Free-form text entered by dispatchers and drivers to be used
            as the future asset description.
        desired_end_time:
          type: string
          format: date-time
          description: Future estimated time of job completion.
        desired_start_time:
          type: string
          format: date-time
          description: Time customer has requested job start, set by dispatchers for
            dispatchers and drivers.
        dispatch_priority:
          type: string
          description: Entered by dispatchers to determine dispatch order.
        dispatcher_notes:
          type: string
          description: Entered by dispatchers, read by drivers and dispatchers.
        do_confirm:
          type: boolean
          description: Tell dispatcher that a customer should be contacted before
            job is dispatched.
        driver_notes:
          type: string
          description: Entered by drivers when completing or failing a job for dispatchers.
        dump_location_id:
          type: integer
          description: Asset or asset cluster dump location identifier (e.g. trash
            bin needs dumped before returning from customer).
        ends_at_customer:
          type: boolean
          description: The job ends at the customer location when TRUE.
        fail_reason:
          type: string
          description: Failure description selected by a driver for use by dispatchers.
        final_location_id:
          type: integer
          format: int64
          description: Final location identifier. Used by dispatchers for prioritizing
            jobs. Used by drivers to know where to leave the asset on job completion.
        flags:
          type: string
          description: Job notes.
        is_acknowledged:
          type: boolean
          description: True if the job has been acknowledged.
        is_separate_from_route_list:
          type: boolean
          description: This job should be separate from any per-route job list when
            TRUE.
        job_group_id:
          type: integer
          format: int64
          description: Job group identifier for group jobs (vs service, exchange,
            etc.).
        line_1:
          type: string
          description: Street address.
        merged_with_route_id:
          type: integer
          format: int64
          description: IDs of the route which this job should be merged into.
        original_schedule_date:
          type: string
          format: date-time
          description: Original scheduling date.
        pickup_date:
          type: string
          format: date-time
          description: A pickup job is scheduled for this date upon job completion.
            If the asset or cluster is assigned to a route stop, the route stop will
            be deleted. Must be in the future.
        pickup_item:
          type: integer
          format: int64
        priority:
          type: integer
          description: Assigned by dispatchers for job order completion determination
            for drivers.
        reference_number:
          type: string
          description: Reference number (free text).
        requested_by:
          type: integer
          format: int64
          description: Customer identifier.
        requested_on:
          type: string
          format: date-time
          description: Requested date.
        require_image:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to upload
            one or more job images before completion.
        require_material:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to set a material
            before completing a job.
        require_materials:
          type: boolean
          description: The driver is required to report the weights of any additional
            materials related to the job when TRUE.
        require_signature:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to get a customer
            signature before job completion.
        require_weights:
          type: boolean
          description: Set by disptachers and drivers, requires drivers to set material
            weights before job completion.
        scale_ticket:
          type: string
          description: Scale ticket.
        schedule_date:
          type: string
          format: date-time
          description: Scheduled job completion date.
        start_location_id:
          type: integer
          format: int64
          description: Pickup location for asset or asset cluster Set by dispatchers
            and drivers for drivers.
        starts_at_customer:
          type: boolean
          description: The job begins at the customer location when TRUE.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
      required:
      - driver_notes
      - fail_reason
    GpsEventCoordsProfileModel:
      type: object
      description: GPS event log coordinates data.
      properties:
        heading:
          type: string
          description: Direction of travel at time of measurement.
        latitude:
          type: string
          description: Latitude.
        longitude:
          type: string
          description: longitude.
        speed:
          type: string
          description: Rate of travel at time of measurement.
      required:
      - heading
      - latitude
      - longitude
      - speed
    GpsEventLocationProfileModel:
      type: object
      description: GPS event location data.
      properties:
        coords:
          $ref: '#/components/schemas/GpsEventCoordsProfileModel'
        timestamp:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
      required:
      - coords
      - timestamp
    GpsEventProfileModel:
      type: object
      description: GPS event log data.
      properties:
        location:
          $ref: '#/components/schemas/GpsEventLocationProfileModel'
      required:
      - location
    GpsStopModel:
      type: object
      description: GPS event data.
      properties:
        bearing:
          type: string
          description: Direction of travel at time of measurement.
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        device_name:
          type: string
          description: Name (free text).
        driver_id:
          type: string
          description: Driver identifier.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        latitude:
          type: string
          description: Latitude.
        longitude:
          type: string
          description: longitude.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        velocity:
          type: string
          description: Rate of travel at time of measurement.
      required:
      - bearing
      - created_on
      - driver_id
      - id
      - latitude
      - longitude
      - truck_id
      - velocity
    HaulersRequestHeadersModel:
      type: object
      description: Common request headers for haulers endpoints.
      properties:
        authorization:
          type: string
          description: Authorization header (bearer with access token). See the [Authentication
            Guide](/docs/authentication_guide) to get started.
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
        x-tenant-id:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      required:
      - authorization
    JobAssetModel:
      type: object
      description: Asset profile.
      properties:
        asset_type:
          $ref: '#/components/schemas/JobAssetTypeModel'
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        cluster:
          type: integer
          format: int64
          description: Cluster id.
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        description:
          type: string
          description: Free-form text description.
        dispatched_on:
          type: string
          format: date-time
          description: Time the asset was dispatched.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        is_returned:
          type: boolean
          description: Is asset returned.
        last_activity_on:
          type: string
          format: date-time
          description: Last activity time.
        last_rental_invoice_on:
          type: string
          format: date-time
          description: Last rental invoice time.
        latitude:
          type: string
          description: Latitude.
        location:
          $ref: '#/components/schemas/LocationAddressModel'
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        longitude:
          type: string
          description: longitude.
        number:
          type: string
          description: Phone number (free text).
        quantity:
          type: integer
          description: Asset quantity.
        returned_on:
          type: string
          format: date-time
          description: Time the asset was returned.
      required:
      - asset_type
      - asset_type_id
      - cluster
      - customer_id
      - description
      - dispatched_on
      - id
      - is_returned
      - last_activity_on
      - last_rental_invoice_on
      - latitude
      - location
      - location_id
      - longitude
      - number
      - quantity
      - returned_on
    JobAssetTypeModel:
      type: object
      description: Asset type profile.
      properties:
        deleted:
          type: boolean
          description: Is record deleted (soft delete).
        id:
          type: integer
          format: int64
          description: Asset type identifier.
        is_default:
          type: boolean
          description: Is asset the default asset.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Name (free text).
        quantity:
          type: integer
          description: Asset type quantity.
        require_numbers:
          type: boolean
          description: Require asset numbers.
        weight:
          type: string
      required:
      - deleted
      - id
      - is_default
      - location_id
      - name
      - quantity
      - require_numbers
      - weight
    JobCustomerModel:
      type: object
      description: Job customer.
      properties:
        addresses:
          $ref: '#/components/schemas/CustomerAddressModelArray'
        contacts:
          $ref: '#/components/schemas/CustomerContactModelArray'
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        id:
          type: integer
          format: int64
          description: Customer identifier.
        last_updated_on:
          type: string
          format: date-time
        locations:
          $ref: '#/components/schemas/DispatchCustomerSettingsModelArray'
        name:
          type: string
          description: Name (free text).
        parent_id:
          type: integer
          format: int64
          description: Parent record identifier.
      required:
      - addresses
      - contacts
      - created_on
      - id
      - last_updated_on
      - locations
      - name
      - parent_id
    JobImageModel:
      type: object
      description: Image profile.
      properties:
        height:
          type: integer
          description: Image height.
        id:
          type: integer
          format: int64
          description: Image record identifier.
        s3_object:
          type: string
          description: S3 filename.
        url:
          type: string
          description: Image URL (expires).
        width:
          type: integer
          description: Image width.
      required:
      - height
      - id
      - s3_object
      - url
      - width
    JobImageModelArray:
      type: array
      items:
        $ref: '#/components/schemas/JobImageModel'
    JobListModel:
      type: object
      description: Job list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/JobModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    JobMaterialModel:
      type: object
      description: Job material model.
      properties:
        heavy_weight:
          type: string
        light_weight:
          type: string
        material_item_id:
          type: integer
          format: int64
          description: Job materials identifier.
        material_name:
          type: string
          description: Job material name.
        quantity:
          type: string
          description: Item quantity.
        tare_weight:
          type: string
      required:
      - heavy_weight
      - light_weight
      - material_item_id
      - material_name
      - quantity
      - tare_weight
    JobMaterialModelArray:
      type: array
      items:
        $ref: '#/components/schemas/JobMaterialModel'
    JobModel:
      type: object
      description: Job model.
      properties:
        add_to_routes:
          type: string
          description: CSV of route IDs which the dropped asset should be assigned
            to.
        add_to_routes_settings:
          $ref: '#/components/schemas/AddToRoutesSettingsModelArray'
        additional_items:
          $ref: '#/components/schemas/AdditionalItemModelArray'
        alternate_drop_type_id:
          type: integer
          format: int64
          description: Alternate asset drop type identifier.
        arrived_at_destination_on:
          type: string
          format: date-time
          description: Job starting time.
        arrived_on:
          type: string
          format: date-time
          description: Drive start time entered by driver for dispatcher and customer
            (arrived at job slider).
        asset:
          $ref: '#/components/schemas/JobAssetModel'
        asset_dropped_id:
          type: integer
          format: int64
          description: DeployedBinID of the asset that was dropped by this job, only
            allowed to be set if the job's type is 'D' or 'E'.
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: How many assets are being serviced within a cluster (for jobs
            assigned to an asset cluster). For jobs dispatched by routes, or manually
            dispatched route stops, this value is 0 or 1.
        asset_type:
          $ref: '#/components/schemas/JobAssetTypeModel'
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        completed_by:
          type: integer
          description: Dispatcher or driver id.
        completed_on:
          type: string
          format: date-time
          description: Job completion time.
        confirmed_on:
          type: string
          format: date-time
          description: Job confirmation date.
        created_by:
          type: integer
          description: Customer, dispatcher, or driver id.
        created_by_driver:
          type: boolean
          description: Created by driver.
        created_with_portal:
          type: boolean
          description: Set record active state.
        customer:
          $ref: '#/components/schemas/DispatchCustomerLocationModel'
        customer_id:
          type: integer
          format: int64
          description: Customer identifier.
        customer_notes:
          type: string
          description: Notes entered by customers to communicate with dispatchers.
        departed_on:
          type: string
          format: date-time
        desired_asset_desc:
          type: string
          description: Free-form text entered by dispatchers and drivers to be used
            as the future asset description.
        desired_end_time:
          type: string
          format: date-time
          description: Future estimated time of job completion.
        desired_start_time:
          type: string
          format: date-time
          description: Time customer has requested job start, set by dispatchers for
            dispatchers and drivers.
        dispatch_priority:
          type: string
          description: Entered by dispatchers to determine dispatch order.
        dispatched_by_route:
          type: integer
          format: int64
          description: Route id of dispatching route (or NULL if not dispatched by
            a route).
        dispatched_on:
          type: string
          format: date-time
          description: Time the job is assigned to a truck.
        dispatcher_notes:
          type: string
          description: Entered by dispatchers, read by drivers and dispatchers.
        do_confirm:
          type: boolean
          description: Tell dispatcher that a customer should be contacted before
            job is dispatched.
        driver_notes:
          type: string
          description: Entered by drivers when completing or failing a job for dispatchers.
        dropped_asset:
          $ref: '#/components/schemas/JobAssetModel'
        dropped_number:
          type: string
        dump_location:
          $ref: '#/components/schemas/DumpDestinationModel'
        dump_location_id:
          type: integer
          description: Asset or asset cluster dump location identifier (e.g. trash
            bin needs dumped before returning from customer).
        dumped_on:
          type: string
          format: date-time
          description: Dump request completion date.
        ends_at_customer:
          type: boolean
          description: The job ends at the customer location when TRUE.
        fail_reason:
          type: string
          description: Failure description selected by a driver for use by dispatchers.
        final_location:
          $ref: '#/components/schemas/DumpDestinationModel'
        final_location_id:
          type: integer
          format: int64
          description: Final location identifier. Used by dispatchers for prioritizing
            jobs. Used by drivers to know where to leave the asset on job completion.
        flags:
          type: string
          description: Job notes.
        id:
          type: integer
          format: int64
          description: Job identifier.
        images:
          $ref: '#/components/schemas/JobImageModelArray'
        invoice_notes:
          type: string
          description: Invoice notes from the billing system.
        is_acknowledged:
          type: boolean
          description: True if the job has been acknowledged.
        is_completed:
          type: boolean
          description: Job completion flag set by dispatchers and drivers.
        is_declined:
          type: boolean
          description: Job completion flag set by dispatchers and drivers.
        is_deleted:
          type: boolean
          description: Indicates whether job is still valid.
        is_failed:
          type: boolean
          description: Set by drivers and dispatchers to indicate a failed job.
        is_paid:
          type: boolean
        is_separate_from_route_list:
          type: boolean
          description: This job should be separate from any per-route job list when
            TRUE.
        job_group_id:
          type: integer
          format: int64
          description: Job group identifier for group jobs (vs service, exchange,
            etc.).
        last_updated_on:
          type: string
          format: date-time
        line_1:
          type: string
          description: Street address.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        merged_with_route_id:
          type: integer
          format: int64
          description: IDs of the route which this job should be merged into.
        original_schedule_date:
          type: string
          format: date-time
          description: Original scheduling date.
        pickup_date:
          type: string
          format: date-time
          description: A pickup job is scheduled for this date upon job completion.
            If the asset or cluster is assigned to a route stop, the route stop will
            be deleted. Must be in the future.
        pickup_item:
          type: integer
          format: int64
        priority:
          type: integer
          description: Assigned by dispatchers for job order completion determination
            for drivers.
        recur_active:
          type: boolean
          description: Set timeline recur active.
        recur_enabled:
          type: boolean
          description: Set timeline recur enabled.
        reference_number:
          type: string
          description: Reference number (free text).
        removed_number:
          type: string
        requested_by:
          type: integer
          format: int64
          description: Customer identifier.
        requested_on:
          type: string
          format: date-time
          description: Requested date.
        require_image:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to upload
            one or more job images before completion.
        require_material:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to set a material
            before completing a job.
        require_materials:
          type: boolean
          description: The driver is required to report the weights of any additional
            materials related to the job when TRUE.
        require_signature:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to get a customer
            signature before job completion.
        require_weights:
          type: boolean
          description: Set by disptachers and drivers, requires drivers to set material
            weights before job completion.
        return_full:
          $ref: '#/components/schemas/JobReturnFullModelArray'
        scale_ticket:
          type: string
          description: Scale ticket.
        schedule_date:
          type: string
          format: date-time
          description: Scheduled job completion date.
        start_location:
          $ref: '#/components/schemas/DumpDestinationModel'
        start_location_id:
          type: integer
          format: int64
          description: Pickup location for asset or asset cluster Set by dispatchers
            and drivers for drivers.
        started_on:
          type: string
          format: date-time
          description: Job starting time.
        starts_at_customer:
          type: boolean
          description: The job begins at the customer location when TRUE.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        times_failed:
          type: integer
          description: Number of times a job has been attempted and failed.
        times_rolled_over:
          type: integer
          description: Tracks job age in days for dispatchers.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
        weighed_on:
          type: string
          format: date-time
          description: Time of truck weight entry.
      required:
      - add_to_routes
      - add_to_routes_settings
      - additional_items
      - alternate_drop_type_id
      - arrived_at_destination_on
      - arrived_on
      - asset
      - asset_dropped_id
      - asset_id
      - asset_quantity
      - asset_type
      - asset_type_id
      - completed_by
      - completed_on
      - confirmed_on
      - created_by
      - created_by_driver
      - created_with_portal
      - customer
      - customer_id
      - customer_notes
      - departed_on
      - desired_asset_desc
      - desired_end_time
      - desired_start_time
      - dispatch_priority
      - dispatched_by_route
      - dispatched_on
      - dispatcher_notes
      - do_confirm
      - driver_notes
      - dropped_asset
      - dropped_number
      - dump_location
      - dump_location_id
      - dumped_on
      - ends_at_customer
      - fail_reason
      - final_location
      - final_location_id
      - flags
      - id
      - images
      - invoice_notes
      - is_acknowledged
      - is_completed
      - is_declined
      - is_deleted
      - is_failed
      - is_paid
      - is_separate_from_route_list
      - job_group_id
      - last_updated_on
      - line_1
      - location_id
      - merged_with_route_id
      - original_schedule_date
      - pickup_date
      - pickup_item
      - priority
      - recur_active
      - recur_enabled
      - reference_number
      - removed_number
      - requested_by
      - requested_on
      - require_image
      - require_material
      - require_materials
      - require_signature
      - require_weights
      - return_full
      - scale_ticket
      - schedule_date
      - start_location
      - start_location_id
      - started_on
      - starts_at_customer
      - third_party_hauler_id
      - times_failed
      - times_rolled_over
      - truck_id
      - type
      - weighed_on
    JobModelArray:
      type: array
      items:
        $ref: '#/components/schemas/JobModel'
    JobReturnFullModel:
      type: object
      description: Job return full model.
      properties:
        bin_request_id:
          type: integer
          format: int64
          description: Job identifier.
        dumped_by:
          type: integer
          description: Driver or provider user ID based on dumped_by_driver state.
        dumped_by_driver:
          type: boolean
          description: Job dumped by driver when TRUE.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        original_dest_id:
          type: integer
          format: int64
          description: Resource identifier.
        original_dump_id:
          type: integer
          format: int64
          description: Resource identifier.
        returned_by:
          type: integer
          description: Driver or provider user ID based on returned_by_driver.
        returned_by_driver:
          type: boolean
          description: Job returned by driver when TRUE.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        yard_id:
          type: integer
          format: int64
          description: Holding yard for this asset. Not null if customer_id is null
            and in_main_inventory is false.
      required:
      - bin_request_id
      - dumped_by
      - dumped_by_driver
      - id
      - original_dest_id
      - original_dump_id
      - returned_by
      - returned_by_driver
      - truck_id
      - yard_id
    JobReturnFullModelArray:
      type: array
      items:
        $ref: '#/components/schemas/JobReturnFullModel'
    ListAllJobsQueryParamsModel:
      type: object
      description: JobApi.list_all_jobs query parameters.
      properties:
        completed:
          type: boolean
          description: If true, return only records marked completed. If false, return
            only records marked incomplete. If unspecified, return all.
        completed_by:
          type: integer
          description: Driver or dispatcher identifier.
        completed_by_driver:
          type: boolean
          description: If true, return only records marked completed by a driver.
            If false, return only records marked incomplete. If unspecified, return
            all.
        created_on_gte:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
        deleted:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
        driver_id:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
        failed:
          type: boolean
          description: If true, return only records marked deleted. If false, return
            only records marked as deleted. If unspecified, return all.
        is_dispatched:
          type: boolean
          description: Filter jobs based on dispatch status. If true, records with
            a valid truck_id (dispatched) are returned. If false, records with no
            truck_id (not dispatched) are returned. If null, all records are returned.
        last_updated_gte:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
        returned_by:
          type: integer
          description: Driver or dispatcher identifier.
        returned_by_driver:
          type: boolean
          description: Return only records returned by driver when TRUE.
        schedule_gt:
          type: string
          format: date-time
          description: Return only jobs scheduled after. If unspecified, return all.
        schedule_gte:
          type: string
          format: date-time
          description: Return only jobs scheduled on or after. If unspecified, return
            all.
        schedule_lt:
          type: string
          format: date-time
          description: Return only jobs scheduled before.
        schedule_lte:
          type: string
          format: date-time
          description: Return only jobs scheduled on or before.
        truck_id:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
    ListAssetTypesQueryParamsModel:
      type: object
      description: List asset types query parameters.
      properties:
        deleted:
          type: boolean
          description: If TRUE, return only deleted records. If FALSE, return only
            active records. If unspecified, return all records.
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListAssetsQueryParamsModel:
      type: object
      description: List assets query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListCustomersQueryParamsModel:
      type: object
      description: List customers query params.
      properties:
        active:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
        created_on_gte:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
        is_parent:
          type: boolean
          description: If true, return accounts with no parent. If false, return accounts
            with a parent. If null, all records returned.
        last_updated_gte:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
        location_id:
          type: integer
          format: int64
          description: If specified, return only records matching this location. If
            unspecified, return all location records.
        name:
          type: string
          description: Name (free text).
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
        parent_id:
          type: integer
          format: int64
          description: If specified, return only children of the specified parent_id.
    ListHaulerConnectionsQueryParamsModel:
      type: object
      description: List hauler connections query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListHaulersQueryParamsModel:
      type: object
      description: List haulers query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListHaulersRequestHeadersModel:
      type: object
      description: Request headers for retrieving haulers.
      properties:
        authorization:
          type: string
          description: Authorization header (bearer with access token). See the [Authentication
            Guide](/docs/authentication_guide) to get started.
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
        x-tenant-id:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      required:
      - authorization
    ListJobsQueryParamsModel:
      type: object
      description: JobApi.list_jobs query parameters.
      properties:
        completed:
          type: boolean
          description: If true, return only records marked completed. If false, return
            only records marked incomplete. If unspecified, return all.
        completed_by:
          type: integer
          description: Driver or dispatcher identifier.
        completed_by_driver:
          type: boolean
          description: If true, return only records marked completed by a driver.
            If false, return only records marked incomplete. If unspecified, return
            all.
        created_on_gte:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
        deleted:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
        driver_id:
          type: string
          description: If specified, return only records matching this driver. If
            unspecified, return all.
        failed:
          type: boolean
          description: If true, return only records marked deleted. If false, return
            only records marked as deleted. If unspecified, return all.
        is_dispatched:
          type: boolean
          description: Filter jobs based on dispatch status. If true, records with
            a valid truck_id (dispatched) are returned. If false, records with no
            truck_id (not dispatched) are returned. If null, all records are returned.
        last_updated_gte:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
        returned_by:
          type: integer
          description: Driver or dispatcher identifier.
        returned_by_driver:
          type: boolean
          description: Return only records returned by driver when TRUE.
        schedule_gt:
          type: string
          format: date-time
          description: Return only jobs scheduled after. If unspecified, return all.
        schedule_gte:
          type: string
          format: date-time
          description: Return only jobs scheduled on or after. If unspecified, return
            all.
        schedule_lt:
          type: string
          format: date-time
          description: Return only jobs scheduled before.
        schedule_lte:
          type: string
          format: date-time
          description: Return only jobs scheduled on or before.
        truck_id:
          type: integer
          format: int64
          description: If specified, return only records matching this truck. If unspecified,
            return all.
    ListLocationCustomersQueryParamsModel:
      type: object
      description: JobApi.list_jobs query parameters.
      properties:
        active:
          type: boolean
          description: If true, return only active records. If false, return only
            inactive records. If unspecified, return all.
        created_on_gte:
          type: string
          format: date-time
          description: Return records created on or after the specified date. If unspecified,
            return all.
        is_parent:
          type: boolean
          description: If true, return accounts with no parent. If false, return accounts
            with a parent. If null, all records returned.
        last_updated_gte:
          type: string
          format: date-time
          description: Return only records updated after (must be in past). If unspecified,
            return all.
        name:
          type: string
          description: Name (free text).
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
        parent_id:
          type: integer
          format: int64
          description: If specified, return only children of the specified parent_id.
    ListLocationsQueryParamsModel:
      type: object
      description: List locations query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListMaterialsQueryParamsModel:
      type: object
      description: List materials query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListTenantsQueryParamsModel:
      type: object
      description: List tenants query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListTrucksQueryParamsModel:
      type: object
      description: List trucks query parameters.
      properties:
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    ListUsersQueryParamsModel:
      type: object
      description: List users query parameters.
      properties:
        has_role:
          type: string
          description: User role.
        page_index:
          type: integer
          description: Paged results page index (starting from 1).
        page_limit:
          type: integer
          description: Maximun number of results per page.
    LocationAddressModel:
      type: object
      description: Location address profile.
      properties:
        id:
          type: integer
          format: int64
          description: Location address id, always null (synthesized).
        latitude:
          type: string
          description: Latitude.
        line_1:
          type: string
          description: Location address line 1.
        line_2:
          type: string
          description: Location address line 2, always null (synthesized).
        line_3:
          type: string
          description: Location address line 3, always null (synthesized).
        line_4:
          type: string
          description: Location address line 4, always null (synthesized).
        locality:
          type: string
          description: City.
        longitude:
          type: string
          description: longitude.
        postcode:
          type: string
          description: Zip code.
        region:
          type: string
          description: State.
      required:
      - id
      - latitude
      - line_1
      - locality
      - longitude
      - region
    LocationContactModel:
      type: object
      description: Location contact profile.
      properties:
        email:
          type: string
          format: email
          description: Email address comma-separated list.
        id:
          type: integer
          format: int64
          description: Location contact id, always null (synthesized).
        name:
          type: string
          description: Contact name.
        number:
          type: string
          description: Contact phone number.
      required:
      - email
      - id
      - name
      - number
    LocationListModel:
      type: object
      description: Location data list results (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/LocationModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    LocationModel:
      type: object
      description: Location data.
      properties:
        address:
          $ref: '#/components/schemas/LocationAddressModel'
        allow_new_asset_numbers:
          type: boolean
          description: Allow input of new asset numbers.
        asset_number_required:
          type: boolean
          description: Require assets to have numbers.
        auto_billing_setup:
          type: boolean
          description: Automatically open billing when a customer is created through
            the CC.
        auto_complete_dumps:
          type: boolean
          description: Automatically complete dump jobs.
        auto_rollover_enabled:
          type: boolean
          description: Automatically move pending jobs scheduled for a date in the
            past to the current date.
        bar_code_type:
          type: string
          description: (deprecated) Set to any value to enable barcode scanning.
        billing_accounts_global:
          type: boolean
          description: Share billing accounts between locations.
        contact:
          $ref: '#/components/schemas/LocationContactModel'
        delivery_hidden:
          type: boolean
          description: Hide delivery job type in user interfaces, except for existing
            delivery jobs (job type 'L').
        delivery_name:
          type: string
          description: Name used in the UI which replaces the word 'Delivery' for
            job types (job type 'L').
        distance_factor:
          type: string
          description: Conversion factor to get from kilometers to the desired distance
            unit of measurement
        distance_label:
          type: string
          description: Distance unit of measurement
        do_share_drivers:
          type: boolean
          description: Share drivers between locations
        driver_self_assignment:
          type: boolean
          description: Driver can self assign.
        dropoff_hidden:
          type: boolean
          description: Hide dropoff job type in user interfaces, except for existing
            delivery jobs (job type 'D').
        dropoff_name:
          type: string
          description: Name used in the UI which replaces the word 'Dropoff' for job
            types (job type 'D').
        dtt_enabled:
          type: boolean
          description: Enables the Daily Truck Timeline.
        exchange_hidden:
          type: boolean
          description: Hide exchange job type in user interfaces, except for existing
            exchange jobs (job type 'E').
        exchange_name:
          type: string
          description: Name used in the UI which replaces the word 'Exchange' for
            job types (job type 'E').
        id:
          type: integer
          format: int64
          description: Location identifier.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        leed_enabled:
          type: boolean
          description: Enable LEED features.
        main_inventory_name:
          type: string
          description: Name of the location's main inventory.
        name:
          type: string
          description: Name for a location.
        notify_on_acknowledged_job:
          type: boolean
          description: Send email notification to the location's contact when a job
            is acknowledged.
        notify_on_completed_job:
          type: boolean
          description: Send email notification to the location's contact when a job
            is completed.
        notify_on_dispatched_job:
          type: boolean
          description: Send email notification to the location's contact when a job
            is dispatched.
        notify_on_failed_job:
          type: boolean
          description: Send email notification to the location's contact when a job
            is failed.
        pickup_hidden:
          type: boolean
          description: Hide pickup job type in user interfaces, except for existing
            pickup jobs (job type 'P').
        pickup_name:
          type: string
          description: Name used in the UI which replaces the word 'Pickup' for job
            types (job type 'P').
        require_reason_fail_delay:
          type: boolean
          description: Require drivers to input the reason that a job was failed or
            delayed
        require_reference_number:
          type: boolean
          description: Require reference numbers when creating or editing jobs.
        require_signature:
          type: boolean
          description: Require drivers to collect signatures when completing jobs.
        service_disclaimer:
          type: string
          description: Service disclaimer text presented to customers when drivers
            acquire signatures.
        service_hidden:
          type: boolean
          description: Hide service job type in user interfaces, except for existing
            service jobs (job type 'R').
        service_name:
          type: string
          description: Name used in the UI which replaces the word 'Service' for job
            types (job type 'R').
        timezone:
          type: string
          description: Timezone identifier.
        use_additional_items:
          type: boolean
          description: Use additional items.
      required:
      - address
      - allow_new_asset_numbers
      - asset_number_required
      - auto_billing_setup
      - auto_complete_dumps
      - auto_rollover_enabled
      - bar_code_type
      - billing_accounts_global
      - contact
      - delivery_hidden
      - delivery_name
      - distance_factor
      - distance_label
      - do_share_drivers
      - driver_self_assignment
      - dropoff_hidden
      - dropoff_name
      - dtt_enabled
      - exchange_hidden
      - exchange_name
      - id
      - is_active
      - leed_enabled
      - main_inventory_name
      - name
      - notify_on_acknowledged_job
      - notify_on_completed_job
      - notify_on_dispatched_job
      - notify_on_failed_job
      - pickup_hidden
      - pickup_name
      - require_reason_fail_delay
      - require_reference_number
      - require_signature
      - service_disclaimer
      - service_hidden
      - service_name
      - timezone
      - use_additional_items
    LocationModelArray:
      type: array
      items:
        $ref: '#/components/schemas/LocationModel'
    MaterialModel:
      type: object
      description: Material model.
      properties:
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        description:
          type: string
          description: Free-form text description.
        factor:
          type: string
        group_description:
          type: string
          description: Free-form text description.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        line_item_id:
          type: integer
          format: int64
          description: Line item identifier.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        unit_price:
          type: string
          description: Job material name.
        uom:
          type: string
          description: Unit of Measure.
      required:
      - created_on
      - description
      - factor
      - group_description
      - id
      - line_item_id
      - location_id
      - unit_price
      - uom
    MaterialModelArray:
      type: array
      items:
        $ref: '#/components/schemas/MaterialModel'
    PrintJobListPdfFile:
      type: string
      format: binary
      description: Job list PDF file.
    ProductListModel:
      type: object
      description: ProductModel list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/ProductModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    ProductModel:
      type: object
      description: Product model.
      properties:
        auto_deduct:
          type: integer
          description: Deduct preset tare weight for truck/asset.
        by_weight:
          type: boolean
          description: By weight if TRUE.
        category:
          type: string
          description: Product category.
        description:
          type: string
          description: Product description.
        id:
          type: integer
          format: int64
          description: Product identifier.
        is_deleted:
          type: boolean
          description: Indicates whether job is still valid.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Product name.
        purchase:
          type: boolean
          description: Reverse the value from a charge to a purchase when TRUE.
      required:
      - auto_deduct
      - by_weight
      - category
      - description
      - id
      - is_deleted
      - location_id
      - name
      - purchase
    ProductModelArray:
      type: array
      items:
        $ref: '#/components/schemas/ProductModel'
    PwResetQueryParameters:
      type: object
      description: User password reset new password query parameters.
      properties:
        new_password:
          type: string
          description: New password.
        recaptcha:
          type: string
          description: Recaptcha answer.
        token:
          type: string
          description: Reset token.
      required:
      - new_password
      - recaptcha
      - token
    PwResetRequestQueryParameters:
      type: object
      description: Request user password reset query parameters.
      properties:
        recaptcha:
          type: string
          description: Recaptcha answer.
        username:
          type: string
          description: Username.
      required:
      - recaptcha
      - username
    PwResetRequestResponseBodyModel:
      type: object
      description: Request user password reset response body.
    PwResetResponseBodyModel:
      type: object
      description: User password successfully reset response body.
    RedirectResponseHeadersModel:
      type: object
      description: Redirect response headers.
      properties:
        location:
          type: string
          description: Callback URL.
      required:
      - location
    RouteListModel:
      type: object
      description: Route list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/RouteModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    RouteModel:
      type: object
      description: Route model.
      properties:
        auto_decline:
          type: boolean
          description: Auto decline.
        days_interval:
          type: integer
          description: Days interval.
        end_at_lat:
          type: string
          description: Latitude.
        end_at_lng:
          type: string
          description: Longitude.
        end_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        friday_on:
          type: boolean
          description: Friday on.
        id:
          type: integer
          format: int64
          description: Trailer record identifier.
        interface_color:
          type: string
          description: Interface color.
        last_dispatched:
          type: string
          format: date-time
          description: Last time this route had a job dispatched.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        monday_on:
          type: boolean
          description: Monday on.
        name:
          type: string
          description: Route name.
        recure_date:
          type: string
          format: date-time
          description: Recure date.
        route_zone_id:
          type: integer
          description: Route zone id
        saturday_on:
          type: boolean
          description: Saturday on.
        start_at_lat:
          type: string
          description: Latitude.
        start_at_lng:
          type: string
          description: Longitude.
        start_time:
          type: string
          format: date-time
          description: Scheduled job completion date.
        sunday_on:
          type: boolean
          description: Sunday on.
        thursday_on:
          type: boolean
          description: Thursday on.
        truck_id:
          type: integer
          format: int64
          description: Truck identifier.
        tuesday_on:
          type: boolean
          description: Tuesday on.
        visualize_round_trip:
          type: boolean
          description: Visualize round trip.
        wednesday_on:
          type: boolean
          description: Wednesday on.
        will_rollover:
          type: boolean
          description: Will rollover.
      required:
      - auto_decline
      - days_interval
      - end_at_lat
      - end_at_lng
      - end_time
      - friday_on
      - id
      - interface_color
      - last_dispatched
      - location_id
      - monday_on
      - name
      - recure_date
      - route_zone_id
      - saturday_on
      - start_at_lat
      - start_at_lng
      - start_time
      - sunday_on
      - thursday_on
      - truck_id
      - tuesday_on
      - visualize_round_trip
      - wednesday_on
      - will_rollover
    RouteModelArray:
      type: array
      items:
        $ref: '#/components/schemas/RouteModel'
    RouteStopModel:
      type: object
      description: Route stop model.
      properties:
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: Asset quantity.
        created_on:
          type: string
          format: date-time
          description: Created on date.
        dispatcher_notes:
          type: string
          description: Dispatcher notes.
        id:
          type: integer
          description: Route stop id.
        num_times_completed:
          type: integer
          description: Number of times completed.
        num_times_failed:
          type: integer
          description: Number of times failed.
        old_request_for:
          type: integer
          description: Old request for.
        pickup_on:
          type: string
          format: date-time
          description: Pickup on.
        pickup_quantity:
          type: integer
          description: Pickup quantity.
        priority:
          type: integer
          description: Priority.
        request_for:
          type: integer
          description: Customer id.
        request_type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
        route_id:
          type: integer
          format: int64
          description: Trailer record identifier.
        skip_next_dispatch:
          type: string
          description: Comma separated list of route_ids to skip.
      required:
      - asset_id
      - asset_quantity
      - created_on
      - dispatcher_notes
      - id
      - num_times_completed
      - num_times_failed
      - old_request_for
      - pickup_on
      - pickup_quantity
      - priority
      - request_for
      - request_type
      - route_id
      - skip_next_dispatch
    SignJobQueryParamsModel:
      type: object
      description: Image upload query parameters.
      properties:
        image_file:
          type: string
          format: binary
          description: Image file (.jpg, .png, .gif).
        ip_address:
          type: string
          description: V4 IP Address.
        signator:
          type: string
          description: Signator.
      required:
      - image_file
      - ip_address
      - signator
    StandardPublicRequestHeadersModel:
      type: object
      description: Common request headers for requests not requiring Authorization.
      properties:
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
    StandardRequestHeadersModel:
      type: object
      description: Common request headers.
      properties:
        authorization:
          type: string
          description: Authorization header (bearer with access token). See the [Authentication
            Guide](/docs/authentication_guide) to get started.
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
        x-tenant-id:
          type: integer
          format: int64
          description: Tenant identifier. Contact [CRO Software](https://crosoftwaresolutions.com/)
            for more info if you don't already have this id. See [list tenant ids](/docs/requests/tenants_list_tenants)
            for info on listing the tenants you have access to.
      required:
      - authorization
      - x-tenant-id
    StandardResponseHeadersModel:
      type: object
      description: Common response headers.
      properties:
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
      required:
      - x-api-version
      - x-request-id
    TenantListModel:
      type: object
      description: Tenant list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/TenantModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    TenantModel:
      type: object
      description: Tenant profile.
      properties:
        address:
          type: string
          description: Street address.
        city:
          type: string
          description: Address locality (e.g. city).
        code:
          type: string
          description: Facility identifier.
        created_on:
          type: string
          format: date-time
          description: Timestamp of creation (must be in past).
        email:
          type: string
          format: email
          description: Email address.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        name:
          type: string
          description: Name (free text).
        phone:
          type: string
          description: Phone number (free text).
        state:
          type: string
          description: Address region (e.g. state).
        truck_limit:
          type: integer
          description: Maximum trucks configurable for tenant.
        zip:
          type: string
          description: Postal code (may include letters and symbols).
      required:
      - address
      - city
      - code
      - created_on
      - email
      - id
      - is_active
      - name
      - phone
      - state
      - truck_limit
      - zip
    TenantModelArray:
      type: array
      items:
        $ref: '#/components/schemas/TenantModel'
    TenantRequestHeadersModel:
      type: object
      description: Request headers for listing tenants.
      properties:
        authorization:
          type: string
          description: Authorization header (bearer with access token). See the [Authentication
            Guide](/docs/authentication_guide) to get started.
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
      required:
      - authorization
    ThirdPartyHaulerConnectionListModel:
      type: object
      description: Third party hauler connection list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/ThirdPartyHaulerConnectionModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    ThirdPartyHaulerConnectionModel:
      type: object
      description: Third party hauler connection profile.
      properties:
        approved_by:
          type: integer
          format: int64
          description: Approved by.
        approved_on:
          type: string
          format: date-time
          description: Approval date.
        denied_on:
          type: string
          format: date-time
          description: Denial date.
        is_approved:
          type: boolean
          description: Approved record state.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        provider_id:
          type: integer
          format: int64
          description: Bin provider identifier.
        provider_name:
          type: string
          description: Name (free text).
        requested_on:
          type: string
          format: date-time
          description: Requested date.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
      required:
      - approved_by
      - approved_on
      - denied_on
      - is_approved
      - location_id
      - provider_id
      - provider_name
      - requested_on
      - third_party_hauler_id
    ThirdPartyHaulerConnectionModelArray:
      type: array
      items:
        $ref: '#/components/schemas/ThirdPartyHaulerConnectionModel'
    ThirdPartyHaulerListModel:
      type: object
      description: Third party hauler list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/ThirdPartyHaulerModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    ThirdPartyHaulerModel:
      type: object
      description: Third party hauler profile.
      properties:
        id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        name:
          type: string
          description: Name (free text).
      required:
      - id
      - name
    ThirdPartyHaulerModelArray:
      type: array
      items:
        $ref: '#/components/schemas/ThirdPartyHaulerModel'
    TrailerListModel:
      type: object
      description: TrailerModel list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/TrailerModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    TrailerModel:
      type: object
      description: Trailer profile.
      properties:
        id:
          type: integer
          format: int64
          description: Trailer record identifier.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        make:
          type: string
          description: Truck make (free text).
        name:
          type: string
          description: Trailer name (free text).
        size:
          type: string
          description: Tailer size.
        weight:
          type: integer
          description: Trailer year.
        year:
          type: integer
          description: Trailer year.
      required:
      - id
      - location_id
      - make
      - name
      - size
      - weight
      - year
    TrailerModelArray:
      type: array
      items:
        $ref: '#/components/schemas/TrailerModel'
    TruckIdArray:
      type: array
      items:
        type: integer
        format: int64
        description: Truck identifier.
    TruckListModel:
      type: object
      description: Truck list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/TruckModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    TruckModel:
      type: object
      description: Truck profile.
      properties:
        driver_id:
          type: string
          description: Driver identifier.
        id:
          type: integer
          format: int64
          description: Resource identifier.
        interface_color:
          type: string
          description: Hex string color identifier.
        is_deactivated:
          type: boolean
          description: Truck inactive if TRUE.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Name (free text).
        notes:
          type: string
          description: Notes (free text).
        out_of_service:
          type: boolean
          description: Truck out of service.
        require_odometer:
          type: boolean
          description: Require odometer.
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        trailer_id:
          type: integer
          format: int64
          description: Trailer record identifier.
        type:
          type: string
          description: Truck type (free text).
        weight:
          type: string
          description: Truck empty weight.
      required:
      - driver_id
      - id
      - interface_color
      - is_deactivated
      - location_id
      - name
      - notes
      - out_of_service
      - require_odometer
      - third_party_hauler_id
      - trailer_id
      - type
      - weight
    TruckModelArray:
      type: array
      items:
        $ref: '#/components/schemas/TruckModel'
    UpdateAdditionalItemModel:
      type: object
      description: Updated job item.
      properties:
        completed:
          type: boolean
          description: Completion flag.
        declined:
          type: boolean
          description: Declined flag.
        deduct_weight:
          type: string
        description:
          type: string
          description: Item description.
        failed:
          type: boolean
          description: Failed flag.
        heavy_weight:
          type: string
        light_weight:
          type: string
        material_item_id:
          type: integer
          format: int64
          description: Material item identifier.
        notes:
          type: string
          description: Item notes.
        quantity:
          type: string
          description: Item quantity.
    UpdateCustomerAddressModel:
      type: object
      description: Customer address.
      properties:
        country:
          type: string
          description: Country code [(ISO 3166-1 alpha 2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
        is_billing:
          type: boolean
          description: If true, this is the customer's billing address.
        is_shipping:
          type: boolean
          description: Customer's shipping address if true.
        latitude:
          type: string
          description: Latitude.
        line_1:
          type: string
          description: Street address.
        line_2:
          type: string
          description: Street address line 2.
        line_3:
          type: string
          description: Street address line 3.
        line_4:
          type: string
          description: Street address line 4 (doubles as county).
        locality:
          type: string
          description: Address locality (e.g. city).
        longitude:
          type: string
          description: longitude.
        postcode:
          type: string
          description: Postal code (may include letters and symbols).
        region:
          type: string
          description: Address region (e.g. state).
      required:
      - country
      - is_billing
      - is_shipping
      - latitude
      - line_1
      - locality
      - longitude
      - postcode
      - region
    UpdateCustomerContactModel:
      type: object
      description: Update customer contact.
      properties:
        email:
          type: string
          format: email
          description: Email address comma-separated list.
        fax:
          type: string
          description: Fax number (free text).
        name:
          type: string
          description: Name (free text).
        notify_on_acknowledged_request:
          type: boolean
          description: Notify on acknowledge request.
        notify_on_completed_request:
          type: boolean
          description: Notify on completed request.
        notify_on_dispatched_request:
          type: boolean
          description: Notify on dispatched request.
        notify_on_failed_request:
          type: boolean
          description: Notify on failed request.
        notify_on_new_request:
          type: boolean
          description: Notify on new request.
        number:
          type: string
          description: Phone number (free text).
    UpdateCustomerModel:
      type: object
      description: Update customer.
      properties:
        name:
          type: string
          description: Name (free text).
        parent_id:
          type: integer
          format: int64
          description: Parent record identifier.
    UpdateDispatchCustomerLocationModel:
      type: object
      description: Customer location profile.
      properties:
        account_number_1:
          type: string
          description: Customer account number.
        account_number_2:
          type: string
          description: Customer account number.
        is_active:
          type: boolean
          description: Records marked inactive are treated as deleted (soft delete).
        is_commercial:
          type: boolean
          description: Commercial address if true, private if false.
        note:
          type: string
          description: Notes (free text).
        reference_number:
          type: string
          description: Reference number (free text).
        renewal_date:
          type: string
          format: date-time
          description: Renewal date.
        sales_rep:
          type: string
          description: Name of sales representative.
        sales_rep_id:
          type: string
          description: Sales rep identifier. May be an integer provider id, the sales
            user UUID, or the username.
        suspension_id:
          type: integer
          format: int64
          description: Suspension identifier.
    UpdateJobProfileModel:
      type: object
      description: Update job profile.
      properties:
        add_to_routes:
          type: string
          description: CSV of route IDs which the dropped asset should be assigned
            to.
        add_to_routes_settings:
          $ref: '#/components/schemas/AddToRoutesSettingsModelArray'
        arrived_at_destination_on:
          type: string
          format: date-time
          description: Job starting time.
        asset_dropped_id:
          type: integer
          format: int64
          description: DeployedBinID of the asset that was dropped by this job, only
            allowed to be set if the job's type is 'D' or 'E'.
        asset_id:
          type: integer
          format: int64
          description: Job asset identifier. Applicable to job types 'E', 'P', 'R'.
        asset_quantity:
          type: integer
          description: How many assets are being serviced within a cluster (for jobs
            assigned to an asset cluster). For jobs dispatched by routes, or manually
            dispatched route stops, this value is 0 or 1.
        asset_type_id:
          type: integer
          format: int64
          description: Selected asset for the job (job types 'D', 'L', 'E').
        departed_on:
          type: string
          format: date-time
        desired_asset_desc:
          type: string
          description: Free-form text entered by dispatchers and drivers to be used
            as the future asset description.
        desired_end_time:
          type: string
          format: date-time
          description: Future estimated time of job completion.
        desired_start_time:
          type: string
          format: date-time
          description: Time customer has requested job start, set by dispatchers for
            dispatchers and drivers.
        dispatch_priority:
          type: string
          description: Entered by dispatchers to determine dispatch order.
        dispatcher_notes:
          type: string
          description: Entered by dispatchers, read by drivers and dispatchers.
        do_confirm:
          type: boolean
          description: Tell dispatcher that a customer should be contacted before
            job is dispatched.
        driver_notes:
          type: string
          description: Entered by drivers when completing or failing a job for dispatchers.
        dump_location_id:
          type: integer
          description: Asset or asset cluster dump location identifier (e.g. trash
            bin needs dumped before returning from customer).
        ends_at_customer:
          type: boolean
          description: The job ends at the customer location when TRUE.
        final_location_id:
          type: integer
          format: int64
          description: Final location identifier. Used by dispatchers for prioritizing
            jobs. Used by drivers to know where to leave the asset on job completion.
        is_acknowledged:
          type: boolean
          description: True if the job has been acknowledged.
        is_separate_from_route_list:
          type: boolean
          description: This job should be separate from any per-route job list when
            TRUE.
        merged_with_route_id:
          type: integer
          format: int64
          description: IDs of the route which this job should be merged into.
        pickup_date:
          type: string
          format: date-time
          description: A pickup job is scheduled for this date upon job completion.
            If the asset or cluster is assigned to a route stop, the route stop will
            be deleted. Must be in the future.
        priority:
          type: integer
          description: Assigned by dispatchers for job order completion determination
            for drivers.
        reference_number:
          type: string
          description: Reference number (free text).
        require_image:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to upload
            one or more job images before completion.
        require_materials:
          type: boolean
          description: The driver is required to report the weights of any additional
            materials related to the job when TRUE.
        require_signature:
          type: boolean
          description: Set by dispatchers and drivers, requires drivers to get a customer
            signature before job completion.
        require_weights:
          type: boolean
          description: Set by disptachers and drivers, requires drivers to set material
            weights before job completion.
        started_on:
          type: string
          format: date-time
          description: Job starting time.
        starts_at_customer:
          type: boolean
          description: The job begins at the customer location when TRUE.
        type:
          type: string
          description: Set by dispatchers and customers. Represents physical actions
            to execute on job start.
    UpdateTruckQueryParamsModel:
      type: object
      description: Set truck driver query parameters.
      properties:
        driver_id:
          type: string
          description: Driver identifier.
      required:
      - driver_id
    UpdateTruckRequestModel:
      type: object
      description: Update truck values.
      properties:
        driver_id:
          type: string
          description: Driver identifier. A null driver_id resets the truck to have
            no driver.
    UpdateWebhookModel:
      type: object
      description: Update webhook model.
      properties:
        events:
          $ref: '#/components/schemas/hook_events'
        secret:
          type: string
          description: Response body HMAC signing key.
        url:
          type: string
          description: Callback URL.
      required:
      - url
    UploadImageRequestBodyModel:
      type: object
      description: Image upload query parameters.
      properties:
        image_file:
          type: string
          format: binary
          description: Image file (.jpg, .png, .gif).
      required:
      - image_file
    UserListResultsModel:
      type: object
      description: User info.
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/UserModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    UserModel:
      type: object
      description: User info.
      properties:
        dispatcher_id:
          type: integer
          format: int64
          description: Resource identifier.
        driver_id:
          type: string
          description: Driver identifier.
        id:
          type: string
          description: User identifier.
        roles:
          $ref: '#/components/schemas/roleArray'
        third_party_hauler_id:
          type: string
          format: uuid
          description: Third party hauler identifier.
        uid:
          type: string
          format: uuid
          description: Identity UUID.
        username:
          type: string
          description: Username.
      required:
      - dispatcher_id
      - driver_id
      - id
      - roles
      - third_party_hauler_id
      - uid
      - username
    UserModelArray:
      type: array
      items:
        $ref: '#/components/schemas/UserModel'
    VerifyEmailQueryParamsModel:
      type: object
      description: Verify user after hauler create.
      properties:
        token:
          type: string
          description: Email verification token.
        verified_redirect_url:
          type: string
          description: Redirect URL.
      required:
      - token
    WebhookListModel:
      type: object
      description: Webhook list (paged).
      properties:
        current_limit:
          type: integer
          description: Maximun number of results per page.
        current_page:
          type: integer
          description: Paged results page index (starting from 1).
        results:
          $ref: '#/components/schemas/WebhookModelArray'
        total_count:
          type: integer
          description: Paged results total viewable records.
        total_pages:
          type: integer
          description: Paged results total pages.
      required:
      - current_limit
      - current_page
      - results
      - total_count
      - total_pages
    WebhookModel:
      type: object
      description: Webhook model.
      properties:
        deleted_at:
          type: string
          format: date-time
          description: Denial date.
        events:
          $ref: '#/components/schemas/hook_events'
        id:
          type: integer
          format: int64
          description: Resource identifier.
        last_http_fail:
          type: string
          format: date-time
          description: Last time of url webhook execution failure.
        last_http_success:
          type: string
          format: date-time
          description: Last time of url webhook execution success.
        secret:
          type: string
          description: Response body HMAC signing key.
        url:
          type: string
          description: Callback URL.
      required:
      - deleted_at
      - events
      - id
      - last_http_fail
      - last_http_success
      - url
    WebhookModelArray:
      type: array
      items:
        $ref: '#/components/schemas/WebhookModel'
    WebhookPingResponseHeadersModel:
      type: object
      description: Webhook ping response headers.
      properties:
        content-type:
          type: string
          description: Mime type (e.g. application/json).
        x-api-version:
          type: string
          description: Version identifier (date format).
        x-cro-signature:
          type: string
          description: HMAC message signature.
        x-request-id:
          type: string
          format: uuid
          description: Request identifier.
      required:
      - content-type
      - x-api-version
      - x-cro-signature
    WebhookPingResultModel:
      type: object
      description: Webhook ping result.
      properties:
        delivery_id:
          type: string
          format: uuid
          description: Hook execution identifier.
        http_status:
          type: integer
          description: HTTP status return code.
        message:
          type: string
          description: Description of ping result.
      required:
      - delivery_id
      - http_status
      - message
    asset_type.valid_trucks:
      type: array
      items:
        type: integer
        format: int64
        description: Truck identifier.
    email.verify.response_msg:
      type: string
      description: Email verification response message.
    endpoints.f.PrintJobListPdfFileFModel:
      type: object
      description: Get job list for truck.
      properties:
        f:
          type: string
      required:
      - f
    endpoints.f.UpdateTruckFModel:
      type: object
      description: Update truck.
      properties:
        f:
          type: string
          description: Query parameters were moved to the request body. Refer to UpdateTruckQueryParamsModel
            for older version compatibility.
      required:
      - f
    hook_events:
      type: array
      items:
        type: string
        description: Hook event.
    image.file:
      type: string
      format: binary
      description: Image file (.jpg, .png, .gif).
    roleArray:
      type: array
      items:
        type: string
        description: User role.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes: &id001
            api: General API access
            webhook: Webhook management
        authorizationCode:
          authorizationUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/auth
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes: *id001
