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

# Machine Attributes

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 uses the Lynx API to update an attribute of a machine. In the step-by-step guide below, you'll use the following endpoint:

<Columns cols={2}>
  <EndpointCard title="Bulk Update Machine Attributes" href="/reference/lynx/machine-attribute/bulk-update-machine-attributes" method="put" />

  <EndpointCard title="Update Specific Machine Attribute" href="/reference/lynx/machine-attribute/update-specific-machine-attribute" method="put" />
</Columns>

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

## Updating Machine's Attribute

Use the [Bulk Update Machine Attributes](/reference/lynx/machine-attribute/bulk-update-machine-attributes) endpoint to update specific machine attributes. Provide the `MachineID` as a path parameter, along with the attributes you want to change as body parameters, as exemplified below:

```sh Request theme={null}
curl -X PUT "https://qa-lynx.nayax.com/operational/v1/machines/<MACHINE_ID>/attributes" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "DeviceAttributeID": 1001,
  "MachineID": 942488501,
  "DeviceAttributeValue": "Updated Vending Machine Name",
  "DeviceAttributeCodeID": 3002,
  "DeviceAttributeName": "MachineName",
  "DeviceAttributeGroup": "General",
  "DeviceAttributeReadOnlyBit": false
}'
```

<Note>
  Replace `<MACHINE_ID>` with the actual machine's unique identifier, you want to update the attributes.
</Note>

This table outlines the key attributes available for update:

| **Name**                     | **Type**  | **Description**                                                      |
| :--------------------------- | :-------- | :------------------------------------------------------------------- |
| `DeviceAttributeID`          | `int64`   | A unique ID that identifies the specific attribute of the device.    |
| `MachineID`                  | `int64`   | The unique identifier of the machine associated with this attribute. |
| `DeviceAttributeValue`       | `string`  | The value assigned to the device attribute.                          |
| `DeviceAttributeCodeID`      | `int32`   | The code identifier that categorizes the device attribute.           |
| `DeviceAttributeName`        | `string`  | The name of the device attribute being modified.                     |
| `DeviceAttributeGroup`       | `string`  | The group or category to which the device attribute belongs.         |
| `DeviceAttributeReadOnlyBit` | `boolean` | Indicates whether the device attribute is read-only.                 |

The response will indicate whether the update was entirely successful or if there were any failures.

```json Response theme={null}
{
  "isFullySuccess": true,
  "failureItems": [
    {
      "id": "123456",
      "error": "Attribute update failed due to invalid value."
    }
  ]
}
```

Where:

* `isFullySuccess` indicates whether the update was entirely successful (`true` if successful, `false` if there were any issues).
* `failureItems` is an array of any failed items, where each entry includes:
  * `id`: The identifier of the failed item (e.g., attribute ID).
  * `error`: A description of the error encountered during the update.

<Note>
  If `isFullySuccess` is `true` and `failureItems` is empty. The update was completed successfully without any errors.
</Note>

<br />
