You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/wp-api-v1/_introduction.md
+19-29Lines changed: 19 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,19 @@
1
1
# Introduction #
2
2
3
-
WooCommerce 2.6+ is fully integrated with the WordPress [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) API. This allows WooCommerce 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.
3
+
WooCommerce (WC) 2.6+ is fully integrated with the WordPress [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) 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.
4
4
5
-
The current WP REST API integration version is `v1` which takes a first-order position in endpoints. The following table shows API versions present in each major version of WooCommerce:
5
+
The following table shows API versions present in each major version of WooCommerce:
6
6
7
-
| Version | WooCommerce Version | WordPress Version |
|`Legacy v3`| 2.4.x or later | 4.1 or later |[Legacy v3 docs](v3.html)|
11
+
|`Legacy v2`| 2.2.x or later | 4.1 or later |[Legacy v2 docs](v2.html)|
12
+
|`Legacy v1`| 2.1.x or later | 4.1 or later |[Legacy v1 docs](v1.html)|
13
+
14
+
The current WP REST API integration version is `v1` which takes a first-order position in endpoints.
15
+
16
+
Prior to 2.6, WooCommerce had it's own REST API separate from WordPress. The main differences between the new API and legacy API are that WordPress now handles authentication, there are new new formats and parameters for all objects, and we've adopted the use of schemas for all endpoints (accessed when doing OPTIONS requests).
10
17
11
18
## Requirements ##
12
19
@@ -20,26 +27,9 @@ To use the latest version of the REST API you must be using:
20
27
If you use ModSecurity and see `501 Method Not Implemented` errors, see [this issue](https://github.com/woothemes/woocommerce/issues/9838) for details.
21
28
22
29
<asideclass="notice">
23
-
Note that is <strong>NOT REQUIRED</strong> install the <a href="https://wordpress.org/plugins/rest-api/" target="_blank">WP REST API (WP API)</a> plugin.
30
+
Please note that you are <strong>not</strong> required to install the <a href="https://wordpress.org/plugins/rest-api/" target="_blank">WP REST API (WP API)</a> plugin to use the WC REST API - the WC REST API runs independently.
24
31
</aside>
25
32
26
-
## Legacy API ##
27
-
28
-
Prior to 2.6, WooCommerce had it's own REST API independent from WordPress. The differences between the new API and legacy API are as follows:
29
-
30
-
* In the new API, the WordPress REST API handles authentication instead of our API.
31
-
* The WP REST API integration includes batch endpoints for coupons, customers, orders, refunds, products, attributes, categories, tags, taxes and webhooks.
32
-
* New formats and parameters for coupons, orders, products and some taxomonies to reflect changes in the WooCommerce core.
33
-
* We've adopted the use of schemas for all endpoints (accessed when doing OPTIONS requests).
34
-
35
-
Our API Keys, authentication endpoint and webhooks still work with the new API.
36
-
37
-
Documentation for the legacy APIs can be found below:
38
-
39
-
*[WooCommerce REST API v1 docs](v1.html)
40
-
*[WooCommerce REST API v2 docs](v2.html)
41
-
*[WooCommerce REST API v3 docs](v3.html)
42
-
43
33
## Request/Response Format ##
44
34
45
35
The default response format is JSON. Requests with a message-body use plain JSON to set or update resource attributes. Successful requests will return a `200 OK` HTTP status.
0 commit comments