---
title: "Create Visit Orders"
method: POST
path: "/v1/Scheduling/schedule/visit-order"
tags: ["Scheduling"]
---

# Create Visit Orders

`POST /v1/Scheduling/schedule/visit-order`

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

## Request body

- MachineVisitOrderCreateRequestDto[]
  - `MachineId` integer — The unique identifier of the machine for which the visit order is being created.
  - `VisitDate` string, date-time — The date and time when the machine is scheduled to be visited.
  - `DriverId` string, uuid, nullable — The unique identifier of the driver assigned to visit the machine. This field is nullable if no driver is assigned.
  - `RouteId` integer, nullable — The unique identifier of the route associated with the machine visit. This field is nullable if the route is not specified.
  - `OrderKey` integer — The sequence order key indicating the position of the machine in the visit order.

## Response `200`

The newly created visit orders.

- MachineVisitOrderCreateResponseDto[]
  - `VisitDate` string, date-time — The date and time when the machine is scheduled to be visited.
  - `MachineId` integer, nullable — The unique identifier of the machine associated with the visit order. This field is nullable if the machine ID is not available.
  - `DriverId` string, uuid, nullable — The unique identifier of the driver assigned to visit the machine. This field is nullable if no driver is assigned.
  - `RouteId` integer, nullable — The unique identifier of the route associated with the machine visit. This field is nullable if the route is not specified.
  - `OrderKey` integer, nullable — 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` string, date-time — The date and time when the visit order was created.
  - `CreatedBy` integer — The unique identifier of the user who created the visit order.
  - `UpdatedDt` string, date-time, nullable — The date and time when the visit order was last updated. This field is nullable if no updates have been made.
  - `UpdatedBy` integer, nullable — The unique identifier of the user who last updated the visit order. This field is nullable if no updates have been made.

---

[API](https://skmtc.net/nayax/apis/nayax-cortina-api.md) · [All operations](https://skmtc.net/nayax/apis/nayax-cortina-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nayax/nayax-cortina-api/revisions/421f6f83c257/schema)
