Create POS Staff

POST /staff/v1/businessLocations/{businessLocationId}/userTypes/POS

Path parameters

application/json

Body Required

  • username string Required

    Only used for POS staff

    Maximum length is 128.

  • pinCode string | null

    4-digit pin code for the user.

    Maximum length is 4.

  • The first name of the user.

    Maximum length is 128.

  • lastName string

    The last name of the user.

    Maximum length is 128.

  • active boolean

    Indicates if the user is active.

    Default value is true.

  • group integer(int64)

    The unique identifier for the user group.

  • User report permissions.

    Default value is STAFF_REPORT_OWN_ACCESS.

  • roles array[string]

    List of roles assigned to the staff. Normally, these are the roles that the staff has in a default POS user. - ROLE_PRINT_DUPLICATE - ROLE_EMAIL_RECEIPT - ROLE_TIME_CLOCK - ROLE_TRANSFER_ITEMS - ROLE_MANAGE_PRINTERS - ROLE_SALES_RESTRICT - ROLE_SPLIT_ACCOUNT - ROLE_MANAGE_CONSUMER_DETAILS - ROLE_PAYMENT_TERMINAL_SETTINGS - ROLE_CAN_CHANGE_TAG - ROLE_ADD_GRATUITY - ROLE_RECONFIG

    Default value is [] (empty).

Responses

  • 201 application/json

    Staff created successfully

    Hide response attributes Show response attributes object
    • staffId integer(int64)

      The unique identifier for the user.

    • username string

      Only used for POS staff

      Maximum length is 128.

    • userTypes array[string]

      The user type.

      Values are POS, BACK_OFFICE, or API.

    • The first name of the user.

      Maximum length is 128.

    • lastName string

      The last name of the user.

      Maximum length is 128.

    • email string(email)

      Only used for Back Office staff

      Maximum length is 128.

    • active boolean

      Indicates if the user is active.

      Default value is true.

    • createdOn string(date-time)

      The timestamp of the creation of the user.

    • modifiedOn string(date-time)

      The timestamp of the last update to the user.

    • businessId integer(int64)

      The unique identifier for the business.

    • businessLocationId integer(int64)

      The unique identifier for the business location.

    • groups array[object]
      Hide groups attributes Show groups attributes object
      • id integer(int64)

        The unique identifier for the user group.

      • name string

        The name of the user group.

    • reportAccess array[string]

      User report permissions.

      Default value is STAFF_REPORT_OWN_ACCESS.

    • roles array[object]

      The roles assigned to the user.

      Hide roles attributes Show roles attributes object
      • id integer(int64)

        The unique identifier for the role.

      • name string

        The name of the role.

  • Bad request. Invalid input parameters.

  • Authentication failed.

  • Access Denied.

  • Internal Server Error.

POST /staff/v1/businessLocations/{businessLocationId}/userTypes/POS
curl \
 -X POST https://api.trial.lsk.lightspeed.app/staff/v1/businessLocations/{businessLocationId}/userTypes/POS \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"username":"John Doe","pinCode":"string","firstName":"John","lastName":"Doe","active":true,"group":42,"reportAccess":"STAFF_REPORT_OWN_ACCESS","roles":[]}'
Request examples
{
  "username": "John Doe",
  "pinCode": "string",
  "firstName": "John",
  "lastName": "Doe",
  "active": true,
  "group": 42,
  "reportAccess": "STAFF_REPORT_OWN_ACCESS",
  "roles": []
}
Response examples (201)
{
  "staffId": 1234,
  "username": "John Doe",
  "userTypes": [
    "POS"
  ],
  "firstName": "John",
  "lastName": "Doe",
  "email": "hello@example.com",
  "active": true,
  "createdOn": "2024-05-04T09:42:00+00:00",
  "modifiedOn": "2024-05-04T09:42:00+00:00",
  "businessId": 12345,
  "businessLocationId": 1234567890,
  "groups": [
    {
      "id": 1234,
      "name": "Bar Staff"
    }
  ],
  "reportAccess": [
    "STAFF_REPORT_OWN_ACCESS"
  ],
  "roles": [
    {
      "id": 1234,
      "name": "ROLE_CAN_LOGIN"
    }
  ]
}