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 API

Add, remove, and modify cart items, apply discounts, and manage cart properties.

Customer API

Read customer information and build customer-specific functionality.

Draft Order API

Read and manipulate draft order data in draft order detail views.

Order API

Read order data and build post-purchase functionality.

Product API

Access 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 API

Check device connectivity status and Internet connection availability.

Device API

Retrieve device information including device name, ID, and hardware capabilities.

Navigation API

Navigate between different screens and views within the POS interface.

Scanner API

Capture 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 API

Launch modal dialogs for multi-step workflows and complex interactions.

Locale API

Retrieve the merchant's locale and localization settings for internationalization.

Product Search API

Search the merchant's product catalog and retrieve product details, variants, and inventory data.

Session API

Access session information and generate fresh authentication tokens for secure backend API requests.

Toast API

Display toast notifications to provide feedback and information to users.


Was this page helpful?