Lightspeed Commerce Workflows API

Workflow operations

Operations 12

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /workflows/custom_fields List custom field definitions for an entity · List custom field definitions #
Ask an LLM
“What custom fields are defined on sales or products in my store?”
“Which custom field definitions exist for a given entity type?”
Tell an agent
List the custom field definitions for entity type {entity}.
Show me every custom field defined on {entity} records.
POST /workflows/custom_fields Define a new custom field · Define a new custom field #
Ask an LLM
“How do I add a new custom field to products or customers?”
“Can a new custom field be printed on the receipt?”
Tell an agent
Define a custom field named {name} titled {title} of type {type} on {entity}.
Create a {type} custom field {name} with title {title} on {entity} and print it on receipts: {print_on_receipt}.
GET /workflows/custom_fields/values Get custom field values on a record · List custom field values #
Ask an LLM
“What custom field values are stored on a specific sale or customer?”
“How do I read the custom data attached to one record?”
Tell an agent
Get the custom field values on {entity} {entity_id}.
Show the stored custom data for {entity} record {entity_id}.
POST /workflows/custom_fields/values Set custom field values on a record · Set new custom field values #
Ask an LLM
“How do I save custom field values onto a particular customer or sale?”
“Can I set several custom field values on one record at once?”
Tell an agent
Set custom field values {values} on {entity} {entity_id}.
Write these custom values to {entity} record {entity_id}: {values}.
DELETE /workflows/custom_fields/{customFieldId} Delete a custom field and its values · Delete a custom field #
Ask an LLM
“What happens to stored values when I delete a custom field?”
“How do I remove a custom field definition I no longer need?”
Tell an agent destructive · confirm first
Delete custom field {customFieldId} and all its stored values.
Remove the custom field definition {customFieldId}.
PUT /workflows/custom_fields/{customFieldId} Update a custom field definition · Update a custom field #
Ask an LLM
“Can I rename the title of an existing custom field?”
“How do I hide a custom field from the UI or stop it printing on receipts?”
Tell an agent
Change the title of custom field {customFieldId} to {title}.
Set custom field {customFieldId} visible in the UI to {visible_in_ui}.
GET /workflows/remote_rules List registered remote rules · List remote rules #
Ask an LLM
“Which remote rule URLs are registered on my retailer account?”
“How can I see the external rule endpoints my store calls out to?”
Tell an agent
List the remote rules registered for my retailer.
Show every remote rule URL currently registered.
POST /workflows/remote_rules Register a remote rule URL · Create remote rule #
Ask an LLM
“How do I register my own service URL as a remote business rule?”
“Can I point the store at an external endpoint that evaluates rules?”
Tell an agent
Register a remote rule at URL {url}.
Add {url} as a new remote rule endpoint for my retailer.
DELETE /workflows/remote_rules/{remoteRuleId} Delete a remote rule · Delete a remote rule #
Ask an LLM
“How do I unregister a remote rule endpoint?”
“Can I delete a remote rule I registered by mistake?”
Tell an agent destructive · confirm first
Delete remote rule {remoteRuleId}.
Unregister the remote rule endpoint with ID {remoteRuleId}.
GET /workflows/rules List business rules · List rules #
Ask an LLM
“Which business rules are wired to events in my store?”
“What event types currently trigger a remote rule?”
Tell an agent
List the business rules for my retailer.
Show which events are mapped to remote rules in business rules.
POST /workflows/rules Attach a remote rule to an event · Create rule #
Ask an LLM
“How do I make a remote rule fire on a specific event type?”
“Can I link an event like adding a product to my remote rule?”
Tell an agent
Create a business rule that calls remote rule {remote_rule_id} on event {event_type}.
Trigger remote rule {remote_rule_id} whenever {event_type} happens.
DELETE /workflows/rules/{ruleId} Delete a business rule · Delete a business rule #
Ask an LLM
“How do I stop an event from triggering its business rule?”
“Can I delete a business rule without removing the remote rule endpoint?”
Tell an agent destructive · confirm first
Delete business rule {ruleId}.
Remove the event-to-remote-rule mapping {ruleId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightspeed:lightspeed-workflows-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightspeed-workflows-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: x-series.api@lightspeedhq.com
    name: Lightspeed Developer Relations
    url: https://developers.retail.lightspeed.app
  description: Lightspeed Retail (X-Series) API.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://developers.lightspeedhq.com/terms
  title: 2026-07 Workflows API
  version: 2026-07
servers:
- url: https://{domain_prefix}.retail.lightspeed.app/api/2026-07
  variables:
    domain_prefix:
      default: example
      description: Domain prefix of the store to be operated on
security:
- bearerAuth: []
tags:
- description: Workflow operations
  name: Workflows
paths:
  /workflows/custom_fields:
    get:
      description: 'Returns the custom field definitions for a given entity type.


        🔒 Requires: `custom_fields:read` scope'
      operationId: GetCustomFields
      parameters:
      - description: The entity type.
        in: query
        name: entity
        required: true
        schema:
          enum:
          - sale
          - line_item
          - customer
          - product
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldDefinitionCollection'
          description: A list of all the custom field definitions associated with the entity type.
      summary: List custom field definitions
      tags:
      - Workflows
    post:
      description: 'Create a new custom field definition for a given entity type.


        🔒 Requires: `custom_fields:write` scope'
      operationId: CreateCustomField
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomFieldDefinitionParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/CustomFieldDefinition'
                type: object
          description: A custom field definition.
      summary: Define a new custom field
      tags:
      - Workflows
  /workflows/custom_fields/values:
    get:
      description: 'Returns the custom field values for a given entity.


        🔒 Requires: `custom_fields:read` scope'
      operationId: GetCustomFieldValues
      parameters:
      - description: The entity type.
        in: query
        name: entity
        required: true
        schema:
          enum:
          - sale
          - line_item
          - customer
          - product
          type: string
      - description: The entity ID.
        in: query
        name: entity_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldValueCollection'
          description: A list of all the custom field values associated with entity.
      summary: List custom field values
      tags:
      - Workflows
    post:
      description: 'Set new custom field values on a given entity.


        🔒 Requires: `custom_fields:write` scope'
      operationId: SetCustomFieldValues
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomFieldValuesParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldValueCollection'
          description: A list of all the custom field values associated with the entity.
      summary: Set new custom field values
      tags:
      - Workflows
  /workflows/custom_fields/{customFieldId}:
    delete:
      description: 'Delete a custom field and all the values stored on that field.


        🔒 Requires: `custom_fields:write` scope'
      operationId: delete-custom-field
      parameters:
      - description: The ID of the custom field that you want deleted.
        in: path
        name: customFieldId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: The custom field was deleted.
      summary: Delete a custom field
      tags:
      - Workflows
    put:
      description: 'Updates properties on a custom field.


        🔒 Requires: `custom_fields:write` scope'
      operationId: update-custom-field
      parameters:
      - description: The ID of the custom field that you want to update.
        in: path
        name: customFieldId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomFieldParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/CustomFieldDefinition'
                type: object
          description: A custom field definition.
      summary: Update a custom field
      tags:
      - Workflows
  /workflows/remote_rules:
    get:
      description: 'Returns the remote business rules registered on the retailer.


        🔒 Requires: `remote_rules:read` scope'
      operationId: get-remote-rules
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/RemoteBusinessRule'
                    type: array
                required:
                - data
                type: object
          description: A list of all the remote business rules associated with the retailer.
      summary: List remote rules
      tags:
      - Workflows
    post:
      description: 'Register a new remote rule for the retailer.


        🔒 Requires: `remote_rules:write` scope'
      operationId: create-remote-rule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoteBusinessRuleParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/RemoteBusinessRule'
                type: object
          description: A remote business rule.
      summary: Create remote rule
      tags:
      - Workflows
  /workflows/remote_rules/{remoteRuleId}:
    delete:
      description: 'Delete a remote business rule.


        🔒 Requires: `remote_rules:write` scope'
      operationId: delete-remote-rule
      parameters:
      - description: The ID of the remote business rules that you want deleted.
        in: path
        name: remoteRuleId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: The remote business rule was deleted.
      summary: Delete a remote rule
      tags:
      - Workflows
  /workflows/rules:
    get:
      description: 'Returns the business rules for the retailer.


        🔒 Requires: `business_rules:read` scope'
      operationId: get-rules
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/BusinessRule'
                    type: array
                type: object
          description: A list of all the business rules associated with the retailer.
      summary: List rules
      tags:
      - Workflows
    post:
      description: 'Create a rule for the retailer.


        🔒 Requires: `business_rules:write` scope'
      operationId: create-rule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessRuleParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/BusinessRule'
                type: object
          description: A business rule.
      summary: Create rule
      tags:
      - Workflows
  /workflows/rules/{ruleId}:
    delete:
      description: 'Delete a business rule.


        🔒 Requires: `business_rules:write` scope'
      operationId: delete-rule
      parameters:
      - description: The ID of the business rules that you want deleted.
        in: path
        name: ruleId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: The business rule was deleted.
      summary: Delete a business rule
      tags:
      - Workflows
components:
  schemas:
    CustomFieldValueCollection:
      description: The fields returned by the custom field value list API.
      properties:
        data:
          description: An array of Custom Field Values.
          items:
            $ref: '#/components/schemas/CustomFieldValue'
          type: array
      required:
      - data
      title: Custom Field Value Collection
      type: object
    CustomFieldValuesParams:
      description: The parameters that can be passed to the set custom field values API.
      properties:
        entity:
          description: The entity type.
          enum:
          - sale
          - line_item
          - customer
          - product
          type: string
        entity_id:
          description: The ID of entity.
          format: uuid
          type: string
        values:
          description: The values.
          items:
            properties:
              boolean_value:
                type: boolean
              integer_value:
                format: int64
                type: integer
              name:
                description: The name of the custom field to set a value for. Must match an existing custom field name for the entity type.
                example: my_custom_field
                type: string
              string_value:
                example: spec-test-value
                type: string
            required:
            - name
            - string_value
            type: object
          type: array
      required:
      - entity
      - entity_id
      - values
      title: Custom Field Value Parameters
      type: object
    BusinessRule:
      properties:
        created_at:
          description: The creation timestamp in UTC.
          format: date-time
          readOnly: true
          type: string
        event_type:
          enum:
          - sale.ready_for_payment
          - sale.line_items.added
          - sale.customer.changed
          - sale.created
          - sale.updated
          type: string
        id:
          example: '1239349747718000640'
          readOnly: true
          type: string
        remote_rule_id:
          example: '1239349157873029120'
          type: string
      required:
      - event_type
      - remote_rule_id
      title: Business Rule
      type: object
    BusinessRuleParams:
      description: The parameters that can be passed to the create rule API.
      properties:
        event_type:
          enum:
          - sale.ready_for_payment
          - sale.line_items.added
          - sale.customer.changed
          - sale.created
          - sale.updated
          type: string
        remote_rule_id:
          example: '1239349157873029120'
          type: string
      required:
      - event_type
      - remote_rule_id
      title: Rule Parameters
      type: object
    CustomFieldDefinitionParams:
      description: The parameters that can be passed to the create custom field definition API.
      properties:
        editable_in_ui:
          default: false
          description: Should this custom field be editable in the UI.
          type: boolean
        entity:
          description: The type of entity.
          enum:
          - sale
          - line_item
          - customer
          - product
          type: string
        name:
          example: my_custom_field
          type: string
        print_on_receipt:
          default: false
          description: Should this custom field be printed on receipts.
          type: boolean
        title:
          example: My Custom Field
          type: string
        type:
          description: The type of the value to be stored using this custom field.
          enum:
          - string
          - integer
          - boolean
          - date
          - product_id
          - qrcode
          - string_array
          type: string
        visible_in_ui:
          default: false
          description: Should this custom field be visible in the UI.
          type: boolean
      required:
      - entity
      - name
      - title
      - type
      title: Custom Field Definition Parameters
      type: object
    RemoteBusinessRuleParams:
      description: The parameters that can be passed to the create remote rule API.
      properties:
        url:
          example: https://retailer.com/vend-business-rule
          format: uri
          type: string
      required:
      - url
      title: Remote Rule Parameters
      type: object
    CustomFieldDefinition:
      description: The type, name, and configuration of a custom field.
      properties:
        created_at:
          description: The creation timestamp in UTC.
          format: date-time
          readOnly: true
          type: string
        editable_in_ui:
          description: Is this custom field be editable in the UI.
          type: boolean
        entity:
          description: The type of entity.
          enum:
          - sale
          - line_item
          - customer
          - product
          type: string
        id:
          example: '1239349157873029120'
          readOnly: true
          type: string
        name:
          example: my_custom_field
          type: string
        title:
          example: My Custom Field
          type: string
        type:
          description: The type of the value to be stored using this custom field.
          enum:
          - string
          - integer
          - boolean
          - date
          - product_id
          - qrcode
          - string_array
          type: string
        visible_in_ui:
          description: Is this custom field visible in the UI.
          type: boolean
      title: Custom Field Definition
      type: object
    CustomFieldValue:
      description: The value of a custom field on an entity.
      properties:
        boolean_value:
          type: boolean
        definition_id:
          description: The ID of the custom field definition associated with this value.
          example: '1239349157873029120'
          readOnly: true
          type: string
        integer_value:
          format: int64
          type: integer
        name:
          example: my_custom_field
          type: string
        string_value:
          type: string
        title:
          example: My Custom Field
          type: string
        type:
          description: The type of the value to be stored using this custom field.
          enum:
          - string
          - integer
          - boolean
          - date
          type: string
      title: Custom Field Value
      type: object
    CustomFieldDefinitionCollection:
      description: The fields returned by the custom fields definition list API.
      properties:
        data:
          description: An array of Custom Field Definitions.
          items:
            $ref: '#/components/schemas/CustomFieldDefinition'
          type: array
      required:
      - data
      title: Custom Field Definition Collection
      type: object
    RemoteBusinessRule:
      description: The configuration of a remote business rule.
      properties:
        created_at:
          description: The creation timestamp in UTC.
          format: date-time
          readOnly: true
          type: string
        id:
          example: '1239349157873029120'
          readOnly: true
          type: string
        oauth_application_id:
          description: The ID of the application the created the remote business rule.
          example: 043eec148ae192a2d88b1d658e8084a3
          readOnly: true
          type: string
        url:
          example: https://retailer.com/vend-business-rule
          format: uri
          type: string
      required:
      - url
      title: Remote Business Rules
      type: object
    UpdateCustomFieldParams:
      properties:
        editable_in_ui:
          description: Should this custom field be editable in the UI.
          type: boolean
        print_on_receipt:
          description: Should this custom field be printed on receipts.
          type: boolean
        title:
          example: My Custom Field
          type: string
        visible_in_ui:
          description: Should this custom field be visible in the UI.
          type: boolean
      title: Parameters for updating a custom field
      type: object
  securitySchemes:
    bearerAuth:
      description: Bearer Token for API authentication.
      scheme: bearer
      type: http
externalDocs:
  description: List of tz database time zones
  url: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones