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

# Export the device and employee inventory as CSV

> Export the inventory of your company as a paginated CSV of devices and the employees holding them, up to 1000 rows per page. It carries no device code (recovery key, unlock PIN, bypass code, password) and no personal email, phone or address, so the file can be sent outside IT. To export every device attribute, its custom fields and its latest codes, use `exportDevices` instead. One row per device in use or in stock (retired devices are left out) with the employee it is assigned to, plus one row per active employee holding no device. Columns, always in this order: Employee first name, Employee last name, Employee email, Employee status, Device name, Device type, Model, Serial number, Device status (in use, in stock), Enrollment status (enrolled, unenrolled, never enrolled), Last check-in, Purchase date. Employee status is left when the end date has passed or the offboarding is finished, not started when the start date is ahead, leaving when an end date is set or an offboarding is in progress, active otherwise. A missing value is an empty cell. Rows are sorted by employee last name then first name, devices assigned to nobody last. `totals.deviceRows` is the number of devices in use or in stock. Iterate `page` until `totalPages` and concatenate the CSV pages, dropping the header line of every page after the first. The REST route responds with `text/csv` (pagination in the `X-Page`, `X-Per-Page`, `X-Total-Pages` and `X-Total-Elements` headers); the MCP tool returns the CSV in the `csv` field.

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /devices/inventory/export
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/inventory/export:
    get:
      tags:
        - Devices
      summary: Export the device and employee inventory as CSV
      description: >-
        Export the inventory of your company as a paginated CSV of devices and
        the employees holding them, up to 1000 rows per page. It carries no
        device code (recovery key, unlock PIN, bypass code, password) and no
        personal email, phone or address, so the file can be sent outside IT. To
        export every device attribute, its custom fields and its latest codes,
        use `exportDevices` instead. One row per device in use or in stock
        (retired devices are left out) with the employee it is assigned to, plus
        one row per active employee holding no device. Columns, always in this
        order: Employee first name, Employee last name, Employee email, Employee
        status, Device name, Device type, Model, Serial number, Device status
        (in use, in stock), Enrollment status (enrolled, unenrolled, never
        enrolled), Last check-in, Purchase date. Employee status is left when
        the end date has passed or the offboarding is finished, not started when
        the start date is ahead, leaving when an end date is set or an
        offboarding is in progress, active otherwise. A missing value is an
        empty cell. Rows are sorted by employee last name then first name,
        devices assigned to nobody last. `totals.deviceRows` is the number of
        devices in use or in stock. Iterate `page` until `totalPages` and
        concatenate the CSV pages, dropping the header line of every page after
        the first. The REST route responds with `text/csv` (pagination in the
        `X-Page`, `X-Per-Page`, `X-Total-Pages` and `X-Total-Elements` headers);
        the MCP tool returns the CSV in the `csv` field.
      operationId: exportInventory
      parameters:
        - name: page
          required: false
          in: query
          description: Page of rows to export (1-indexed)
          schema:
            minimum: 1
            maximum: 9007199254740991
            default: 1
            type: number
        - name: perPage
          required: false
          in: query
          description: Number of rows per CSV page (default 500, max 1000)
          schema:
            minimum: 1
            maximum: 1000
            default: 500
            type: number
      responses:
        '200':
          description: >-
            CSV page of the inventory. Pagination is returned in the X-Page,
            X-Per-Page, X-Total-Pages and X-Total-Elements response headers.
          content:
            text/csv:
              schema:
                type: string
components:
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.