> ## Documentation Index
> Fetch the complete documentation index at: https://support.i.moneyforward.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update device of an organization



## OpenAPI

````yaml https://api.itmc.i.moneyforward.com/public-api/docs/v1-json patch /api/v1/organizations/{organizationId}/devices/{deviceId}
openapi: 3.0.0
info:
  title: Admina Public API
  description: >-
    Admina API is a RESTfull API providing programmatic access to much of the
    data in the system. It provides predictable URLs for accessing resources,
    and uses built-in HTTP features to receive commands and return responses.
    This makes it easy to communicate with from a wide variety of environments,
    from command-line utilities to gadgets to the browser URL bar itself.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.itmc.i.moneyforward.com
security: []
tags:
  - name: Organizations
    description: ''
  - name: Users
    description: ''
  - name: Directory
    description: ''
  - name: Departments
    description: ''
  - name: Locations
    description: ''
  - name: Companies
    description: ''
  - name: People
    description: ''
  - name: Workspaces
    description: ''
  - name: Custom Service and Workspace
    description: ''
  - name: Workspace Accounts
    description: ''
  - name: Accounts
    description: ''
  - name: Contracts
    description: ''
  - name: Devices
    description: ''
  - name: Devices (alpha)
    description: ''
  - name: Alerts
    description: ''
  - name: Spends
    description: ''
  - name: Usage Optimization
    description: ''
  - name: Services
    description: ''
  - name: Requests
    description: ''
  - name: AuditLogs
    description: ''
  - name: EventLogs
    description: ''
paths:
  /api/v1/organizations/{organizationId}/devices/{deviceId}:
    patch:
      tags:
        - Devices
      summary: Update device of an organization
      operationId: updateDevice
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            type: number
        - name: deviceId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicUpdateDeviceRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicGetDeviceResponseDto'
      security:
        - API-Key: []
components:
  schemas:
    PublicUpdateDeviceRequestDto:
      type: object
      properties:
        memo:
          type: string
          example: foo bar
        fields:
          type: object
          properties:
            preset.asset_number:
              type: string
              example: (REQUIRED) - example value
            preset.subtype:
              type: string
              enum:
                - desktop_pc
                - laptop_pc
                - tablet_pc
                - phone
                - monitor
                - server
                - peripheral_device
                - other
              example: (REQUIRED) - desktop_pc
            preset.model_name:
              type: string
              example: (REQUIRED) - example value
            preset.serial_number:
              type: string
              example: example value
            preset.model_number:
              type: string
              example: example value
            preset.memory:
              type: string
              example: example value
            preset.hdd_ssd:
              type: string
              example: example value
            preset.cpu:
              type: string
              example: example value
            preset.os:
              type: string
              example: example value
            preset.size:
              type: string
              example: example value
            preset.manufacturer:
              type: string
              example: example value
            preset.supplier:
              type: string
              example: example value
            preset.procurement_method:
              type: string
              enum:
                - purchase
                - lease
                - rental
                - other
              example: purchase
            preset.purchase_date:
              type: string
              example: '2012-05-18'
              format: date
            preset.purchase_cost:
              type: number
              example: '1234'
            preset.warranty_period:
              type: string
              example: example value
            preset.decommission_date:
              type: string
              example: '2012-05-18'
              format: date
            preset.scheduled_return_date:
              type: string
              example: '2012-05-18'
              format: date
            preset.fixed_asset:
              type: string
              enum:
                - 'yes'
                - 'no'
              example: 'yes'
            preset.phone_number:
              type: string
              example: example value
            preset.sim_number:
              type: string
              example: example value
            preset.mobile_plan:
              type: string
              example: example value
            preset.hostname:
              type: string
              example: example value
            preset.version:
              type: string
              example: example value
            preset.keyboard_layout:
              type: string
              enum:
                - us
                - uk
                - jis
                - other
              example: us
            preset.usage_start_date:
              type: string
              example: '2012-05-18'
              format: date
            preset.usage_end_date:
              type: string
              example: '2012-05-18'
              format: date
            preset.status:
              type: string
              enum:
                - in_stock
                - pre_use
                - active
                - missing
                - malfunction
                - decommissioned
                - on_order
              example: in_stock
              description: >-
                Initial device status. If not provided, defaults to 'in_stock'.
                Valid values: in_stock, pre_use, active, missing, malfunction,
                decommissioned, on_order.
            custom.custom_text_field:
              type: string
              example: foo
              description: >-
                This is an example of text field. Please refer to `GET
                /api/v1alpha/organizations/{organizationId}/devices/fields/all`
                to get the list of all available custom fields..
            custom.custom_date_field:
              type: string
              format: date
              example: '2024-01-01'
              description: >-
                This is an example of date field. Please refer to `GET
                /api/v1alpha/organizations/{organizationId}/devices/fields/all`
                to get the list of all available custom fields..
            custom.custom_number_field:
              type: number
              example: 123
              description: >-
                This is an example of number field. Please refer to `GET
                /api/v1alpha/organizations/{organizationId}/devices/fields/all`
                to get the list of all available custom fields..
            custom.custom_dropdown_field:
              type: string
              enum:
                - Option Displayed Value A
                - Option Displayed Value B
                - Option Displayed Value C
              example: Option Displayed Value A
              description: >-
                This is an example of dropdown field. Please refer to `GET
                /api/v1alpha/organizations/{organizationId}/devices/fields/all`
                to get the list of all available custom fields..
      required:
        - fields
    PublicGetDeviceResponseDto:
      type: object
      properties:
        id:
          type: number
          example: 123
          description: Unique identifier for the device
        memo:
          type: string
          example: foo bar
          description: Additional notes or memo about the device
        type:
          type: string
          enum:
            - pc
            - phone
            - other
          example: pc
          description: Type of the device (e.g., PC, Phone, Tablet)
        people:
          nullable: true
          description: Person assigned to this device, or null if unassigned
          type: object
          allOf:
            - $ref: '#/components/schemas/PublicPeopleResponseDtoWithoutAccounts'
        identity:
          nullable: true
          description: Identity information of the assigned person, or null if unassigned
          type: object
          allOf:
            - $ref: '#/components/schemas/PublicSimpleIdentityDto'
        preset:
          type: object
          example:
            subtype: other
            price: 123.321
          additionalProperties:
            oneOf:
              - type: string
              - type: number
          description: >-
            Preset fields for the device. This is a hashmap where the key maps
            to the field `uniqueName` in device fields.
        custom:
          type: object
          example:
            custom_text_field: foo
            custom_date_field: '2024-01-01'
            custom_number_field: 123
            custom_dropdown_field: Option Displayed Value A
          additionalProperties:
            oneOf:
              - type: string
              - type: number
          description: >-
            Custom fields for the device. This is a hashmap where the key maps
            to the field `uniqueName` in device fields.
        createdAt:
          format: date-time
          type: string
          example: '2024-03-20T00:00:00Z'
          description: Timestamp when the device was created
        updatedAt:
          format: date-time
          type: string
          example: '2024-03-20T00:00:00Z'
          description: Timestamp when the device was last updated
        customFieldsWithMetadata:
          readOnly: true
          example:
            - id: 1
              attributeCode: custom_text_field
              attributeName: Text field
              value: foo
            - id: 2
              attributeCode: custom_date_field
              attributeName: Date field
              value: '2024-01-01'
            - id: 3
              attributeCode: custom_number_field
              attributeName: Number field
              value: 123
            - id: 4
              attributeCode: custom_dropdown_field
              attributeName: Dropdown field
              value: Option Displayed Value A
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldWithMetadataDto'
      required:
        - id
        - memo
        - type
        - people
        - identity
        - preset
        - custom
        - createdAt
        - updatedAt
        - customFieldsWithMetadata
    PublicPeopleResponseDtoWithoutAccounts:
      type: object
      properties:
        id:
          type: number
          readOnly: true
          example: 1
        primaryEmail:
          type: string
          nullable: true
          readOnly: true
          example: foo@gmail.com
        displayName:
          type: string
          nullable: true
          readOnly: true
          example: Yamaha Honda
        avatar:
          type: string
          nullable: true
          readOnly: true
          example: avatar_url
        username:
          type: string
          nullable: true
          readOnly: true
          example: foo
        type:
          type: string
          readOnly: true
          example: employee
        status:
          type: string
          readOnly: true
          example: suspended
        suspendedAt:
          type: string
          nullable: true
          readOnly: true
          example: '2021-07-13T19:15:40.000Z'
        createdAt:
          type: string
          nullable: true
          readOnly: true
          example: '2021-07-13T19:15:40.000Z'
      required:
        - id
        - primaryEmail
        - displayName
        - avatar
        - username
        - type
        - status
        - suspendedAt
        - createdAt
    PublicSimpleIdentityDto:
      type: object
      properties:
        id:
          type: string
          description: ID of the employee
        organizationId:
          type: number
          description: ID of the organization
        peopleId:
          type: string
          description: ID of the people
        employeeStatus:
          example: active
          description: Extended status of the employee
          allOf:
            - $ref: '#/components/schemas/ExtendedEmployeeStatus'
        employeeType:
          example: full_time_employee
          description: Type of the employee
          allOf:
            - $ref: '#/components/schemas/EmployeeType'
        managementType:
          example: managed
          description: Management type of the employee
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ManagementType'
        displayName:
          type: string
          example: Display Name
          description: Display name of the employee
          nullable: true
        firstName:
          type: string
          example: First Name
          description: First name of the employee
          nullable: true
        lastName:
          type: string
          example: Last Name
          description: Last name of the employee
          nullable: true
        avatar:
          type: string
          description: URL of the avatar of the employee
          nullable: true
        primaryEmail:
          type: string
          example: primay@email.com
          description: Primary email of the employee
          nullable: true
        secondaryEmails:
          example:
            - secondary+1@email.com
            - secondary+2@email.com
          description: Secondary emails of the employee
          nullable: true
          type: array
          items:
            type: string
        companyName:
          type: string
          example: company name
          description: Company name of the employee
          nullable: true
        workLocation:
          type: string
          example: work location
          description: Work location of the employee
          nullable: true
        department:
          description: Department of the employee
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/DepartmentDtoElement'
        serviceCount:
          type: number
          description: Number of services the employee has
          nullable: true
        deviceCount:
          type: number
          description: Number of devices the employee has
          nullable: true
        costs:
          description: Costs of the employee
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/IdentityCost'
        createdAt:
          format: date-time
          type: string
          description: Record created at
          nullable: true
        updatedAt:
          format: date-time
          type: string
          description: Record updated at
          nullable: true
        isManager:
          type: boolean
          description: Is the employee a manager
          nullable: true
        isMock:
          type: boolean
          description: Indicates if the identity is a mock
        isEmailEditable:
          type: boolean
          description: Indicates if the email of the identity is editable
          nullable: true
        hasPresetFieldsUnlinked:
          type: boolean
          description: Indicates if the unlink preset fields is enabled
          nullable: true
      required:
        - employeeStatus
        - employeeType
        - firstName
        - lastName
    CustomFieldWithMetadataDto:
      type: object
      properties:
        id:
          type: number
          description: The ID of the custom field template
          example: 1
        attributeCode:
          type: string
          description: The unique identifier for the custom field
          example: custom_uuid
        attributeName:
          type: string
          description: The display label for the custom field
          example: custom_text_field
        value:
          type: object
          description: >-
            The value of the custom field (string, number, or date string
            depending on the field type)
          example: foo
      required:
        - id
        - attributeCode
        - attributeName
        - value
    ExtendedEmployeeStatus:
      type: string
      enum:
        - active
        - on_leave
        - draft
        - preactive
        - retired
        - untracked
        - archived
      description: Extended status of the employee
    EmployeeType:
      type: string
      enum:
        - board_member
        - full_time_employee
        - fixed_time_employee
        - temporary_employee
        - part_time_employee
        - secondment_employee
        - contract_employee
        - collaborator
        - group_address
        - shared_address
        - test_address
        - other
        - unknown
        - unregistered
    ManagementType:
      type: string
      enum:
        - managed
        - external
        - system
        - unknown
        - unregistered
    DepartmentDtoElement:
      type: object
      properties:
        name:
          type: string
          example: department name
          description: Department name of the employee
          nullable: true
    IdentityCost:
      type: object
      properties:
        amount:
          type: number
          example: 100
          description: Cost amount of the employee
        currency:
          example: usd
          description: Currency of the cost
          allOf:
            - $ref: '#/components/schemas/CurrencyTypeIggre'
      required:
        - amount
        - currency
    CurrencyTypeIggre:
      type: string
      enum:
        - jpy
        - usd
        - idr
      description: Currency of the cost
  securitySchemes:
    API-Key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        For authenticated requests, set the `Authorization: Bearer your_api_key`
        parameter in the header. <br/>You can create and manage your API Keys by
        visiting the **API Keys** tab in the **Settings** page of your
        organization in <a target='_blank'
        href='https://itmc.i.moneyforward.com/'>Admina</a>

````