Socket
Book a DemoInstallSign in
Socket

apimatic-woo-commerce-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apimatic-woo-commerce-sdk

WooCommerce API is a REST API for WordPress that enables developers to manage products, orders, customers, and store settings, making it easy to build and extend custom eCommerce solutions.

1.0.0
latest
npmnpm
Version published
Weekly downloads
65
Maintainers
1
Weekly downloads
 
Created
Source

Getting Started with WooCommerce REST API

Introduction

Taken from: https://github.com/woocommerce/woocommerce-rest-api-docs

Introduction

WooCommerce (WC) 2.6+ is fully integrated with the WordPress REST API. This allows WC data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients.

The current WP REST API integration version is v3 which takes a first-order position in endpoints.

The following table shows API versions present in each major version of WooCommerce:

API VersionWC VersionWP VersionDocumentation
`v3`3.5.x or later4.4 or later-
`v2`3.0.x or later4.4 or later[v2 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/wp-api-v2.html)
`v1`2.6.x or later4.4 or later[v1 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/wp-api-v1.html)

Prior to 2.6, WooCommerce has had a REST API separate from WordPress which is now known as the legacy API. You can find the documentation for the legacy API separately.

API VersionWC VersionWP VersionDocumentation
`Legacy v3`2.4.x or later4.1 or later[Legacy v3 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v3.html)
`Legacy v2`2.2.x or later4.1 or later[Legacy v2 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v2.html)
`Legacy v1`2.1.x or later4.1 or later[Legacy v1 docs](https://woocommerce.github.io/woocommerce-rest-api-docs/v1.html)

Requirements

To use the latest version of the REST API you must be using:

  • WooCommerce 3.5+.
  • WordPress 4.4+.
  • Pretty permalinks in Settings > Permalinks so that the custom endpoints are supported. Default permalinks will not work.
  • You may access the API over either HTTP or HTTPS, but HTTPS is recommended where possible.

If you use ModSecurity and see 501 Method Not Implemented errors, see this issue for details.

Install the Package

Run the following command from your project directory to install the package from npm:

npm install apimatic-woo-commerce-sdk@1.0.0

For additional package details, see the Npm page for the apimatic-woo-commerce-sdk@1.0.0 npm.

Test the SDK

To validate the functionality of this SDK, you can execute all tests located in the test directory. This SDK utilizes Jest as both the testing framework and test runner.

To run the tests, navigate to the root directory of the SDK and execute the following command:

npm run test

Or you can also run tests with coverage report:

npm run test:coverage

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

ParameterTypeDescription
environmentEnvironmentThe API environment.
Default: Environment.Production
timeoutnumberTimeout for API calls.
Default: 0
httpClientOptionsPartial<HttpClientOptions>Stable configurable http client options.
unstableHttpClientOptionsanyUnstable configurable http client options.
basicAuthCredentialsBasicAuthCredentialsThe credential object for basicAuth

The API client can be initialized as follows:

import { Client, Environment } from 'apimatic-woo-commerce-sdk';

const client = new Client({
  basicAuthCredentials: {
    username: 'username',
    password: 'password'
  },
  timeout: 0,
  environment: Environment.Production,
});

Authorization

This API uses the following authentication schemes.

List of APIs

SDK Infrastructure

Configuration

HTTP

Utilities

FAQs

Package last updated on 29 Aug 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.