Installation

Install the package with:

npm install @rye-api/rye-sdk
# or
yarn add @rye-api/rye-sdk

Client initialization

The client needs to be created with your account’s API authorization header and Shopper IP, which is available in the Rye Console.

import { RyeClient, ENVIRONMENT } from "@rye-api/rye-sdk";

// Production
const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");

// Staging
const ryeClient = new RyeClient(
  "<AUTH_HEADER>",
  "<SHOPPER_IP>",
  ENVIRONMENT.STAGING,
);

Resources

npm package - https://www.npmjs.com/package/@rye-api/rye-sdk

GitHub repository - https://github.com/rye-com/rye-sdk