Limio
WebsiteHelp Desk
  • Home
  • Custom Components
    • Getting Started with Custom Components
    • Connecting External CI
    • Development Guidelines
    • Prop Types
    • Custom subcomponents
    • Connecting to External Service
  • Limio SDK
    • Getting Started with Limio SDK
    • Basket (Cart), Promo Code
    • Page, Offer, and Add-On
    • User, Subscription, Invoice & Address
    • Advanced Methods
      • Express Checkout
      • Core Utilities and Helpers
  • API Docs
    • Authentication Schemes
      • OAuth Bearer Token
      • API Key (Catalog API-only)
    • Catalog API
    • Promo Codes API
    • Order API
    • Objects API
    • Shop Build & Publish API
    • External Identities API
  • Webhooks
    • Using Webhooks
    • Webhooks Overview
  • I want to...
    • Retrieve abandoned baskets
    • Enable self-service on a CPQ order
Powered by GitBook
On this page
  • Install the Limio SDK
  • Note about your development environment
  • Methods

Was this helpful?

  1. Limio SDK

Getting Started with Limio SDK

Simple steps to get you started using the Limio SDK.

PreviousConnecting to External ServiceNextBasket (Cart), Promo Code

Last updated 12 days ago

Was this helpful?

Install the Limio SDK

Install via npm or yarn:

$ npm install --save @limio/sdk

OR

$ yarn add @limio/sdk

Once installed you will be able to import methods from all of the listed at the bottom of this page. Here is a basic example of displaying your Limio offers inside a component using the SDK.

import React from "react"
import { useCampaign } from "@limio/sdk"

const Offers = () => {
  const { offers } = useCampaign()
  
  return (
    <section>
      {offers.map(offer => (
        <div>
          <h1>{offer.name}</h1>
          <button onClick={() => {
            // Actually adding items to the basket will be covered later on.
            console.log("Adding to basket")
          }}>
            Add to basket
          </button>
        </div>
      ))}
    </section>
  )
}

Note about your development environment

If you are building your components in your own development environment before uploading them to Limio, the package will automatically populate values with dummy data.

Methods

To find out about all of the methods available and how to use them, see the sections below:

Basket (Cart), Promo Code
Page, Offer, and Add-On
User, Subscription, Invoice & Address
Advanced Methods
modules