# List employees

Requires scope `labor:read`. Includes the employee-job linkage. Per-job pay additionally requires `labor:costs:read`. Access PINs, biometrics, personal contact details and date of birth are never returned.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "NX Public API",
    "version": "1.0.0",
    "description": "Public marketplace API. Authenticate via POST /oauth/token (client-credentials + venueId) to obtain a short-lived bearer token, then call resource endpoints. Tokens are venue-pinned: each is scoped to a single venue and the scopes granted to that integration."
  },
  "servers": [
    {
      "url": "https://prod.api.nxapp.net/public/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Bearer token from /oauth/token."
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor; present when more results exist."
          }
        },
        "required": [
          "requestId"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code (e.g. RESOURCE_NOT_FOUND)."
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "EmployeeJobLink": {
        "type": "object",
        "description": "basePayRateTotal is present only with scope `labor:costs:read`.",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "isSalaried": {
            "type": "boolean"
          },
          "basePayRateTotal": {
            "type": "number"
          }
        },
        "required": [
          "jobId"
        ]
      },
      "Employee": {
        "type": "object",
        "description": "Access PINs/cards, biometric registrations, date of birth, personal contact details, emergency contacts and annual salary are never exposed at any scope. isSalaried and per-job pay require `labor:costs:read`.",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "payrollId": {
            "type": "string"
          },
          "humanResourcesId": {
            "type": "string"
          },
          "firstWorkDateAt": {
            "type": "string"
          },
          "isSalaried": {
            "type": "boolean"
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmployeeJobLink"
            }
          }
        },
        "required": [
          "id"
        ]
      }
    }
  },
  "paths": {
    "/employees": {
      "get": {
        "summary": "List employees",
        "description": "Requires scope `labor:read`. Includes the employee-job linkage. Per-job pay additionally requires `labor:costs:read`. Access PINs, biometrics, personal contact details and date of birth are never returned.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500
            },
            "description": "Page size (default 100, max 500)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor from a prior response's meta.cursor."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Employee"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 150,
      "2": 23,
      "3": 41,
      "4": 164,
      "5": 38,
      "6": 175,
      "7": 92,
      "8": 201,
      "9": 202,
      "10": 43,
      "11": 17
    }
  }
}
```