<aside> 🚀 The following shows all of the currently available variables and functions in the UpCart public API. These are designed to be used by developers for custom integrations.

</aside>

Table of Contents

Introduction

The UpCart Public API gives you full access to customize your Shopify store utilizing UpCart to improve your customers experience. We also provide a list of event that you can subscribe to, based off of events that occur on upCart.

This documentation describes all currently available public API calls, properties, and examples. If your having trouble getting started, please reach out to https://www.aftersell.com/demo to get started.

Object Types Reference

Below are some types for objects that will be referenced in the API Reference

type PublicCart = {
  currency: string;
  items: PublicCartItem[];
  total: number;
  totalBeforeDiscounts: number;
};

type PublicCartItem = {
  key: string;
  handle: string;
  productId: number;
  quantity: number;
  title: string;
  variantId: number;
  finalLinePrice: number;
  isRewardItem: boolean;
  sellingPlanAllocation?: PublicCartItemSellingPlanAllocation;
  properties: Record<string, any>;
  vendor: string;
  productType: string;
};

type PublicCartItemSellingPlanAllocation {
  sellingPlan: PublicCartItemSellingPlan;
}

type PublicCartItemSellingPlan {
  id: number;
  name: string;
}

type PublicCartItemAdded = PublicCartItem & {
  quantityAdded: number;
};

interface PublicProduct {
  id: number;
  title: string;
  handle: string;
  variants: PublicProductVariant[];
  productType: string;
  vendor: string;
}

interface PublicProductVariant {
  id: number;
  title: string;
}

API Reference

window.upcartOpenOnAddToCartOverride

Summary

Override the user-specified setting of opening the cart when an item is added to the cart