> ## Documentation Index
> Fetch the complete documentation index at: https://hoversprite.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an order



## OpenAPI

````yaml api-reference/openapi.json put /api/receptionist/order/{id}
openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://localhost:8080
    description: Generated server url
security: []
paths:
  /api/receptionist/order/{id}:
    put:
      tags:
        - Order
      summary: Update an order
      operationId: update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SprayOrderRequestDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SprayOrderResponseDTO'
components:
  schemas:
    SprayOrderRequestDTO:
      required:
        - area
        - cropType
        - date
        - latitude
        - location
        - longitude
        - orderStatus
        - paymentMethod
        - session
      type: object
      properties:
        farmer:
          $ref: '#/components/schemas/UserDTO'
        receptionist:
          $ref: '#/components/schemas/UserDTO'
        date:
          type: string
          format: date
        session:
          $ref: '#/components/schemas/SessionDTO'
        location:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        cropType:
          $ref: '#/components/schemas/CropModel'
        area:
          minimum: 1
          type: number
        orderStatus:
          type: string
          enum:
            - pending
            - cancelled
            - confirmed
            - assigned
            - in_progress
            - completed
        paymentStatus:
          type: string
          enum:
            - pending
            - paid
            - failed
        paymentMethod:
          type: string
          enum:
            - cash
            - visa
            - mastercard
        completionDate:
          type: string
          format: date
    SprayOrderResponseDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        farmer:
          $ref: '#/components/schemas/UserDTO'
        receptionist:
          $ref: '#/components/schemas/UserDTO'
        date:
          type: string
          format: date
        session:
          $ref: '#/components/schemas/SessionDTO'
        location:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        cropType:
          $ref: '#/components/schemas/CropModel'
        area:
          type: number
        cost:
          type: number
        orderStatus:
          type: string
          enum:
            - pending
            - cancelled
            - confirmed
            - assigned
            - in_progress
            - completed
        paymentStatus:
          type: string
          enum:
            - pending
            - paid
            - failed
        paymentMethod:
          type: string
          enum:
            - cash
            - visa
            - mastercard
        completionDate:
          type: string
          format: date
        confirmed:
          type: boolean
        creationDate:
          type: string
          format: date
    UserDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        email:
          type: string
        fullName:
          type: string
        phoneNumber:
          type: string
        street:
          type: string
        city:
          type: string
        province:
          type: string
        postalCode:
          type: string
        expertise:
          type: string
          enum:
            - apprentice
            - adept
            - expert
        role:
          type: string
          enum:
            - farmer
            - receptionist
            - sprayer
            - admin
        active:
          type: boolean
    SessionDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        startTime:
          $ref: '#/components/schemas/LocalTime'
        endTime:
          $ref: '#/components/schemas/LocalTime'
    CropModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
    LocalTime:
      type: object
      properties:
        hour:
          type: integer
          format: int32
        minute:
          type: integer
          format: int32
        second:
          type: integer
          format: int32
        nano:
          type: integer
          format: int32

````