TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Genuka JS SDK

The Genuka JavaScript SDK allows developers to easily integrate the features of the Genuka platform into their web applications. This SDK provides methods to manage companies, shops, products, pages, blogs, articles, collections, customers, addresses, orders, carts, and payment methods.


npm install genuka


yarn add genuka


To start using the SDK, you must first import it into your project and initialize it with your company information.

import genuka from "genuka";

// Initialize the instance with your company's domain
genuka.initialize({ domain: "" });



Initialize your company information before using the SDK.

await genuka.initialize({ domain: "" });

Retrieving Company Details

To retrieve your company details:

const company = await;


Listing Shops

List all available shops:

const shops = await genuka.shops.list();

Shop Details

To retrieve the details of a specific shop by its ID:

const shop = await genuka.shops.retrieve({ id: "01hhfzx7ftzrqjxhx8fbb6ddfs" });


Counting Products

To count all available products:

const productsCount = await genuka.products.count();

Listing Products

List all products:

const products = await genuka.products.list();

Product Details

To retrieve the details of a specific product by its ID:

const product = await genuka.products.retrieve({
  id: "01hkav9sz3qsj4tfdn3yd7214p",


Logging in a Customer

To log in a customer:

const { token, customer } = await genuka.customers.login({
  email: "",
  password: "password",

Retrieving Customer Details

To retrieve the details of the current customer:

const customerDetails = await genuka.customers.retrieve();

Sure, here are detailed sections of the documentation for the orders and carts parts of your Genuka package.


List All Orders for a Customer

To list all orders for a customer, you must first log in the customer and then use the list method:

// Log in the customer
const { token } = await genuka.customers.login({
  email: "",
  password: "password",

// List all orders for the customer
const orders = await genuka.orders.list();

Create an Order

To create a new order, use the create method. You must provide details about the customer, shipping, billing, and products included in the order:

const order = await genuka.orders.create({
  customer: {
    first_name: "John",
    last_name: "Doe",
    phone: "123456789",
    email: "",
  shipping: {
    mode: "delivery",
    amount: 0,
    address: {
      first_name: "John",
      last_name: "Doe",
      phone: "123456789",
      line1: "line1",
      line2: "line2",
      city: "city",
      state: "state",
      postal_code: "postal_code",
      country: "country",
  billing: {
    method: "cash",
    address: {
      first_name: "John",
      last_name: "Doe",
      phone: "123456789",
      line1: "line1",
      line2: "line2",
      city: "city",
      state: "state",
      postal_code: "postal_code",
      country: "country",
  products: [
      title: "My product here",
      price: 2000,
      quantity: 1,

(Note: Add more details and available configurations as needed for your API.)


Add to Cart

To add a product to the cart, use the add method by providing the necessary details:

  product_id: "product_id",
  variant_id: "variant_id",
  quantity: 1,
  price: 2000,

Retrieve Cart

To retrieve the current contents of the cart:

const cart = genuka.cart.retrieve();

Update Cart Item

To update the quantity of a specific item in the cart:

genuka.cart.update("variant_id", {
  quantity: 2,
const updatedCart = genuka.cart.retrieve();

Remove from Cart

To remove an item from the cart:

const cartAfterRemoval = genuka.cart.retrieve();

Clear Cart

To empty the cart:

const emptyCart = genuka.cart.retrieve();

(Note: This is a basic example for the most important sections. You should continue this pattern for all other methods and classes you have defined, such as pages, blogs, articles, collections, addresses, and paymentMethods.)


If you wish to contribute to this SDK, please contact us via Whatsapp (+237 6 95 76 25 95) or send an email to We welcome contributions in the form of pull requests, bug reports, and suggestions for new features.

Package Sidebar


npm i genuka

Weekly Downloads






Unpacked Size

86.7 kB

Total Files


Last publish


  • lamater