IPera Starling | Developer HubIPera Starling | Developer Hub
  • IPera Starling REST API

    • Getting Started
  • Endpoints

    • Access Codes
    • Advertisements
    • Analytics Information
    • Guests
    • Guest Activities
    • Guest Dashboard
    • Guest Devices
    • Guest Sessions
    • Location Information
    • Location Analytics
    • Tenants
    • Users

Access Codes

Create Access Codes

Generate new access code(s)

Endpoint

POST /access-codes

Rate Limit

This endpoint has a rate limit of 60 requests per minute.

Parameters

NameTypeRequiredDescription
location_idstring✔️Location / venue ID. Required
service_profile_idstring✔️Service profile ID for the access code(s). Required by validation
guest_idstringGuest ID
typeinteger✔️Type of the access code.
Values: 1: Shared, 2: Access Code
codestringStatic shared code to be used.
Required when type is Shared.
quantityintegerNumber of access codes to be generated. Valid only when type is Access Code (2). Must be between 1 and 1000. Default: 1
start_datedateStart date of the code.
Format: YYYY-MM-DD
expiry_datedateExpiry date of the code.
Format: YYYY-MM-DD
descriptionstring

Response

Tips

HTTP/1.1 201 Created

{
  "status": true,
  "message": "Created 1 code",
  "count": 1,
  "access_codes": [
    {
      "id": "ApR3zO7zqeZ",
      "location_id": "rdb6XWwXQ2j",
      "location_name": "Default Location",
      "code": "u2",
      "type": 2,
      "type_name": "Access Code",
      "description": null,
      "service_profile_id": "KPGD8j3xW25",
      "service_profile_name": "Default Service Profile - 60 Minute(s)",
      "start_date": null,
      "expiry_date": null,
      "status": 1,
      "status_name": "Available",
      "use_count": 0,
      "used_at": null,
      "guest_id": null,
      "guest_name": "",
      "created_at": "2017-01-04T09:55:31.000000Z"
    }
  ]
}

Note: When multiple access codes are created, all of them are returned in the access_codes array.

Unprocessable Entity

HTTP/1.1 422 Unprocessable Entity

{
    "message": "The given data was invalid.",
    "errors": {
        "location_id": [
            "The location field is required."
        ]
    }
}

Caution

HTTP/1.1 500 Internal Server Error

{
  "status": false,
  "message": "Could not create any access codes",
  "count": 0,
  "access_codes": []
}
Last Updated: 8/11/26, 8:49 PM
Next
Advertisements