openapi: 3.0.3
info:
  title: 'Alvargo API Documentation'
  description: "Alvargo - Delivery Management API A RESTful API for managing delivery requests and driver responses.\nA RESTful API for managing delivery requests and driver responses. Built with Laravel, this API handles user authentication, delivery request lifecycle, and driver-customer interactions.\nFeatures"
  version: 1.0.0
servers:
  -
    url: 'https://alvargo.us/Alvargo_Retail_API/public'
paths:
  /api/user/login:
    post:
      summary: ''
      operationId: postApiUserLogin
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: ''
                  example: james@alvargo.uk
                  nullable: false
                password:
                  type: string
                  description: ''
                  example: '12345678'
                  nullable: false
              required:
                - email
                - password
      security: []
  /api/user/logout:
    post:
      summary: ''
      operationId: postApiUserLogout
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/user/register:
    post:
      summary: ''
      operationId: postApiUserRegister
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: ''
                  example: James
                  nullable: false
                email:
                  type: string
                  description: ''
                  example: james_alvargo@alvargo.uk
                  nullable: false
                password:
                  type: string
                  description: ''
                  example: '12345678'
                  nullable: false
                phone:
                  type: string
                  description: ''
                  example: '111222333'
                  nullable: false
              required:
                - name
                - email
                - password
                - phone
      security: []
  /api/users:
    get:
      summary: ''
      operationId: getApiUsers
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  /api/create-delivery-request:
    post:
      summary: ''
      operationId: postApiCreateDeliveryRequest
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pickupLocation:
                  type: string
                  description: "required'"
                  example: et
                  nullable: false
                dropOffLocation:
                  type: string
                  description: "required'"
                  example: est
                  nullable: false
                packageDetails:
                  type: string
                  description: "required'"
                  example: consequatur
                  nullable: false
                packageDimensions:
                  type: "object'"
                  description: ''
                  example: dolore
                  nullable: false
                proposedPrice:
                  type: integer
                  description: ''
                  example: 7
                  nullable: false
              required:
                - proposedPrice
      security: []
  /api/get-delivery-requests:
    get:
      summary: ''
      operationId: getApiGetDeliveryRequests
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  '/api/get-delivery-request/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiGetDeliveryRequestDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: amet
        required: true
        schema:
          type: string
      -
        in: path
        name: request_id
        description: ''
        example: 3
        required: true
        schema:
          type: integer
  /api/update-delivery-request-status:
    post:
      summary: ''
      operationId: postApiUpdateDeliveryRequestStatus
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 5
                  nullable: false
                status:
                  type: string
                  description: ''
                  example: "accepted enum: 'created','accepted','on_way_pickup','loading','in_transit','arrived_dropoff','unloading','delivered','proof_submitted' example: loading'"
                  nullable: false
              required:
                - status
      security: []
  '/api/update-contact-info/{delivery_request_id}':
    post:
      summary: ''
      operationId: postApiUpdateContactInfoDelivery_request_id
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: "required'"
                  example: expedita
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: ''
        example: 18
        required: true
        schema:
          type: integer
  '/api/get-status-history/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiGetStatusHistoryDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: "Optional parameter. required'"
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 18
  '/api/submit-driver-response/{delivery_request_id}':
    post:
      summary: ''
      operationId: postApiSubmitDriverResponseDelivery_request_id
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                response:
                  type: string
                  description: "enum: 'accept','decline','negotiate'"
                  example: deleniti
                  nullable: false
                price:
                  type: integer
                  description: ''
                  example: 13
                  nullable: false
              required:
                - response
                - price
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: ''
        example: 3
        required: true
        schema:
          type: integer
  '/api/get-driver-responses/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiGetDriverResponsesDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: ''
        example: 13
        required: true
        schema:
          type: integer
  '/api/get-delivery-proof/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiGetDeliveryProofDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: ''
        example: 9
        required: true
        schema:
          type: integer
  '/api/send-delivery-confirmation/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiSendDeliveryConfirmationDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: ''
        example: 19
        required: true
        schema:
          type: integer
  /api/submit-delivery-proof:
    post:
      summary: ''
      operationId: postApiSubmitDeliveryProof
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                signature:
                  type: string
                  format: binary
                  description: "The image'"
                  nullable: false
                photo:
                  type: string
                  format: binary
                  description: "The image'"
                  nullable: false
                delivery_request_id:
                  type: integer
                  description: ''
                  example: 17
                  nullable: false
              required:
                - signature
                - photo
                - delivery_request_id
      security: []
  '/api/delivery-accepted/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryAcceptedDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 18
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: modi
        required: true
        schema:
          type: string
  '/api/delivery-onway/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryOnwayDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 5
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: quia
        required: true
        schema:
          type: string
  '/api/delivery-loading/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryLoadingDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 4
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: quas
        required: true
        schema:
          type: string
  '/api/delivery-intransit/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryIntransitDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 14
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: qui
        required: true
        schema:
          type: string
  '/api/delivery-arriveddropoff/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryArriveddropoffDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 19
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: tenetur
        required: true
        schema:
          type: string
  '/api/delivery-delivered/{delivery_request_id}':
    get:
      summary: ''
      operationId: getApiDeliveryDeliveredDelivery_request_id
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_request_id:
                  type: integer
                  description: "required'"
                  example: 14
                  nullable: false
      security: []
    parameters:
      -
        in: path
        name: delivery_request_id
        description: 'The ID of the delivery request.'
        example: quam
        required: true
        schema:
          type: string
tags:
  -
    name: Endpoints
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.'
security:
  -
    default: []
