> ## 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.

# Get a Machine's ID by the Device's ID

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-bold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 bg-white dark:bg-[#1e1e1e] hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>

      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

This page presents how to retrieve a Machine's ID using its Device ID with Lynx API and also with Nayax core. The guide will use the following endpoint:

<EndpointCard title="Get All Machines" href="/reference/lynx/machines/get-all-machine-basic-info" method="get" />

<Warning>
  **Authentication**

  Refer to the [Security & Token](/docs/manage-data-operations/lynx-api/security) page of this documentation to learn how to access your tokens, and how to properly use it to authenticate your API requests.
</Warning>

## Retrieving the Machine's ID

To retrieve a machine's ID using its serial number, you need to use the [Get All Machines](/reference/lynx/machines/get-all-machine-basic-info) endpoint. By providing the device's serial number in the request you can retrieve the corresponding machine's unique identifier.

The code block below exemplifies the request, using the `DeviceSerial` as a query parameter to filter the result:

```sh theme={null}
curl -X GET "https://qa-lynx.nayax.com/operational/v1/machines?DeviceSerial=<DEVICE_SERIAL_NUMBER>" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
```

<Note>
  Remember to replace `<DEVICE_SERIAL_NUMBER>` with the actual device's serial number.
</Note>

The response will include details about the machine, including the Machine's ID.

```json theme={null}
[
  {
    "MachineID": 942488501,
    "ActorID": 2001492652,
    "CountryID": 1,
    "CurrencyID": 2,
    "InstituteID": 3001,
    "LocationID": 4001,
    "MachineGroupID": 210631347,
    "MachineModelID": 305,
    "MachineName": "Marshall Vending",
    "MachineNumber": "MV001",
    "MachineStatusBit": 1,
    "LanguageID": 7,
    "OperatorActorID": 2001492652,
    "DistributorActorID": 3001492652,
    "AreaActorID": 4001492652,
    "SalesSourceID": 30000512,
    "MachineTypeID": 555001,
    "SerialNumber": "SN12345X",
    "VPOSSerialNumber": "VP12345",
    "DeviceSerialNumber": "SN12345X",
    "VPOSID": 98765,
    "DeviceID": 123456,
    "UseLocationFrom": 1,
    "GeoCountry": 1,
    "GeoState": "New York",
    "GeoCity": "New York City",
    "GeoAddress": "123 Main St",
    "GeoStreetNumber": "123",
    "GeoLongitude": -73.935242,
    "GeoLatitude": 40.730610,
    "GeoZoom": 15,
    "GeoZipCode": "10001",
    "SearchAddress": "123 Main St, New York, NY",
    "Remarks": "High-traffic area",
    "DexType": 2,
    "DexMidnightReadsEnableBit": true,
    "DexG85CheckEnableBit": true,
    "DexDivideBillsBy": 100,
    "DexG85CheckParsingFilterEnableBit": true,
    "UseCardPriceCorrectCashPriceBit": false,
    "MachineTimeZoneOffset": -5,
    "DexReadInterval": 30,
    "LocationType": 1,
    "ApplyDisplayPickListSelectionsToReportsBit": true,
    "DisplayPickListSelectionsAs": 1,
    "LastUpdated": "2024-10-09T14:38:53.474Z",
    "MachineProfile": 0,
    "CityID": 101,
    "RegionID": 201,
    "CountryDialingCode": 1,
    "DexIgnoreCRCCheckBit": true,
    "DexParseLABit": false,
    "ProductMapID": 501,
    "Longitude": -73.935242,
    "Latitude": 40.730610,
    "DexTotalSalesMinusCardSalesBit": true,
    "RouteActorID": 5001492652,
    "MachineLogicAlertEnableBit": true,
    "AlertRuleSetId": 601,
    "MachineMemberTypePricingEnableBit": false,
    "DexMultiplyCoinsBy": 10,
    "DexMultiplyTubesBy": 5,
    "CustomerID": 12345,
    "CommissionType": 2,
    "CommissionDefaultValue": 0.05,
    "CreatedBy": 105,
    "CreatedOn": "2023-06-01T12:00:00.000Z",
    "UpdateBy": 107,
    "TubeSource": 2,
    "BillSource": 3,
    "SmartStickerId": 8080,
    "EnableRemoveVendBit": true,
    "EnableEreceiptBit": true,
    "ProductMapAutomaticCreationBit": true,
    "Refs": {
      "Documentation": "https://lynx.docs.com/machine/942488501"
    }
  }
]

```

<br />

## Nayax Core

You can also find the Machine ID in Nayax Core in the machine's details, to do so follow the steps below:

1. Access **Operations > Machines**.
2. Use the **Search** feature to find the machine.
3. Select the machine from the list.
4. Access the **General Information** tab to find the **Machine ID** under the **Hardware** section.

<Frame>
  <img src="https://mintcdn.com/nayax-44d6e37b-docs-marshall-faq-redistribution/Hbgg7w3lQTggebWl/images/docs/getting-a-machines-id-by-the-devices-serial-number/image1.png?fit=max&auto=format&n=Hbgg7w3lQTggebWl&q=85&s=11831ff52f25cc8694f0811c85897c99" width="1440" height="824" data-path="images/docs/getting-a-machines-id-by-the-devices-serial-number/image1.png" />
</Frame>

<br />
