> ## Documentation Index
> Fetch the complete documentation index at: https://nayax-44d6e37b-docs-marshall-faq-redistribution.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Visit Orders

> Creates new visit orders for machines. The request body should include the details of the machines to be visited.



## OpenAPI

````yaml /openapi/lynx.yaml post /v1/Scheduling/schedule/visit-order
openapi: 3.0.1
info:
  title: Nayax Operational Lynx API
  version: v1
servers:
  - url: https://qa-lynx.nayax.com/operational
security:
  - Authorization: []
paths:
  /v1/Scheduling/schedule/visit-order:
    post:
      tags:
        - Scheduling
      summary: Create Visit Orders
      description: >-
        Creates new visit orders for machines. The request body should include
        the details of the machines to be visited.
      operationId: create-visit-orders
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/MachineVisitOrderCreateRequestDto'
      responses:
        '200':
          description: The newly created visit orders.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MachineVisitOrderCreateResponseDto'
components:
  schemas:
    MachineVisitOrderCreateRequestDto:
      type: object
      properties:
        MachineId:
          type: integer
          format: int64
          description: >-
            The unique identifier of the machine for which the visit order is
            being created.
        VisitDate:
          type: string
          format: date-time
          description: The date and time when the machine is scheduled to be visited.
        DriverId:
          type: string
          format: uuid
          nullable: true
          description: >-
            The unique identifier of the driver assigned to visit the machine.
            This field is nullable if no driver is assigned.
        RouteId:
          type: integer
          format: int64
          nullable: true
          description: >-
            The unique identifier of the route associated with the machine
            visit. This field is nullable if the route is not specified.
        OrderKey:
          type: integer
          format: int32
          description: >-
            The sequence order key indicating the position of the machine in the
            visit order.
      additionalProperties: false
    MachineVisitOrderCreateResponseDto:
      type: object
      properties:
        VisitDate:
          type: string
          format: date-time
          description: The date and time when the machine is scheduled to be visited.
        MachineId:
          type: integer
          format: int64
          nullable: true
          description: >-
            The unique identifier of the machine associated with the visit
            order. This field is nullable if the machine ID is not available.
        DriverId:
          type: string
          format: uuid
          nullable: true
          description: >-
            The unique identifier of the driver assigned to visit the machine.
            This field is nullable if no driver is assigned.
        RouteId:
          type: integer
          format: int64
          nullable: true
          description: >-
            The unique identifier of the route associated with the machine
            visit. This field is nullable if the route is not specified.
        OrderKey:
          type: integer
          format: int32
          nullable: true
          description: >-
            The sequence order key indicating the position of the machine in the
            visit order. This field is nullable if the order key is not defined.
        CreatedDt:
          type: string
          format: date-time
          description: The date and time when the visit order was created.
        CreatedBy:
          type: integer
          format: int64
          description: The unique identifier of the user who created the visit order.
        UpdatedDt:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time when the visit order was last updated. This field
            is nullable if no updates have been made.
        UpdatedBy:
          type: integer
          format: int64
          nullable: true
          description: >-
            The unique identifier of the user who last updated the visit order.
            This field is nullable if no updates have been made.
      additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: Enter your Bearer token. It's required to authenticate API requests.

````