Questions tagged [woocommerce-rest-api]

WooCommerce REST API is fully integrated with the WordPress REST API since WC version 2.6+, 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…

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.

Requirements: It’s required turn on the WordPress permalinks on Settings > Permalinks.

WooCommerce REST API Documentation

WooCommerce REST API

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

The default response format is . Requests with a message-body use plain to set or update resource attributes. Successful requests will return a 200 OK HTTP status...

796 questions
18
votes
2 answers

Applying coupons using woocommerce rest api

I am developing an application using WooCommerce rest API v3. Now I'm trying to integrate coupons from my WooCommerce website to my application. I'm creating order and applying coupons like this "coupon_lines":[{ 'code'=>'coupon1', …
SatheeshCK17
  • 449
  • 3
  • 14
16
votes
14 answers

WooCommerce - woocommerce_rest_cannot_view - Status 401

I have generated a consumer key and consumer secret. The website has SSL installed. I have also installed plugins required for JSON and REST services. This is how the url looks like: https:///wp-json/wc/v1/products When I am trying to get(GET)…
13
votes
4 answers

Can't POST/PUT/DELETE any products into WooCommerce by REST API

I'm using Wordpress 4.7.1 with Woocommerce 2.6.13 plugin with enabled REST API. I was created user credentials from console plugin UI with read_write permissions. Now I'm trying GET products using OAuth1: service return 200 OK, credentials are…
Sergey Nikitin
  • 763
  • 7
  • 22
11
votes
3 answers

"cannot list resources" error from WooCommerce REST API

I am very new to WordPres` and using the WooCommerce plugin for the first time and want to use the WooCommerce REST API in my Android app. I have enabled the REST API and created a Consumer Key as well as a Consumer secret. Now, when am using this…
DD77
  • 646
  • 1
  • 6
  • 23
11
votes
2 answers

WooCommerce REST API Custom Fields

Is it possible to access custom fields for orders, products, customers via WooCommerce REST API? If not natively, then what plugins or workarounds or hacks are out there that work? Thanks!
Amjad
  • 1,566
  • 5
  • 18
  • 40
9
votes
1 answer

How to implement OAuth 1.0a using retrofit for woocommerce Api in Android

I am currently working on a woocommerce api, I need to integrate the api using retrofit. The web site is in HTTP so HTTP Basic authentication cannot be used over plain HTTP as the keys are susceptible to interception. The API uses OAuth 1.0a…
Ramz
  • 6,858
  • 6
  • 59
  • 84
8
votes
1 answer

Creating coupon through API and ruby returns error: woocommerce_api_missing_coupon_data

I am trying to create a coupon though the rest api from my rails 4 app using the sample code from the documentation on this page: https://woocommerce.github.io/woocommerce-rest-api-docs/?ruby#create-a-coupon Here is the code I am using: data = { …
8
votes
1 answer

WooCommerce Order API always creates empty orders

Im playing around with Woo Commerce API (v3.4.4). I can get a product with: curl -X GET \ …
Mark
  • 4,544
  • 10
  • 46
  • 89
6
votes
1 answer

WooCommerce can't see product variations

I'm trying to manage WooCommerce entirely by its REST API but with no luck, i'm trying to insert a product with variations I can succesfully create a product with a POST to {{url}}/wp-json/wc/v3/products/ After product creation, i have to create…
Tizio Fittizio
  • 480
  • 5
  • 14
6
votes
6 answers

WooCommerce REST API - Filter Orders By Date Modified

I'm using the WooCommerce REST API (http://woocommerce.github.io/woocommerce-rest-api-docs/#introduction) and can download Customers, Orders, etc successfully. I'm now trying to get a filtered list of Orders where the Date Modified for the Order is…
6
votes
1 answer

Woocommerce Cash On Delivery Add Custom Field

How can I add a custom textarea field right below cah on delivery so when you click on the cash on delivery radio button a textarea appears to enter details that get saved into the order?
sebas
  • 692
  • 1
  • 6
  • 19
6
votes
1 answer

WooCommerce API: Create order with meta data on line item

I'm using this API to create orders in WooCommerce: https://github.com/kloon/WooCommerce-REST-API-Client-Library When I'm adding an order: $orderData = array( "order" => array( "line_items" => array( array( …
Dirk Pennings
  • 1,074
  • 9
  • 18
5
votes
2 answers

Is it possible to extend the woocommerce products rest endpoint?

Is there a way to extend the products-object in the woocommerce rest api /wp-json/wc/v3/products, in a non-destructive way, so plugins that uses that endpoint, doesn't break. I've currently tried create my own rest endpoint to replicate the object,…
Timm Jensen
  • 140
  • 10
5
votes
1 answer

WooCommerce REST API GET multiple products by ID

I need to display all related products by eah product I have in my list. Eg, In my app I have 3 products with id 1, 2, 3 product id 1 has 5,6,7 as related, product id 2 with related 8 and 9 etc.. Now I have an array with all the related…
5
votes
3 answers

WooCommerce REST API - Get all products with variations without too many requests

I'm using the WooCommerce REST API to e.g. get all products with variations, but I encounter a fairly large problem regarding the number of fired requests. I need help optimizing the situation below. Situation: A webshop with 50 products and 5…
Christian Gerdes
  • 232
  • 2
  • 14
1
2 3
53 54