Skip to main content

Target APIs

When you build a POS UI extension, Shopify automatically provides you with specific APIs based on where your extension runs within the POS interface. This system ensures extensions receive exactly the data and functionality they need for their particular use case, while maintaining security and performance.

Your target determines which APIs you receive because different locations in POS require different capabilities.

Contextual APIs provide access to data and operations specific to your extension's current location within the POS app. These APIs give you the ability to read and modify context-specific information like cart contents, selected products, customer details, or order information based on where your extension is rendered.

NameDescription
Cart APIAdd, remove, and modify cart items, apply discounts, and manage cart properties.
Customer APIRead customer information and build customer-specific functionality.
Draft Order APIRead and manipulate draft order data in draft order detail views.
Order APIRead order data and build post-purchase functionality.
Product APIAccess the product ID and variant ID of the currently viewed or selected product.

Platform APIs expose device-specific hardware capabilities and native POS functionality that differentiate mobile retail experiences from traditional web applications. These APIs provide access to physical device features like barcode scanners, receipt printers, camera scanning, and device connectivity status. They enable extensions to use the unique hardware and navigation patterns of POS devices to create native retail experiences.

NameDescription
Connectivity APICheck device connectivity status and Internet connection availability.
Device APIRetrieve device information including device name, ID, and hardware capabilities.
Navigation APINavigate between different screens and views within the POS interface.
Scanner APICapture barcodes and QR codes using the device camera or connected barcode scanners.

Standard APIs offer core functionality that most extensions need regardless of their specific use case or location within the POS app. These APIs provide essential capabilities like local data storage, session and authentication management, user notifications through toasts, and internationalization support. They serve as the foundational building blocks that enable extensions to integrate with the POS environment while maintaining consistent behavior across different contexts.

NameDescription
Action APILaunch modal dialogs for multi-step workflows and complex interactions.
Locale APIRetrieve the merchant's locale and localization settings for internationalization.
Product Search APISearch the merchant's product catalog and retrieve product details, variants, and inventory data.
Session APIAccess session information and generate fresh authentication tokens for secure backend API requests.
Toast APIDisplay toast notifications to provide feedback and information to users.

Was this page helpful?