|
1 | | -# WooCommerce Java REST API Client |
2 | | - |
3 | | -[](https://opensource.org/licenses/MIT) |
4 | | -[](https://www.java.com) |
5 | | - |
6 | | -A lightweight Java client library for WooCommerce REST API integration. Built for Java developers who need to integrate their applications with WooCommerce e-commerce platform. 🚀 |
7 | | - |
8 | | -This API client provides a type-safe Java interface for WooCommerce REST API v3, enabling seamless management of: |
9 | | -- WooCommerce products and inventory |
10 | | -- Customer data and orders |
11 | | -- E-commerce operations via REST API |
12 | | - |
13 | | -## ✨ Why Choose This Client? |
14 | | - |
15 | | -- 💡 **Type-Safe Java API** - fully typed interfaces for WooCommerce REST endpoints |
16 | | -- 🛡️ **Basic Authentication** - secure WooCommerce API access |
17 | | -- 📚 **Clear Documentation** - comprehensive examples for Java integration |
18 | | -- 🚀 **Wide Java Support** - compatible with Java 8 and newer |
19 | | -- ⚡ **OpenAPI Generated** - based on our [OpenAPI specification](https://github.com/wtx-labs/woocommerce-api-openapi-specification) developed from official WooCommerce documentation |
20 | | - |
21 | | -## 🎯 Currently Implemented Features |
22 | | - |
23 | | -- ✅ Products API |
24 | | - - List/search WooCommerce products |
25 | | - - Create/Read/Update/Delete products |
26 | | - - Filter products by status, date, stock status |
27 | | - - Manage product inventory |
28 | | -- ✅ Customers API |
29 | | - - List/search WooCommerce customers |
30 | | - - Create/Read/Update/Delete customers |
31 | | - - Search and filter customer data |
32 | | - - Manage customer accounts |
33 | | -- ✅ Orders API |
34 | | - - List/search WooCommerce orders |
35 | | - - Create/Read/Update/Delete orders |
36 | | - - Filter orders by status and date |
37 | | - - Process order management |
38 | | - |
39 | | -## 🚨 Project Status |
40 | | - |
41 | | -> ⚠️ **Note: This is an early development version!** |
42 | | -> |
43 | | -> We are actively implementing more WooCommerce API features. |
44 | | -> Contributions and feedback are welcome on GitHub! |
45 | | -
|
46 | | -## 📦 Version Information |
47 | | - |
48 | | -- **Current Version**: `0.1.5-alpha-20250412` |
49 | | -- **Supported WooCommerce API Version**: `v3` |
50 | | -- **Java Compatibility**: Java 8+ |
51 | | - |
52 | | - |
53 | | - |
54 | | -## 🔓 License |
55 | | - |
56 | | -**MIT License** |
57 | | - |
58 | | -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software. |
59 | | - |
60 | | -The only requirement is to preserve the original author attribution in the source code and documentation. |
61 | | - |
62 | | -## 🚀 Quick Start Guide |
63 | | - |
64 | | -### 1️⃣ Installation |
65 | | - |
66 | | -Clone and build the library from source: |
67 | | - |
68 | | -```sh |
69 | | -git clone https://github.com/wtx-labs/woocommerce-api-client-java.git |
70 | | -cd woocommerce-api-client-java |
71 | | -mvn clean install |
72 | | -``` |
73 | | - |
74 | | -Then add the locally built artifact to your project: |
75 | | - |
76 | | -```xml |
77 | | -<dependency> |
78 | | - <groupId>wtx.woocommerce</groupId> |
79 | | - <artifactId>woocommerce-api-client</artifactId> |
80 | | - <version>0.1.5-alpha-20250412</version> |
81 | | -</dependency> |
82 | | -``` |
83 | | - |
84 | | -### 2️⃣ Java Integration Example |
85 | | - |
86 | | -Here's how to fetch WooCommerce customer data using the client: |
87 | | - |
88 | | -```java |
89 | | -package wtx.woocommerce; |
90 | | - |
91 | | -import java.util.List; |
92 | | - |
93 | | -import wtx.woocommerce.api.client.CustomersApi; |
94 | | -import wtx.woocommerce.api.client.invoker.ApiException; |
95 | | -import wtx.woocommerce.api.client.model.Customer; |
96 | | - |
97 | | -public class WooCommerceApiClientUsageDemo { |
98 | | - |
99 | | - // TODO: Set your WooCommerce API base path! |
100 | | - private static final String API_BASE_PATH = "https://your-woocommerce-shop.com/wp-json/wc/v3"; |
101 | | - private static final String API_USERNAME = "TODO_SET_API_USERNAME"; |
102 | | - private static final String API_PASSWORD = "TODO_SET_API_PASSWORD"; |
103 | | - |
104 | | - public static void main(String[] args) { |
105 | | - |
106 | | - System.out.println(">>> Start running the WooCommerceApiClientUsageDemo..."); |
107 | | - |
108 | | - // Use WooCommerceApiClient(true) if you need to log API communication messages. |
109 | | - WooCommerceApiClient apiClient = new WooCommerceApiClient(); |
110 | | - |
111 | | - apiClient.setBasePath(API_BASE_PATH); |
112 | | - apiClient.setUsername(API_USERNAME); |
113 | | - apiClient.setPassword(API_PASSWORD); |
114 | | - |
115 | | - CustomersApi customersApi = new CustomersApi(apiClient); |
116 | | - |
117 | | - try { |
118 | | - |
119 | | - List<Customer> customers = customersApi.listAllCustomers( |
120 | | - null, null, null, null, null, null, null, null, null, null, null |
121 | | - ); |
122 | | - |
123 | | - // Example list of customer's emails: |
124 | | - customers.forEach(customer -> System.out.println("Customer: " + customer.getEmail())); |
125 | | - |
126 | | - } catch (ApiException e) { |
127 | | - System.err.println("Error occurred during API call: " + e); |
128 | | - } |
129 | | - |
130 | | - System.out.println("<<< The WooCommerceApiClientUsageDemo has been finished."); |
131 | | - |
132 | | - } |
133 | | - |
134 | | -} |
135 | | -``` |
136 | | - |
137 | | -## 🔗 Get Involved |
138 | | - |
139 | | -- ✨ Check our [GitHub Issues](https://github.com/wtx-labs/woocommerce-api-client-java/issues) for latest updates |
140 | | -- 💡 Have suggestions? Open an Issue or contribute to the project |
141 | | -- 🌟 Star this repository if you find it helpful! |
142 | | - |
143 | | -## 📊 Project Statistics |
144 | | - |
145 | | -- ⭐ 2 GitHub stars |
146 | | -- 🔄 Regular updates and improvements |
147 | | -- 👥 Open for community contributions |
148 | | - |
149 | | -## 🔍 Keywords |
150 | | - |
151 | | -woocommerce java client, woocommerce rest api java, java woocommerce integration, woocommerce api v3 java, e-commerce java integration, woocommerce java library, java rest api client woocommerce |
152 | | - |
153 | | -🚀 Happy coding! 😊 |
154 | | - |
| 1 | +# WooCommerce Java REST API Client |
| 2 | + |
| 3 | +[](https://opensource.org/licenses/MIT) |
| 4 | +[](https://www.java.com) |
| 5 | + |
| 6 | +A lightweight Java client library for WooCommerce REST API integration. Built for Java developers who need to integrate their applications with WooCommerce e-commerce platform. 🚀 |
| 7 | + |
| 8 | +This API client provides a type-safe Java interface for WooCommerce REST API v3, enabling seamless management of: |
| 9 | +- WooCommerce products and inventory |
| 10 | +- Customer data and orders |
| 11 | +- E-commerce operations via REST API |
| 12 | + |
| 13 | +## ✨ Why Choose This Client? |
| 14 | + |
| 15 | +- 💡 **Type-Safe Java API** - fully typed interfaces for WooCommerce REST endpoints |
| 16 | +- 🛡️ **Basic Authentication** - secure WooCommerce API access |
| 17 | +- 📚 **Clear Documentation** - comprehensive examples for Java integration |
| 18 | +- 🚀 **Wide Java Support** - compatible with Java 8 and newer |
| 19 | +- ⚡ **OpenAPI Generated** - based on our [OpenAPI specification](https://github.com/wtx-labs/woocommerce-api-openapi-specification) developed from official WooCommerce documentation |
| 20 | + |
| 21 | +## 🎯 Currently Implemented Features |
| 22 | + |
| 23 | +- ✅ Products API |
| 24 | + - List/search WooCommerce products |
| 25 | + - Create/Read/Update/Delete products |
| 26 | + - Filter products by status, date, stock status |
| 27 | + - Manage product inventory |
| 28 | +- ✅ Customers API |
| 29 | + - List/search WooCommerce customers |
| 30 | + - Create/Read/Update/Delete customers |
| 31 | + - Search and filter customer data |
| 32 | + - Manage customer accounts |
| 33 | +- ✅ Orders API |
| 34 | + - List/search WooCommerce orders |
| 35 | + - Create/Read/Update/Delete orders |
| 36 | + - Filter orders by status and date |
| 37 | + - Process order management |
| 38 | + |
| 39 | +## 🚨 Project Status |
| 40 | + |
| 41 | +> ⚠️ **Note: This is an early development version!** |
| 42 | +> |
| 43 | +> We are actively implementing more WooCommerce API features. |
| 44 | +> Contributions and feedback are welcome on GitHub! |
| 45 | +
|
| 46 | +## 📦 Version Information |
| 47 | + |
| 48 | +- **Current Version**: `0.1.5-alpha-20250412` |
| 49 | +- **Supported WooCommerce API Version**: `v3` |
| 50 | +- **Java Compatibility**: Java 8+ |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## 🔓 License |
| 55 | + |
| 56 | +**MIT License** |
| 57 | + |
| 58 | +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software. |
| 59 | + |
| 60 | +The only requirement is to preserve the original author attribution in the source code and documentation. |
| 61 | + |
| 62 | +## 🚀 Quick Start Guide |
| 63 | + |
| 64 | +### 1️⃣ Installation |
| 65 | + |
| 66 | +Clone and build the library from source: |
| 67 | + |
| 68 | +```sh |
| 69 | +git clone https://github.com/wtx-labs/woocommerce-api-client-java.git |
| 70 | +cd woocommerce-api-client-java |
| 71 | +mvn clean install |
| 72 | +``` |
| 73 | + |
| 74 | +Then add the locally built artifact to your project: |
| 75 | + |
| 76 | +```xml |
| 77 | +<dependency> |
| 78 | + <groupId>wtx.woocommerce</groupId> |
| 79 | + <artifactId>woocommerce-api-client</artifactId> |
| 80 | + <version>0.1.5-alpha-20250412</version> |
| 81 | +</dependency> |
| 82 | +``` |
| 83 | + |
| 84 | +### 2️⃣ Java Integration Example |
| 85 | + |
| 86 | +Here's how to fetch WooCommerce customer data using the client: |
| 87 | + |
| 88 | +```java |
| 89 | +package wtx.woocommerce; |
| 90 | + |
| 91 | +import java.util.List; |
| 92 | + |
| 93 | +import wtx.woocommerce.api.client.CustomersApi; |
| 94 | +import wtx.woocommerce.api.client.invoker.ApiException; |
| 95 | +import wtx.woocommerce.api.client.model.Customer; |
| 96 | + |
| 97 | +public class WooCommerceApiClientUsageDemo { |
| 98 | + |
| 99 | + // TODO: Set your WooCommerce API base path! |
| 100 | + private static final String API_BASE_PATH = "https://your-woocommerce-shop.com/wp-json/wc/v3"; |
| 101 | + private static final String API_USERNAME = "TODO_SET_API_USERNAME"; |
| 102 | + private static final String API_PASSWORD = "TODO_SET_API_PASSWORD"; |
| 103 | + |
| 104 | + public static void main(String[] args) { |
| 105 | + |
| 106 | + System.out.println(">>> Start running the WooCommerceApiClientUsageDemo..."); |
| 107 | + |
| 108 | + // Use WooCommerceApiClient(true) if you need to log API communication messages. |
| 109 | + WooCommerceApiClient apiClient = new WooCommerceApiClient(); |
| 110 | + |
| 111 | + apiClient.setBasePath(API_BASE_PATH); |
| 112 | + apiClient.setUsername(API_USERNAME); |
| 113 | + apiClient.setPassword(API_PASSWORD); |
| 114 | + |
| 115 | + CustomersApi customersApi = new CustomersApi(apiClient); |
| 116 | + |
| 117 | + try { |
| 118 | + |
| 119 | + List<Customer> customers = customersApi.listAllCustomers( |
| 120 | + null, null, null, null, null, null, null, null, null, null, null |
| 121 | + ); |
| 122 | + |
| 123 | + // Example list of customer's emails: |
| 124 | + customers.forEach(customer -> System.out.println("Customer: " + customer.getEmail())); |
| 125 | + |
| 126 | + } catch (ApiException e) { |
| 127 | + System.err.println("Error occurred during API call: " + e); |
| 128 | + } |
| 129 | + |
| 130 | + System.out.println("<<< The WooCommerceApiClientUsageDemo has been finished."); |
| 131 | + |
| 132 | + } |
| 133 | + |
| 134 | +} |
| 135 | +``` |
| 136 | + |
| 137 | +## 🔗 Get Involved |
| 138 | + |
| 139 | +- ✨ Check our [GitHub Issues](https://github.com/wtx-labs/woocommerce-api-client-java/issues) for latest updates |
| 140 | +- 💡 Have suggestions? Open an Issue or contribute to the project |
| 141 | +- 🌟 Star this repository if you find it helpful! |
| 142 | + |
| 143 | +## 📊 Project Statistics |
| 144 | + |
| 145 | +- ⭐ 2 GitHub stars |
| 146 | +- 🔄 Regular updates and improvements |
| 147 | +- 👥 Open for community contributions |
| 148 | + |
| 149 | +## 🔍 Keywords |
| 150 | + |
| 151 | +woocommerce java client, woocommerce rest api java, java woocommerce integration, woocommerce api v3 java, e-commerce java integration, woocommerce java library, java rest api client woocommerce |
| 152 | + |
| 153 | +🚀 Happy coding! 😊 |
| 154 | + |
155 | 155 | **Your WTX Labs Team** 🚀 |
0 commit comments