Skip to content

Developer Documentation

WooCommerce Zapier is built with third party developers in mind.

The WooCommerce REST API and WooCommerce webhooks are used extensively for the integration.

Heads Up

We are unable to provide support for writing custom code, so you may need to enlist the support of a professional WordPress/WooCommerce developer if you need assistance.

API Endpoints

Endpoint Used Methods API
/wc-zapier-auth/v1/authenticate POST Authentication
/wp-json/wc-zapier/v1/ GET REST Index
/wp-json/wc-zapier/v1/ping GET Auth test
/wp-json/wc-zapier/v1/coupons GET|POST|PUT|OPTIONS Coupons Resource
/wp-json/wc-zapier/v1/customers GET|POST|PUT|OPTIONS Customers Resource
/wp-json/wc-zapier/v1/orders GET|POST|PUT|OPTIONS Orders Resource
/wp-json/wc-zapier/v1/products GET|POST|PUT|OPTIONS Products Resource
/wp-json/wc-zapier/v1/subscriptions GET|POST|PUT|OPTIONS Subscriptions Resource1
/wp-json/wc-zapier/v1/webhooks POST|DELETE Webhooks
/wp-json/wc-zapier/v1/webhooks/topics/<resource> GET Webhooks Topics

Authentication

To authenticate, issue a POST request to the /wc-zapier-auth/v1/authenticate endpoint with a valid WordPress administrator username/password, and upon successful authentication the response will include a consumer key/secret what you can use for authorisation.

Authorisation

You may use HTTP Basic Auth header by providing the REST API Consumer Key as the username and the REST API Consumer Secret as the password.

curl https://www.example.com/wp-json/wc-zapier/v1/orders \
    -u consumer_key:consumer_secret

Occasionally some servers may not parse the Authorisation header correctly (if you see a “Consumer key is missing” error when authenticating over SSL, you have a server issue). In this case, you may provide the consumer key/secret as query string parameters instead.

REST API

The WooCommerce Zapier endpoint behaviours are based on the WooCommerce REST API version 3. For detailed information by endpoints, please see the original documentations:

Warning

Even though the WooCommerce Zapier integration is based on the above endpoints, it does not support the following functionality:

  • No batch actions.
  • No delete support (only create, update and search).
  • No subtype access. For example: Order notes, Product variation, Product attributes.

Extending Zapier Integration

Modifying or Extending Data and Fields

To customise (i.e. add to or modify) the WooCommerce data that is sent to a Zapier trigger via a Webhook, you have to add your data and/or fields to the relevant WooCommerce REST API endpoint.

This is typically done using readily available WooCommerce and WordPress filters and hooks to add your fields to WooCommerce’s built in REST API endpoints.

Modifying output data:

You can use the general WordPress rest_post_dispatch filter, or any other more Resource-specific WooCommerce filters.

Accessing incoming data:

You can use the general WooCommerce woocommerce_rest_$THIS->POST_TYPE_query filter, or any other more Resource or Actions specific WooCommerce filters.

Warning

If you are adding any new fields to the endpoints, please ensure that you add schema definitions for the new fields. This is required because the WooCommerce Zapier integration relies on endpoint schema definitions to understand which data fields are available for each resource/endpoint. For example you can use the woocommerce_rest_$OBJECT_TYPE_schema filter to do that.

Useful Documentation:

Translating

You can easily translate the WooCommerce Extension interface to your language using the provided languages/woocommerce-zapier.pot file as a starting point.

If you do translate WooCommerce Zapier, please contact us and send us the translation file so that we can include it in the extension for others to benefit from.

REST API Logs

To understand how WooCommerce Zapier uses the REST API, you may wish to install the REST API Log Plugin.

After installing the plugin, trigger a few of your Zaps and then navigate to WordPress DashboardSide MenuToolsRest API Log screen to see which endpoints are queried.


  1. Only available if the WooCommerce Subscriptions plugin is installed. 


Last update: July 13, 2020