Locations

Locations, Devices, and User Management

Audience: Programmer

Overview

pyck provides a comprehensive location and device management system within the Management Service. This system enables physical warehouse layout mapping, device tracking, user check-in/check-out functionality, and inventory repository association with specific locations.

Core Entities

Location

Represents a physical area within the warehouse (e.g., workstation, zone, dock).

Field
Type
Description

id

UUID

Unique identifier

name

String

Location name (unique per tenant)

tenantID

UUID

Owning tenant

dataTypeID

UUID

Optional custom data type

data

Map

Custom fields defined by data type

Device

Represents a physical device (scanner, tablet, workstation terminal).

Field
Type
Description

id

UUID

Unique identifier

name

String

Device name (unique per tenant)

tenantID

UUID

Owning tenant

dataTypeID

UUID

Optional custom data type

data

Map

Custom fields defined by data type

DeviceLocation

Associates a device with a location. A device can only be assigned to one location at a time.

Field
Type
Description

id

UUID

Unique identifier

deviceID

UUID

Associated device

locationID

UUID

Associated location

DeviceUser

Tracks which user is currently checked-in to a device. Only one user can be checked-in to a device at a time.

Field
Type
Description

id

UUID

Unique identifier

deviceID

UUID

Associated device

userID

UUID

Checked-in user

Entity Relationships

Key relationships:

  • Location → DeviceLocation: One-to-many (a location can have multiple devices)

  • Device → DeviceLocation: One-to-one (a device is at one location)

  • Device → DeviceUser: One-to-one (only one user per device)

  • User → DeviceUser: One-to-many (a user can have check-in history)

  • Location → Repository: One-to-many (repositories can reference a location)

GraphQL Operations

Creating a Location

Variables:

Creating a Device

Variables:

Assigning a Device to a Location

Variables:

To remove a device from its location:

User Check-In

When a user starts working at a device:

Variables:

The userID is automatically derived from the authenticated user's token.

User Check-Out

When a user finishes working at a device:

Variables:

Assigning a Location to a Repository

When creating or updating an inventory repository, you can associate it with a management location:

Variables:

Last updated

Was this helpful?