---
title: "Assign Machine to Route"
method: POST
path: "/v1/Scheduling/route-machines"
tags: ["Scheduling"]
---

# Assign Machine to Route

`POST /v1/Scheduling/route-machines`

## Request

- Base URL: `https://example.com:443`
- URL: `https://example.com:443/v1/Scheduling/route-machines`
- Auth: none required
- TypeScript: <https://skmtc.dev/nayax/apis/nayax-cortina-api/docs/v1/Scheduling/route-machines/post.ts> (a function with typed inputs; its response is checked against the schema)

Assigns a machine to a specific route. The request body should include the details of the machine to be assigned.

## Query parameters

- `RouteId` integer

## Request body

- RouteMachineCreateRequestDto
  - `MachineIds` integer[], nullable: A list of unique identifiers for the machines to be assigned to the route. Each `MachineId` corresponds to a machine that will be associated with the specified route.

## Response `200`

The details of the machine assigned to the route.

- RouteMachineResponseDto[]
  - `MachineTypeLutId` integer, nullable: The identifier for the machine type from the lookup table.
  - `MachineId` integer: The unique identifier of the machine.
  - `MachineName` string, nullable: The name of the machine.
  - `MachineNumber` string, nullable: The unique number assigned to the machine.
  - `CountryId` integer, nullable: The identifier for the country where the machine is located.
  - `City` string, nullable: The city where the machine is located.
  - `Address` string, nullable: The address where the machine is located.
  - `StreetNumber` string, nullable: The street number where the machine is located.
  - `Longitude` string, nullable: The longitude coordinate of the machine's location.
  - `Latitude` string, nullable: The latitude coordinate of the machine's location.
  - `InstituteId` integer, nullable: The unique identifier of the institute associated with the machine.
  - `InstituteName` string, nullable: The name of the institute associated with the machine.
  - `LocationId` integer, nullable: The unique identifier of the location where the machine is installed.
  - `LocationName` string, nullable: The name of the location where the machine is installed.
  - `CustomerId` integer, nullable: The unique identifier of the customer associated with the machine.
  - `CustomerName` string, nullable: The name of the customer associated with the machine.
  - `CustomerLocationId` integer, nullable: The unique identifier of the customer's location associated with the machine.
  - `CustomerLocationName` string, nullable: The name of the customer's location associated with the machine.
  - `StatusId` integer, nullable: The status identifier of the machine, indicating its current status.
  - `DriverId` string, uuid, nullable: The unique identifier of the driver assigned to the machine.
  - `RouteId` integer: The unique identifier of the route to which the machine is assigned.
  - `UserId` integer, nullable: The unique identifier of the user who last interacted with the machine.
  - `CreatedBy` integer: The unique identifier of the user who created the route-machine association.
  - `CreatedDt` string, date-time: The date and time when the route-machine association was created.

---

[API](https://skmtc.dev/nayax/apis/nayax-cortina-api.md) - [All operations](https://skmtc.dev/nayax/apis/nayax-cortina-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nayax/apis/nayax-cortina-api/revisions/421f6f83c257?raw)
