Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Loyverse

Scalekit connector
Open markdown

The Loyverse connector lets your AI agent act in each user's Loyverse account. Each user connects their own Loyverse access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 56 tools.

Tools
56
What they doRead · write · destructive
32 · 13 · 1132 read13 write11 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Loyverse connection

    In AgentKit > Connections, create a Loyverse connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'loyverse'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Loyverse:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'loyverse_categories_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Loyverse credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • loyverse_categories_listList item categories.Read-only

    List Categories

    List item categories. Returns per category its id, name and color. Results are paged: pass the returned cursor to get the next page.

    Inputs

    categories_idsstring
    Comma-separated category IDs to return. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
    cursorstring
    Cursor from the previous response's cursor field, to get the next page. Example: eyJsYXN0SWQiOiIxMjM0In0=.
    limitinteger
    Maximum number of results to return, 1 to 250. Defaults to 50. Example: 50.
    show_deletedboolean
    Include deleted records. Defaults to false. Example: false.
  • loyverse_category_getGet one category by ID.Read-only

    Get Category

    Get one category by ID. Returns its name and color.

    Inputs

    category_idstringrequired
    ID of the category. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
  • loyverse_customer_getGet one customer by ID.Read-only

    Get Customer

    Get one customer by ID. Returns contact details, note, points balance, first and last visit, visits and total spent.

    Inputs

    customer_idstringrequired
    ID of the customer. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
  • loyverse_customers_listList customers, optionally by email or date range.Read-only

    List Customers

    List customers, optionally by email or date range. Returns per customer their id, name, email, phone, address, customer code, note, points balance, visits and total spent. Results are paged: pass the returned cursor to get the next page.

    Inputs

    created_at_maxstring
    Only records created at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    created_at_minstring
    Only records created at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.
    cursorstring
    Cursor from the previous response's cursor field, to get the next page. Example: eyJsYXN0SWQiOiIxMjM0In0=.
    customer_idsstring
    Comma-separated customer IDs. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
    emailstring
    Exact customer email. Example: jane@example.com.
    limitinteger
    Maximum number of results to return, 1 to 250. Defaults to 50. Example: 50.
    updated_at_maxstring
    Only records updated at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    updated_at_minstring
    Only records updated at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.
  • loyverse_discount_getGet one discount by ID.Read-only

    Get Discount

    Get one discount by ID. Returns its name, type, value, stores and restricted access flag.

    Inputs

    discount_idstringrequired
    ID of the discount. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
  • loyverse_discounts_listList discounts.Read-only

    List Discounts

    List discounts. Returns per discount its id, name, type, amount or percent, stores and restricted access flag.

    Inputs

    created_at_maxstring
    Only records created at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    created_at_minstring
    Only records created at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.
    discount_idsstring
    Comma-separated discount IDs to return. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
    show_deletedboolean
    Include deleted records. Defaults to false. Example: false.
    updated_at_maxstring
    Only records updated at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    updated_at_minstring
    Only records updated at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.
  • loyverse_employee_getGet one employee by ID.Read-only

    Get Employee

    Get one employee by ID. Returns name, email, phone, role and stores.

    Inputs

    employee_idstringrequired
    ID of the employee. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
  • loyverse_employees_listList employees.Read-only

    List Employees

    List employees. Returns per employee their id, name, email, phone, role and stores. Results are paged: pass the returned cursor to get the next page.

    Inputs

    created_at_maxstring
    Only records created at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    created_at_minstring
    Only records created at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.
    cursorstring
    Cursor from the previous response's cursor field, to get the next page. Example: eyJsYXN0SWQiOiIxMjM0In0=.
    employee_idsstring
    Comma-separated employee IDs to return. Example: 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d.
    limitinteger
    Maximum number of results to return, 1 to 250. Defaults to 50. Example: 50.
    show_deletedboolean
    Include deleted records. Defaults to false. Example: false.
    updated_at_maxstring
    Only records updated at or before this time (ISO 8601). Example: 2026-12-31T23:59:59.000Z.
    updated_at_minstring
    Only records updated at or after this time (ISO 8601). Example: 2026-01-01T00:00:00.000Z.