Skip to main content

APIs

Action API

The Action API allows an action extension to modally present its corresponding modal target. #### Supporting targets

  • pos.home.tile.render
  • pos.purchase.post.action.menu-item.render
  • pos.purchase.post.block.render
  • pos.return.post.action.menu-item.render
  • pos.return.post.block.render
  • pos.exchange.post.action.menu-item.render
  • pos.exchange.post.block.render
  • pos.order-details.action.menu-item.render
  • pos.order-details.block.render
  • pos.product-details.action.menu-item.render
  • pos.customer-details.action.menu-item.render
  • pos.customer-details.block.render
  • pos.draft-order-details.action.menu-item.render
  • pos.draft-order-details.block.render

Cart API

The Cart API enables UI Extensions to manage and interact with POS cart contents, such as discounts, line items, and customer details. It provides a comprehensive set of functions for adding and removing items, alongside a subscribable object that keeps the UI Extension updated with real-time changes to the cart. #### Supporting targets

  • pos.home.tile.render
  • pos.home.modal.render
  • pos.product-details.action.menu-item.render
  • pos.product-details.action.render
  • pos.customer-details.action.menu-item.render
  • pos.customer-details.action.render
  • pos.customer-details.block.render
  • pos.order-details.action.menu-item.render
  • pos.order-details.action.render
  • pos.order-details.block.render
  • pos.draft-order-details.action.menu-item.render
  • pos.draft-order-details.action.render
  • pos.draft-order-details.block.render

Cart Line Item API

The Cart Line Item API provides an extension with data about the current Cart Line Item. #### Supporting targets

  • pos.cart.line-item-details.action.menu-item.render
  • pos.cart.line-item-details.action.render

Connectivity API

The Connectivity API enables POS UI extensions to retrieve device connectivity information, such as whether the device has an internet connection.

Customer API

The customer API provides an extension with data about the current customer. #### Supporting targets

  • pos.customer-details.action.menu-item.render
  • pos.customer-details.action.render
  • pos.customer-details.block.render

Device API

The Device API allows the UI Extension to retrieve device information including the device name and ID.

Draft Order API

The Draft Order API provides an extension with data about the current draft order. #### Supporting targets

  • pos.draft-order-details.action.menu-item.render
  • pos.draft-order-details.action.render
  • pos.draft-order-details.block.render

Locale API

The Locale API allows the extension to retrieve the merchant's locale.

Navigation API

The Navigation API enables POS UI extension to navigate between screens. #### Supporting targets

  • pos.home.modal.render
  • pos.purchase.post.action.render
  • pos.product-details.action.render
  • pos.order-details.action.render
  • pos.draft-order-details.action.render
  • pos.customer-details.action.render

Order API

The Order API provides an extension with data about the current order. #### Supporting targets

  • pos.purchase.post.action.menu-item.render
  • pos.purchase.post.action.render
  • pos.purchase.post.block.render
  • pos.return.post.action.menu-item.render
  • pos.return.post.action.render
  • pos.return.post.block.render
  • pos.exchange.post.action.menu-item.render
  • pos.exchange.post.action.render
  • pos.exchange.post.block.render
  • pos.order-details.action.menu-item.render
  • pos.order-details.action.render
  • pos.order-details.block.render

Print API

The Print API enables document printing through the device's native print dialog (such as AirPrint on iOS or the system print dialog on Android). This API is designed for printing documents to standard printers, and does not support direct printing to receipt printers.

Product API

The Product API provides an extension with data about the current Product. #### Supporting targets

  • pos.product-details.action.menu-item.render
  • pos.product-details.action.render

ProductSearch API

The ProductSearch API gives extensions access to the native product search and fetching functionality of Shopify POS. The interface provides numerous functions to search for products by query, or to fetch the details of one or more products or product variants.

Scanner API

The Scanner API enables an extension to access scanner data and available scanning sources supported by the device. #### Supporting targets

  • pos.home.modal.render
  • pos.purchase.post.action.render
  • pos.product-details.action.render
  • pos.order-details.action.render
  • pos.draft-order-details.action.render
  • pos.customer-details.action.menu-item.render

Session API

The Session API contains the information about the current user session, and allows to fetch a fresh session token for communication with your apps backend service.

Storage API

The Storage API allows fetching, setting, updating, and clearing an extension's data from the POS local storage. - An extension can store up to 100 entries. - The maximum size for a key is ~1 KB, and for a value is ~1 MB. - If a target (such as pos.home.tile.render) is disabled or removed, the extension data remains. - All stored extension data that has not been updated for a month is cleared automatically after that period.

Toast API

The Toast API allows the display of a Toast component.