Java wrapper for WooCommerce REST API
Switch branches/tags
Clone or download
Failed to load latest commit information.
src Add the api version enum Feb 24, 2018
.gitignore Add .gitignore Sep 29, 2016
.travis.yml Fix Travis config Feb 28, 2018
LICENSE Initial commit Sep 29, 2016 Remove unused dependencies Feb 28, 2018
pom.xml Remove unused dependencies Feb 28, 2018

WooCommerce API Java Wrapper

Build Status

Java wrapper for WooCommerce REST API. The library supports the latest versions of WooCommerce REST API only with the OAuth 1.0a authentication over the HTTP protocol.


wc-api-java is available on maven central:



    public static void main(String[] args) {
        // Setup client
        OAuthConfig config = new OAuthConfig("", "consumerKey", "consumerSecret");
        WooCommerce wooCommerce = new WooCommerceAPI(config, ApiVersionType.V2);

        // Prepare object for request
        Map<String, Object> productInfo = new HashMap<>();
        productInfo.put("name", "Premium Quality");
        productInfo.put("type", "simple");
        productInfo.put("regular_price", "21.99");
        productInfo.put("description", "Pellentesque habitant morbi tristique senectus et netus");

        // Make request and retrieve result
        Map product = wooCommerce.create(EndpointBaseType.PRODUCTS.getValue(), productInfo);


        // Get all with request parameters
        Map<String, String> params = new HashMap<>();
        List products = wooCommerce.getAll(EndpointBaseType.PRODUCTS.getValue(), params);