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

# Create Checkin

> Create a new Checkin record.

A **Checkin** records when a customer accessed a location. To check in, a customer must hold a valid pass (`TimePass` entity) that covers the location and the time of the check-in.

If the customer does not have a valid pass but the location or network has one or more **Pay As You Go** passes configured, a pass is automatically assigned and charged to the customer at check-in time.

Check-ins can be created manually, or opened and closed automatically by **NexIO** (the front-desk Nexudus tablet app), door-access systems, or IT-network integrations. The `Source` field indicates how the check-in was created.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`Checkin-Create`** role.
</Note>

## Enums

<Accordion title="eCheckinSource — Source values">
  | Value | Name            |
  | ----- | --------------- |
  | 0     | None            |
  | 1     | Manual          |
  | 2     | DoorAccess      |
  | 3     | NetworkActivity |
  | 4     | Tile            |
  | 5     | Sensor          |
</Accordion>

## Request Body

### Required Fields

<ParamField body="BusinessId" type="integer" required>
  Business Id.
</ParamField>

<ParamField body="FromTime" type="string" required>
  Date and time the customer checked in.
</ParamField>

### Optional Fields

<ParamField body="CoworkerId" type="integer">
  Coworker Id.
</ParamField>

<ParamField body="ToTime" type="string">
  Date and time the customer checked out. Null while the check-in is still open.
</ParamField>

<ParamField body="CountsTowardsPlanLimits" type="boolean">
  Counts Towards Plan Limits.
</ParamField>

<ParamField body="CoworkerTimePassGuid" type="string">
  Coworker Time Pass Guid.
</ParamField>

<ParamField body="AutoCheckout" type="boolean">
  Auto Checkout.
</ParamField>

<ParamField body="LastActivity" type="string">
  Last Activity.
</ParamField>

<ParamField body="MacAddresses" type="string">
  MAC addresses of devices detected during a network-activity check-in.
</ParamField>

<ParamField body="TeamsAtTheTimeOfCheckin" type="string">
  Teams the customer belonged to when the check-in was recorded.
</ParamField>

<ParamField body="TariffAtTheTimeOfCheckin" type="string">
  Product (tariff) assigned to the customer when the check-in was recorded.
</ParamField>

<ParamField body="ValidateCheckinJobId" type="string">
  Validate Checkin Job Id.
</ParamField>

<ParamField body="FromTimeLocal" type="string">
  From Time Local.
</ParamField>

<ParamField body="ToTimeLocal" type="string">
  To Time Local.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    "https://spaces.nexudus.com/api/spaces/checkins" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "BusinessId": 0,
      "FromTime": "2025-01-15T10:30:00Z"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/spaces/checkins',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        BusinessId: 0,
        FromTime: '2025-01-15T10:30:00Z'
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://spaces.nexudus.com/api/spaces/checkins',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'BusinessId': 0,
          'FromTime': '2025-01-15T10:30:00Z'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the creation.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the newly created record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the checkin was created successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "Checkin was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "Source: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Source"
    }
  ],
  "WasSuccessful": false
}
```
