Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ecwid-api-client

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecwid-api-client

TypeScript client for the Ecwid E-commerce REST API

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

ecwid-api-client

Strongly typed TypeScript/JS client for the Ecwid REST API.

Requirements

  1. API token and Store ID from Ecwid CP Apps -> My Apps
  2. Axios

Sample Usage in JavaScript

import {Ecwid} from "ecwid-api-client";

const ecwidConfig = {
  apiToken: "secret_12345",
  apiStoreId: "123456"
}

const ecwid = new Ecwid(ecwidConfig);

const productSearch = await ecwid.products.getAll();

if (productSearch.total > 0) {
  productSearch.items.forEach((product) =>
          console.log(product.name));
}

List of endpoints and commands enabled:

* Ecwid.customers
    * add(Partial<Customer>) => CreateStatus
    * delete(customerId) => DeleteStatus
    * getAll() => SearchResult<Customer>  (result.items contains customer array);
    * getById(customerId) => Customer
    * getByKeyword("keyword") => SearchResult<Customer>
    * getByParams({keyword: "keyword"}) => SearchResult<OrderEntry>
    * update(Partial<OrderEntry>) => UpdateStatus  
* Ecwid.orders
    * add(Partial<OrderEntry>) => CreateStatus
    * delete(orderId) => DeleteStatus
    * getAll() => SearchResult<OrderEntry>  (result.items contains OrderEntry array);
    * getById(orderId) => OrderEntry
    * getByKeyword("keyword") => SearchResult<OrderEntry>
    * getByParams({keyword: "keyword"}) => SearchResult<OrderEntry>
    * update(Partial<OrderEntry>) => UpdateStatus
* Ecwid.products
    * add(Partial<Product>) => CreateStatus
    * delete(productId) => DeleteStatus
    * getAll() => SearchResult<Product>  (result.items contains Product array);
    * getById(productId) => Product
    * getByKeyword("keyword") => SearchResult<Product>
    * getByParams({keyword: "keyword"}) => SearchResult<Product>
    * update(Partial<Product>) => UpdateStatus
* Ecwid.producttypes
    * add(Partial<ProductType>) => CreateStatus
    * delete(ProductTypeId) => DeleteStatus
    * getAll() => ProductType[]  (result is an array of ProductTypes);
    * getById(typeId) => ProductType
    * update(Partial<ProductType>) => UpdateStatus

To be completed:

  • Check OrderID will work with "strings" returned - and accept them as input.
  • Add product variations
  • Add store detail access
  • Add image uploading to various endpoints

Keywords

FAQs

Package last updated on 09 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc