{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-detailed-service-schema.json", "title": "DetailedService", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/lightspeed-service-orders-api-openapi.yml#/components/schemas/DetailedService", "properties": { "notes": { "description": "An array of service notes, or null if no notes exist.", "items": { "$ref": "#/$defs/ServiceNote" }, "type": [ "array", "null" ] }, "service": { "$ref": "#/$defs/ServiceOrder" }, "serviceItems": { "$ref": "#/$defs/ServiceItems" } }, "type": "object", "x-stoplight": { "id": "2fu3rgyr0q1gp" }, "$defs": { "DailyAgenda": { "properties": { "date": { "type": "string" }, "minutes_scheduled": { "type": "integer" } }, "title": "DailyAgenda", "type": "object" }, "ItemDetails": { "properties": { "description": { "type": "string" }, "initial_condition": { "type": "string" }, "item_id": { "type": "string" }, "item_name": { "type": "string" }, "serial_number": { "type": "string" } }, "title": "ItemDetails", "type": "object" }, "LineItemTaxComponent": { "properties": { "rate_id": { "description": "Tax rate ID.", "type": "string" }, "total_tax": { "description": "Tax total.", "format": "double", "type": "number" } }, "required": [ "rate_id", "total_tax" ], "title": "Line Item Tax Component", "type": "object" }, "PromotionDescription": { "description": "Basic description for a Promotion.", "properties": { "description": { "description": "A short description for the promotion.", "type": "string" }, "id": { "description": "Auto-generated object ID.", "type": "string" }, "name": { "description": "The name of the promotion.", "type": "string" } }, "title": "PromotionDescription", "type": "object" }, "Role": { "properties": { "id": { "description": "Auto-generated object ID.", "type": "string" }, "name": { "description": "The Role name.", "type": "string" }, "system_role_id": { "description": "A system role id of the Role. Will be either '100', '200', or '300'.", "type": "string" } }, "title": "Role", "type": "object" }, "ServiceItems": { "properties": { "item_details": { "$ref": "#/$defs/ItemDetails" }, "location": { "type": "string" } }, "title": "ServiceItems", "type": "object" }, "ServiceNote": { "properties": { "body": { "type": "string" }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "is_visible_to_customer": { "description": "Whether the note should be printed in the service receipt or not", "type": "boolean" }, "location": { "deprecated": true, "description": "Deprecated: Use top-level location field on ServiceOrder instead. Location where the service will be performed", "type": "string" }, "serviceId": { "type": "string" }, "serviceStatus": { "deprecated": true, "type": "number" }, "user": { "$ref": "#/$defs/User" }, "userId": { "type": "string" } }, "title": "ServiceNote", "type": "object", "x-stoplight": { "id": "2fu3rgyr0q1gp" } }, "ServiceOrder": { "properties": { "agenda": { "$ref": "#/$defs/DailyAgenda" }, "assigned_user_id": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "line_items": { "description": "Collection of line items associated with this service order.", "items": { "properties": { "fulfillment_type": { "description": "Type of fulfillment for this line item.", "type": "string" }, "gift_card": { "description": "Gift card information if applicable.", "type": [ "object", "null" ] }, "id": { "description": "The ID of this line item.", "type": "string" }, "is_picklist_pickable": { "description": "Indicates if this line item can be picked from a picklist.", "type": "boolean" }, "note": { "description": "Line item note.", "type": "string" }, "price_set": { "description": "Indicates whether the price was set manually.", "type": "boolean" }, "product_id": { "description": "The ID of the product associated with this line item.", "type": "string" }, "promotions": { "description": "Array of promotions applied to this line item.", "items": { "$ref": "#/$defs/PromotionDescription" }, "type": "array" }, "quantity": { "description": "Quantity of products for the line item.", "type": "string" }, "register_id": { "description": "The register ID associated with this line item.", "type": "string" }, "register_sequence_id": { "description": "The register sequence ID for this line item.", "type": "string" }, "sales_person_id": { "description": "The ID of the salesperson associated with this line item.", "type": "string" }, "sequence": { "description": "Order of the line item in the service order.", "type": "integer" }, "sku": { "description": "The SKU of the product.", "type": "string" }, "state": { "description": "State of the line item.", "type": "string" }, "tax_components": { "description": "Collection of tax components associated with the line item.", "items": { "$ref": "#/$defs/LineItemTaxComponent" }, "type": "array" }, "unit_discount": { "description": "Unit discount value for the line item.", "type": "string" }, "unit_loyalty": { "description": "Unit loyalty value for the line item.", "type": "string" }, "unit_price": { "description": "Unit price of the line item.", "type": "string" } }, "type": "object" }, "type": "array" }, "location": { "type": "string" }, "retailer_id": { "type": "string" }, "sale_id": { "type": "string" }, "status": { "type": "string" }, "status_details": { "$ref": "#/$defs/ServiceStatusDetails" }, "totals": { "description": "Financial totals for the service order.", "properties": { "is_sale_level_discount_percentage": { "description": "Indicates if the sale level discount is a percentage.", "type": "boolean" }, "sale_level_discount_value": { "description": "Total discount value applied at the sale level.", "type": "string" }, "sub_total": { "description": "Subtotal amount before taxes and discounts.", "type": "string" }, "total_amount": { "description": "Final total amount including all taxes and discounts.", "type": "string" }, "total_promotion": { "description": "Total promotion value applied.", "type": "string" }, "total_tax": { "description": "Total tax amount.", "type": "string" } }, "type": "object" }, "updated_at": { "type": [ "string", "null" ] }, "updated_by": { "type": "string" } }, "type": [ "object", "null" ] }, "ServiceStatusDetails": { "description": "Details of a custom service status assigned to a service order.", "properties": { "created_at": { "description": "The date and time the status was created.", "format": "date-time", "type": "string" }, "display_name": { "description": "Human-readable name of the status.", "type": "string" }, "display_order": { "description": "The order in which this status appears in the UI. Null if not set.", "type": [ "integer", "null" ] }, "id": { "description": "The unique ID of the status.", "type": "string" }, "retailer_id": { "description": "The retailer this status belongs to.", "type": "string" }, "status_key": { "description": "The underlying key mapping this status to a system status (e.g. NEW, IN_PROGRESS).", "type": "string" }, "system_default": { "description": "Whether this is a system-managed default status.", "type": "boolean" }, "updated_at": { "description": "The date and time the status was last updated.", "format": "date-time", "type": "string" } }, "type": [ "object", "null" ] }, "User": { "properties": { "account_type": { "description": "User's account type.", "enum": [ "cashier", "manager", "admin" ], "type": "string" }, "created_at": { "description": "Creation timestamp in UTC.", "type": "string" }, "deleted_at": { "description": "Deletion timestamp in UTC.", "type": [ "string", "null" ] }, "display_name": { "description": "Full user's name to be used for display in the UI.", "type": [ "string", "null" ] }, "email": { "description": "User's email address.", "format": "email", "type": [ "string", "null" ] }, "email_verified_at": { "description": "The timestamp of users email verification.", "type": [ "string", "null" ] }, "enabled": { "description": "Indicates whether the user is enabled.", "type": "boolean" }, "enabled_mfa": { "description": "The user's enabled MFA factor, or null if MFA is not enabled.", "properties": { "created_at": { "description": "Timestamp when the MFA factor was created.", "type": "string" }, "id": { "description": "Auto-generated MFA factor ID.", "type": "string" }, "type": { "description": "The MFA factor type (e.g. \"otp\").", "enum": [ "otp" ], "type": "string" } }, "type": [ "object", "null" ] }, "id": { "description": "Auto-generated object ID.", "format": "uuid", "type": "string" }, "image_source": { "description": "URL of the default-sized user's avatar.", "type": "string" }, "images": { "$ref": "#/$defs/UserImages" }, "is_primary_user": { "description": "Indicated whether this user is the primary user for the account.", "type": "boolean" }, "permissions": { "description": "The permissions assigned to the user.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "require_password_change": { "description": "Indicates whether the user is required to change their password.", "type": "boolean" }, "restricted_outlet_id": { "deprecated": true, "description": "**deprecated** Use the `restricted_outlet_ids` instead.", "type": [ "string", "null" ] }, "restricted_outlet_ids": { "description": "A list of outlet IDs the user is associated with", "items": { "format": "uuid", "type": "string" }, "type": "array" }, "roles": { "description": "The roles assigned to the user.", "items": { "$ref": "#/$defs/Role" }, "type": "array" }, "rules": { "description": "The rules assigned to the user.", "type": "object" }, "seen_at": { "description": "The timestamp of the user's last activity in the system.", "type": "string" }, "switch_id": { "description": "The switch id for the user.", "type": "string" }, "target_daily": { "description": "Daily sales target for the user.", "type": [ "number", "null" ] }, "target_monthly": { "description": "Monthly sales target for the user.", "type": [ "number", "null" ] }, "target_weekly": { "description": "Weekly sales target for the user.", "type": [ "number", "null" ] }, "time_until_deletion": { "description": "The time until the user is deleted.", "type": [ "string", "null" ] }, "updated_at": { "description": "Last update timestamp in UTC.", "type": "string" }, "username": { "description": "User's username used for login.", "type": "string" }, "version": { "description": "Auto-incrementing object version number.", "format": "int64", "type": "integer" } }, "required": [ "account_type", "created_at", "id", "is_primary_user", "updated_at", "username", "version" ], "title": "User", "type": "object" }, "UserImages": { "description": "On object containing URLs for different sizes of the user’s avatar.", "properties": { "original": { "type": "string" }, "sl": { "type": "string" }, "sm": { "type": "string" }, "ss": { "type": "string" }, "st": { "type": "string" }, "standard": { "type": "string" }, "thumb": { "type": "string" } }, "title": "User Image", "type": [ "object", "null" ] } } }