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

# Update several devices

> Update the inventory data of MULTIPLE devices in one call — the batch form of `updateDevice`, with the same fields and the same rules per device. Provide a list of `items`, each targeting one `deviceId` (up to 100 per call, each device at most once). Writes are independent and best-effort: the call returns 200 with a `results` manifest reporting `ok` / `error` per device — always inspect `results` rather than relying on the HTTP status to detect partial failures. Prefer this over calling `updateDevice` once per device; use `updateDevice` for a single device, when you want the updated device back or a failure to surface as an HTTP error.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json patch /devices
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /devices:
    patch:
      tags:
        - Devices
      summary: Update several devices
      description: >-
        Update the inventory data of MULTIPLE devices in one call — the batch
        form of `updateDevice`, with the same fields and the same rules per
        device. Provide a list of `items`, each targeting one `deviceId` (up to
        100 per call, each device at most once). Writes are independent and
        best-effort: the call returns 200 with a `results` manifest reporting
        `ok` / `error` per device — always inspect `results` rather than relying
        on the HTTP status to detect partial failures. Prefer this over calling
        `updateDevice` once per device; use `updateDevice` for a single device,
        when you want the updated device back or a failure to surface as an HTTP
        error.
      operationId: updateDevices
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDevicesBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDevicesResult_Output'
components:
  schemas:
    UpdateDevicesBody:
      type: object
      properties:
        items:
          description: >-
            Device updates to apply. Each item targets one `deviceId`, which
            must be unique within the batch, and carries the same fields as
            `updateDevice`. Up to 100 items per call. Writes are best-effort:
            inspect the per-item `results` to learn which succeeded — the HTTP
            status is 200 even when some items fail.
          minItems: 1
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              purchaseDate:
                description: >-
                  Date the device was purchased, as an ISO 8601 date
                  (YYYY-MM-DD) or datetime
                anyOf:
                  - anyOf:
                      - type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      - type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              decommissioningDate:
                description: >-
                  Date the device was decommissioned, as an ISO 8601 date
                  (YYYY-MM-DD) or datetime
                anyOf:
                  - anyOf:
                      - type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      - type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              purchasePriceNoVAT:
                description: Purchase price excluding VAT, in cents
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              ownerId:
                description: >-
                  ID of the employee this device is assigned to. Null unassigns
                  it. Must be an employee of your company.
                anyOf:
                  - type: string
                    pattern: ^[a-f\d]{24}$
                  - type: 'null'
              name:
                description: >-
                  Display name of the device. Cannot be emptied. Rejected when a
                  device naming MDM control drives the name. On Windows and
                  Linux, letters, digits and hyphens only, starting and ending
                  with a letter or a digit.
                type: string
                minLength: 1
              assetId:
                description: Asset tag recorded by the company. Free text, null clears it.
                anyOf:
                  - type: string
                  - type: 'null'
              condition:
                description: >-
                  Physical condition of the device. One of BROKEN, FAIR, GOOD,
                  EXCELLENT.
                anyOf:
                  - type: string
                    enum:
                      - BROKEN
                      - FAIR
                      - GOOD
                      - EXCELLENT
                  - type: 'null'
              keyboardLayout:
                description: >-
                  Keyboard layout of the device, e.g. FRENCH, US_ENGLISH — see
                  the enum for the full list.
                anyOf:
                  - type: string
                    enum:
                      - FRENCH
                      - US_ENGLISH
                      - ARABIC
                      - CHINESE_PINYIN
                      - CHINESE_ZHUYIN
                      - DANISH
                      - DUTCH
                      - GERMAN
                      - INTERNATIONAL_ENGLISH
                      - ITALIAN
                      - NORWEGIAN
                      - PORTUGUESE
                      - RUSSIAN
                      - SPANISH
                      - SPANISH_LATIN_AMERICA
                      - SWEDISH
                      - SWISS
                      - TURKISH
                      - UK_ENGLISH
                      - UKRAINIAN
                      - HEBREW
                      - MACEDONIAN
                      - JAPANESE_JIS
                  - type: 'null'
              inchScreenSize:
                description: Screen size in inches, e.g. 14 or 13.6.
                anyOf:
                  - type: number
                  - type: 'null'
              brand:
                description: Brand or manufacturer name, e.g. "APPLE", "LENOVO".
                anyOf:
                  - type: string
                  - type: 'null'
              modelName:
                description: Commercial model name, e.g. "MacBook Pro 14"".
                anyOf:
                  - type: string
                  - type: 'null'
              year:
                description: Year the device was manufactured, e.g. 2024.
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              serialNumber:
                description: >-
                  Serial number of the device. Must be unique in your company.
                  Only editable while the device is not enrolled in MDM — MDM
                  owns this value on an enrolled device.
                anyOf:
                  - type: string
                  - type: 'null'
              modelIdentifier:
                description: >-
                  Model identifier reported by the device, e.g.
                  "MacBookPro18,3". Only editable while the device is not
                  enrolled in MDM — MDM owns this value on an enrolled device.
                anyOf:
                  - type: string
                  - type: 'null'
              type:
                description: >-
                  Device type: LAPTOP, TABLET, SMARTPHONE. Only editable while
                  the device is not enrolled in MDM — MDM owns this value on an
                  enrolled device.
                anyOf:
                  - type: string
                    enum:
                      - LAPTOP
                      - TABLET
                      - SMARTPHONE
                  - type: 'null'
              processor:
                description: >-
                  Processor name, e.g. "Apple M2 Pro". Only editable while the
                  device is not enrolled in MDM — MDM owns this value on an
                  enrolled device.
                anyOf:
                  - type: string
                  - type: 'null'
              ram:
                description: >-
                  RAM in GB, e.g. 16. Only editable while the device is not
                  enrolled in MDM — MDM owns this value on an enrolled device.
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              storage:
                description: >-
                  Disk size in GB, e.g. 512. Only editable while the device is
                  not enrolled in MDM — MDM owns this value on an enrolled
                  device.
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              batteryHealth:
                description: >-
                  Battery condition: SERVICE_RECOMMENDED or NORMAL. Only
                  editable while the device is not enrolled in MDM — MDM owns
                  this value on an enrolled device.
                anyOf:
                  - type: string
                    enum:
                      - SERVICE_RECOMMENDED
                      - NORMAL
                  - type: 'null'
              deviceId:
                description: Device id to update.
                type: string
            required:
              - deviceId
      required:
        - items
    UpdateDevicesResult_Output:
      type: object
      properties:
        successCount:
          type: integer
          description: Number of devices updated successfully.
          minimum: -9007199254740991
          maximum: 9007199254740991
        failureCount:
          type: integer
          description: Number of devices that failed to update.
          minimum: -9007199254740991
          maximum: 9007199254740991
        results:
          type: array
          description: Per-item outcome, in the same order as the input `items`.
          items:
            type: object
            properties:
              deviceId:
                type: string
              status:
                type: string
                enum:
                  - ok
                  - error
              errorCode:
                description: Machine-readable error code when status is "error".
                anyOf:
                  - type: string
                  - type: 'null'
              message:
                description: Human-readable error detail when status is "error".
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - deviceId
              - status
            additionalProperties: false
      required:
        - successCount
        - failureCount
        - results
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````