> ## 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 a customer's access to a location using an eligible pass. The system first selects an eligible customer or shared pass; when none is available, it creates a customer pay-as-you-go pass only when the location enables pay-as-you-go and has a valid pass for that customer type. A pay-as-you-go check-in starts with no charge and, at checkout, is charged by duration or fixed pass price subject to the location's daily minimum and maximum settings. Check-ins can be opened or closed manually or through access, network, sensor, tile, or booking integrations.

## 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 |
  | - | - |
  | 1 | Manual |
  | 2 | DoorAccess |
  | 3 | NetworkActivity |
  | 4 | Tile |
  | 5 | Sensor |
</Accordion>

## Request Body

### Required Fields

<ParamField body="BusinessId" type="integer" required>
  ID of the location where the customer checked in. The Admin Agent supplies the current location for create and update operations..
</ParamField>

<ParamField body="FromTime" type="string" required>
  Check-in start date and time, stored in UTC and rounded to the nearest 15 minutes. It must be earlier than ToTime when a checkout time is provided..
</ParamField>

### Optional Fields

<ParamField body="CoworkerId" type="integer">
  ID of the customer checking in. The customer must be active; the system first uses an eligible customer or shared pass, then can fall back to an eligible pay-as-you-go pass when the location allows it..
</ParamField>

<ParamField body="ToTime" type="string">
  Optional checkout date and time, stored in UTC and rounded to the nearest 15 minutes. Leave empty to keep the check-in open; when set, it must be later than FromTime..
</ParamField>

<ParamField body="CountsTowardsPlanLimits" type="boolean">
  System-calculated flag copied from the pass used for this check-in; it determines whether the duration counts against the customer's plan limits..
</ParamField>

<ParamField body="CoworkerTimePassGuid" type="string">
  Internal GUID of the customer pass selected or created by check-in validation; choose an eligible pass through the check-in workflow instead..
</ParamField>

<ParamField body="AutoCheckout" type="boolean">
  Internal flag set by automated check-in sources to request later checkout validation; it is not a manual check-in setting..
</ParamField>

<ParamField body="LastActivity" type="string">
  Internal UTC timestamp of the most recent activity reported by a network or access-control integration for this open check-in..
</ParamField>

<ParamField body="MacAddresses" type="string">
  Internal comma-separated device MAC addresses captured by a network-activity check-in; this network identifier is managed by integrations..
</ParamField>

<ParamField body="TeamsAtTheTimeOfCheckin" type="string">
  System-generated comma-separated snapshot of the customer's team names when the check-in was created..
</ParamField>

<ParamField body="TariffAtTheTimeOfCheckin" type="string">
  System-generated comma-separated snapshot of the customer's active plan names when the check-in was created..
</ParamField>

<ParamField body="ValidateCheckinJobId" type="string">
  Internal scheduler job ID used to prevent duplicate automatic checkout validation for an open check-in..
</ParamField>

<ParamField body="FromTimeLocal" type="string">
  Internal location-local representation of FromTime generated for reporting; set FromTime instead..
</ParamField>

<ParamField body="ToTimeLocal" type="string">
  Internal location-local representation of ToTime generated for reporting; set ToTime instead..
</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
}
```


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