Skip to content

Schedule

Mounir Ghlaiel edited this page Apr 11, 2022 · 1 revision

Pick-up requests

A Pick-up request describes a customer action to schedule a date and time for waste collection.

Components:

schemas:
  pick-up-request:
    type: object
    properties:
      id:
        type: string
        format: uuid
      creationTS:
      type: string
        format: date-time
      createdBy:
        type: string
        item:
          $ref: '#/components/schemas/user.Id' //display Full Name and Phone number
      dueDate:
        type: string
        format: date
      shift:
        type: string
        enum: [morning, afternoon]
      LongLat:
        type: array
        items:
          $ref: '#/components/schemas/location.LongLat'

Contact is used to add a name and a phone number of a contact person if the customer is not available at the time of pick-up

      contact:
        type: object
        nullable: true
        items:
          $ref: '#/components/schemas/user'

Scheduled Pick-up requests will be sorted by distance and the field waypointRank represents the rank of pick-up destination from 1 to Threshold=25 by default

      waypointRank:
        type: number
        format: int8
        minimum: 1
        maximum: 25 // Default threshold variable

Pick Up status helps identify which actions can be taken on a pick-up. For example, the rating takes place only if pick-up.status=COMPLETED.

      status:
        type: string
        enum: [pending, attempted, completed, canceled] 

Attempts and reason help administrators answer claims from customers whose pick-up requests failed.

      attempts:
        type: number
        format: int8
        nullable: true
      reason:
        type: string
        enum: [unavailable, address not found, more] 
        nullable: true
Clone this wiki locally