Download the PHP package anytech/lightspeed-x-series-api without Composer
On this page you can find all versions of the php package anytech/lightspeed-x-series-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anytech/lightspeed-x-series-api
More information about anytech/lightspeed-x-series-api
Files in anytech/lightspeed-x-series-api
Package lightspeed-x-series-api
Short Description Lightspeed X-Series (formerly Vend) API client for PHP with built-in OAuth2 support
License MIT
Homepage https://github.com/anytech/lightspeed-x-series-api
Informations about the package lightspeed-x-series-api
Lightspeed X-Series API Client for PHP
A PHP client for the Lightspeed X-Series (formerly Vend) API with built-in OAuth2 support.
Updated for Lightspeed's new date-based API versioning (January 2026+)
Requirements
- PHP 8.0+
- cURL extension
- JSON extension
Installation
Quick Start
API Versioning (Date-Based)
As of January 2026, Lightspeed uses date-based API versioning instead of semantic versioning.
Version Format
Versions are identified by their release date in YYYY-MM format:
2026-01(January 2026)2026-04(April 2026)- etc.
Each version includes the full set of APIs - you no longer need to manage different versions for different endpoints. Your application can reference a single version string to access all capabilities.
Release Schedule
Lightspeed publishes a new API release every 3 months (quarterly). Each version is supported for a minimum of 12 months.
Setting the Default Version
Set the API version once at application startup:
Version Configuration Options
Upgrading Your Application
When Lightspeed releases a new API version:
- Review the API Changelog for breaking changes
- Test your application against the new version
- Update your default version in one place:
The apiRequest Method
All API calls use the single apiRequest() method:
GET Requests with Query Parameters
POST Requests
PUT Requests
DELETE Requests
OAuth2 Authentication
Step 1: Create OAuth Client
Step 2: Generate Authorization URL
Step 3: Handle Callback
Step 4: Refresh Tokens
API Endpoints Reference
All endpoints use the apiRequest() method. Replace {id} with the actual UUID.
Products
| Method | Endpoint | Description |
|---|---|---|
| GET | products |
List all products |
| GET | products/{id} |
Get single product |
| POST | products |
Create product |
| PUT | products/{id} |
Update product |
| DELETE | products/{id} |
Delete product |
| DELETE | products/families/{id} |
Delete product family |
| GET | products/{id}/inventory |
Get product inventory |
| POST | products/{id}/images |
Upload product image |
| GET | products/{id}/price_books |
Get product price books |
| POST | products/{id}/variants |
Create variant |
Product Images
| Method | Endpoint | Description |
|---|---|---|
| GET | product_images/{id} |
Get image |
| PUT | product_images/{id} |
Update image (position) |
| DELETE | product_images/{id} |
Delete image |
Product Types
| Method | Endpoint | Description |
|---|---|---|
| GET | product_types |
List all product types |
| GET | product_types/{id} |
Get single product type |
Variant Attributes
| Method | Endpoint | Description |
|---|---|---|
| GET | variant_attributes |
List all attributes |
| GET | variant_attributes/{id} |
Get single attribute |
| POST | variant_attributes |
Create attribute |
| PUT | variant_attributes/{id} |
Update attribute |
| DELETE | variant_attributes/{id} |
Delete attribute |
Customers
| Method | Endpoint | Description |
|---|---|---|
| GET | customers |
List all customers |
| GET | customers/{id} |
Get single customer |
| POST | customers |
Create customer |
| PUT | customers/{id} |
Update customer |
| DELETE | customers/{id} |
Delete customer |
Customer Groups
| Method | Endpoint | Description |
|---|---|---|
| GET | customer_groups |
List all groups |
| GET | customer_groups/{id} |
Get single group |
| POST | customer_groups |
Create group |
| PUT | customer_groups/{id} |
Update group |
| DELETE | customer_groups/{id} |
Delete group |
| GET | customer_groups/{id}/customers |
Get customers in group |
| POST | customer_groups/{id}/customers |
Add customers to group |
| DELETE | customer_groups/{id}/customers |
Remove customers from group |
Brands
| Method | Endpoint | Description |
|---|---|---|
| GET | brands |
List all brands |
| GET | brands/{id} |
Get single brand |
| POST | brands |
Create brand |
| PUT | brands/{id} |
Update brand |
| DELETE | brands/{id} |
Delete brand |
Tags
| Method | Endpoint | Description |
|---|---|---|
| GET | tags |
List all tags |
| GET | tags/{id} |
Get single tag |
| POST | tags |
Create tag |
| PUT | tags/{id} |
Update tag |
| DELETE | tags/{id} |
Delete tag |
Product Categories
| Method | Endpoint | Description |
|---|---|---|
| GET | product_categories |
List all categories |
| GET | product_categories/{id} |
Get single category |
| POST | product_categories |
Create category |
| POST | product_categories/bulk |
Bulk update categories |
| DELETE | product_categories/{id} |
Delete category |
Inventory
| Method | Endpoint | Description |
|---|---|---|
| GET | inventory |
List inventory records |
| POST | inventory |
Create inventory adjustment |
Suppliers
| Method | Endpoint | Description |
|---|---|---|
| GET | suppliers |
List all suppliers |
| GET | suppliers/{id} |
Get single supplier |
| POST | suppliers |
Create supplier |
| PUT | suppliers/{id} |
Update supplier |
| DELETE | suppliers/{id} |
Delete supplier |
Price Books
| Method | Endpoint | Description |
|---|---|---|
| GET | price_books |
List all price books |
| GET | price_books/{id} |
Get single price book |
| POST | price_books |
Create price book |
| PUT | price_books/{id} |
Update price book |
| DELETE | price_books/{id} |
Delete price book |
| GET | price_books/{id}/products |
Get products in price book |
| POST | price_books/{id}/products |
Add products to price book |
| PUT | price_books/{id}/products |
Update products in price book |
| DELETE | price_books/{id}/products |
Delete products from price book |
Price Book Products
| Method | Endpoint | Description |
|---|---|---|
| GET | price_book_products |
List all price book product entries |
| POST | price_book_products |
Create price book product entry |
| PUT | price_book_products/{id} |
Update price book product entry |
| DELETE | price_book_products/{id} |
Delete price book product entry |
Promotions
| Method | Endpoint | Description |
|---|---|---|
| GET | promotions |
List all promotions |
| GET | promotions/{id} |
Get single promotion |
| POST | promotions |
Create promotion |
| PUT | promotions/{id} |
Update promotion |
| DELETE | promotions/{id} |
Delete promotion |
| GET | promotions/search |
Search promotions |
| GET | promotions/{id}/products |
Get promotion products |
| GET | promotions/{id}/promocodes |
Get promo codes |
| POST | promotions/{id}/promocodes |
Create promo code |
| DELETE | promotions/{id}/promocodes/{code_id} |
Delete promo code |
Promo Codes (Bulk)
| Method | Endpoint | Description |
|---|---|---|
| POST | promocode/bulk/active |
Get active status of promo codes |
| DELETE | promocode/bulk |
Bulk delete promo codes |
Discount
| Method | Endpoint | Description |
|---|---|---|
| POST | discount |
Apply discounts to sale object (read-only) |
Sales
| Method | Endpoint | Description |
|---|---|---|
| GET | sales |
List all sales |
| GET | sales/{id} |
Get single sale |
| DELETE | sales/{id} |
Delete sale |
| GET | sales/{id}/fulfillments |
Get sale fulfillments |
| POST | sales/{id}/fulfillments |
Create fulfillment for sale |
Fulfillments
| Method | Endpoint | Description |
|---|---|---|
| GET | fulfillments |
List all fulfillments |
| GET | fulfillments/{id} |
Get single fulfillment |
| PUT | fulfillments/{id} |
Update fulfillment |
| POST | fulfillments/fulfill |
Fulfill a sale (complete all) |
| POST | fulfillments/{id}/fulfill |
Fulfill specific line items |
Registers
| Method | Endpoint | Description |
|---|---|---|
| GET | registers |
List all registers |
| GET | registers/{id} |
Get single register |
| POST | registers/{id}/open |
Open register |
| POST | registers/{id}/close |
Close register |
| GET | registers/{id}/payments_summary |
Get payments summary |
Register Closures
| Method | Endpoint | Description |
|---|---|---|
| GET | register_closures |
List register closures |
| GET | register_closures/{id} |
Get single closure |
Outlets
| Method | Endpoint | Description |
|---|---|---|
| GET | outlets |
List all outlets |
| GET | outlets/{id} |
Get single outlet |
Payments
| Method | Endpoint | Description |
|---|---|---|
| GET | payments |
List all payments |
| GET | payments/{id} |
Get single payment |
Payment Types
| Method | Endpoint | Description |
|---|---|---|
| GET | payment_types |
List all payment types |
| GET | payment_types/{id} |
Get single payment type |
Taxes
| Method | Endpoint | Description |
|---|---|---|
| GET | taxes |
List all taxes |
| GET | taxes/{id} |
Get single tax |
| POST | customer_taxes/bulk |
Bulk update customer taxes |
Consignments
| Method | Endpoint | Description |
|---|---|---|
| GET | consignments |
List all consignments |
| GET | consignments/{id} |
Get single consignment |
| POST | consignments |
Create consignment |
| PUT | consignments/{id} |
Update consignment |
| DELETE | consignments/{id} |
Delete consignment |
Consignment Products
| Method | Endpoint | Description |
|---|---|---|
| GET | consignment_products |
List consignment products |
| POST | consignment_products |
Create consignment product |
| PUT | consignment_products/{id} |
Update consignment product |
| DELETE | consignment_products/{id} |
Delete consignment product |
Service Orders
| Method | Endpoint | Description |
|---|---|---|
| GET | service_orders |
List all service orders |
| GET | service_orders/{id} |
Get single service order |
| POST | service_orders |
Create service order |
| PUT | service_orders/{id} |
Update service order |
| DELETE | service_orders/{id} |
Delete service order |
Gift Cards
| Method | Endpoint | Description |
|---|---|---|
| GET | gift_cards |
List all gift cards |
| GET | gift_cards/{number} |
Get gift card by number |
| GET | gift_cards/{id} |
Get gift card by ID |
| POST | gift_cards |
Create and activate gift card |
| DELETE | gift_cards/{number} |
Void gift card |
| GET | gift_cards/{number}/transactions |
Get gift card transactions |
| POST | gift_cards/{number}/transactions |
Create transaction (redeem/reload) |
Users
| Method | Endpoint | Description |
|---|---|---|
| GET | users |
List all users |
| GET | users/{id} |
Get single user |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
| GET | webhooks |
List all webhooks |
| GET | webhooks/{id} |
Get single webhook |
| POST | webhooks |
Create webhook |
| DELETE | webhooks/{id} |
Delete webhook |
Search
| Method | Endpoint | Description |
|---|---|---|
| POST | search |
Search products or entities |
Loyalty
| Method | Endpoint | Description |
|---|---|---|
| GET | loyalty_adjustments |
List loyalty adjustments |
| POST | loyalty_adjustments |
Create loyalty adjustment |
Channel Requests (Ecommerce)
| Method | Endpoint | Description |
|---|---|---|
| GET | channel_request_templates |
List templates |
| GET | channel_requests |
List channel requests |
| GET | channel_requests/{id} |
Get single request |
| POST | channel_requests |
Create channel request |
| PUT | channel_requests/{id} |
Update channel request |
Store Credit
| Method | Endpoint | Description |
|---|---|---|
| GET | store_credit_transactions |
List transactions |
| POST | store_credit_transactions |
Create transaction |
Line Items
| Method | Endpoint | Description |
|---|---|---|
| GET | line_items |
List line items |
Common Query Parameters
Most GET endpoints support these query parameters:
| Parameter | Description |
|---|---|
page_size |
Number of results per page (max 200) |
after |
Cursor for pagination (from version.max in response) |
before |
Cursor for reverse pagination |
deleted |
Include deleted records (true/false) |
Debug Mode
Enable debug mode to see request/response details:
Rate Limiting
The API client automatically handles rate limiting (HTTP 429). When rate limited, it will wait and retry.
OAuth Scopes
From March 31, 2026, OAuth requests must include scopes. Request only the scopes your application needs.
Selecting Scopes
- Review all endpoints used by your application
- Check the required scope(s) for each endpoint
- Combine and remove duplicates to form your scope list
Available Scopes
| Scope | Description |
|---|---|
audit:read |
Read audit and security events |
billing:partner_subscription:read |
Read Billing Partner Subscription |
billing:partner_subscription:write |
Write Billing Partner Subscription |
business_rules:read |
Read business rules |
business_rules:write |
Create and delete business rules |
channels:read |
Read e-commerce channel information |
consignments:read |
Read in-progress inventory counts and historical stock consignments |
consignments:write:inventory_count |
Perform Inventory Counts |
consignments:write:stock_order |
Process stock orders and stock returns |
consignments:write:stock_transfer |
Create, send and receive stock transfers between outlets |
customers:read |
Read customers and customer groups |
customers:write |
Create, update and delete customers and customer groups |
custom_fields:read |
Read custom fields |
custom_fields:write |
Create, update and delete custom fields |
fulfillments:read |
Read sale order fulfillments |
fulfillments:write |
Create and update sale order fulfillments |
gift_cards:read |
Read gift cards and gift card transactions |
gift_cards:write:issue |
Issue a gift card to a customer |
gift_cards:write:redeem |
Redeem or reload an amount against a customers gift card |
inventory:read |
Read current and historical product inventory levels |
outlets:read |
Read outlets |
payments:read |
Read Payments |
payment_types:read |
Read payment types, excluding internal payment types |
products:read |
Read products, product types, product images, brands and tags (excluding costs) |
products:read:price_books |
Read product price books |
products:write |
Create/update products (excluding costs), delete products, upload images, create types |
products:write:price_books |
Write Products Price Books |
promotions:read |
Read promotions, get promotion products, find best promotion for sale |
promotions:write |
Create, update and archive any promotion |
register:close |
Close a register and reconcile payments |
register:open |
Open a register to create sales and payments |
registers:read |
Read registers |
remote_rules:read |
Read remote rules |
remote_rules:write |
Create and delete remote rules |
retailer:read |
Read account configuration (loyalty ratio, timezone, country, currency) |
sales:read |
Read all sales and payments in your account |
sales:write |
Create sales and payments, adjust, void or return sales |
serial_numbers:read |
Read serial numbers |
serial_numbers:write |
Add and delete serial numbers |
services:read |
Read services |
services:write |
Create, edit services |
store_credits:read |
Read store credit transactions |
store_credits:write:issue |
Issue store credits to a customer for a return |
suppliers:read |
Read suppliers |
suppliers:write |
Create, update and delete suppliers |
taxes:read |
Read tax rates and tax rules (and tax groups if tax exclusive) |
taxes:write |
Create, update and delete taxes |
users:read |
Read user information (except passwords) |
users:write |
Create, update and delete users and customise groups |
webhooks |
Manage webhooks created by the application |
License
MIT License. See LICENSE for details.
Links
All versions of lightspeed-x-series-api with dependencies
ext-curl Version *
ext-json Version *