API Endpoints
The WooCommerce integration uses the WooCommerce REST API v3 only.
Base URL:
[Base URL] = [Store URL]/wp-json/wc/v3
The [Store URL] value is set on the iPaaS.com subscription, for example https://shop.example.com. For example, [Base URL]/products is https://shop.example.com/wp-json/wc/v3/products.
Every call goes over HTTPS. The integration reads and writes through these paths, so a firewall or security plugin in front of the store must allow both reading (GET) and writing (POST, PUT and DELETE) under /wp-json/wc/v3/.
Pagination
WooCommerce lists are paged with page and per_page.
WooCommerce allows at most 100 records a page. Order Page Size and Customer Page Size above 100 are treated as 100.
Reading stops on a short page, on the last page (WooCommerce's
X-WP-TotalPagesheader), or at the page limit, so a poll always ends.The order poll moves its watermark to the newest change it read. When there are more changed orders than one poll reads, the next poll continues from there.
The customer poll moves its watermark to the highest customer id it read. When it stops at its page limit before reaching the last customer already sent, it also saves a resume point, and the next poll sends the customers below it first.
Rate Limits
The WooCommerce REST API has no documented rate limit. The store's host, firewall or security plugin may set one.
A 429 or 503 answer raises
WOOC-EXTN-1005. iPaaS.com waits for the store'sRetry-Aftertime, else 60 seconds. A store in maintenance mode also answers 503.A read (GET) that meets another 5xx answer or no answer at all is tried once more within the call, after a short pause. Writes are never repeated by the call, because repeating a create could duplicate a record.
If the answer is still a 5xx, the integration raises
WOOC-EXTN-1004; network failures raiseWOOC-EXTN-1002. For both, iPaaS.com tries the transfer again automatically, and the re-run finds what an earlier attempt already made before writing.
Table of Contents
Connection Endpoints
Product Endpoints (FROM iPaaS.com)
Product Variant Endpoints (FROM iPaaS.com)
Stock Endpoints (FROM iPaaS.com)
Order Endpoints (TO iPaaS.com)
Customer Endpoints (TO iPaaS.com)
Customer Endpoints (FROM iPaaS.com)
Webhook Endpoints
Authorization
Connection Endpoints
List Products (GET)
Checks the REST API key when the connection is established. The store must answer with a list of products (an empty list is fine). WooCommerce's API index answers without a key on many stores, so the integration checks a real data call instead.
[Base URL]/products?per_page=1
List Webhooks (GET)
Sent only when the Store URL names a different store from the one the subscription first connected to. The integration looks for this subscription's webhooks in the store: when they are there, it is the same store at a new address and the connection continues; when they are not, the connection is refused (WOOC-BIZL-1014) and nothing is written to that store.
[Base URL]/webhooks?status=all&per_page=100&page={n}
Product Endpoints (FROM iPaaS.com)
Find a Product by SKU (GET)
Finds a product by SKU before creating it, so a retry links the product instead of duplicating it.
[Base URL]/products?sku={sku}&status=any&per_page=100
Create a Product (POST)
Creates a product: simple, grouped, external or variable (variable when it has variants). A product without a SKU, or of any other type, is refused before any call (WOOC-VALD-1005, WOOC-BIZL-1002).
[Base URL]/products
Get a Product (GET)
Reads a linked product before updating it.
[Base URL]/products/{id}
Update a Product (PUT)
Updates a product. Only the fields the mapping fills are sent, plus an empty sale price when a regular price is sent without one (which ends a sale), unless KeepStoreSalePrice is mapped to true.
[Base URL]/products/{id}
List a Product's Variations (GET)
Lists the product's existing variations, to match its variants by link, SKU or options.
[Base URL]/products/{id}/variations?per_page=100&page={n}
Create and Update Variations in a Batch (POST)
Creates and updates the product's variations, up to 100 per call. Every item's answer is checked.
[Base URL]/products/{id}/variations/batch
Find a Category (GET)
Finds a category by name under its parent.
[Base URL]/products/categories?search={name}&per_page=100&hide_empty=false&parent={id}
Create a Category (POST)
Creates a category that doesn't exist yet, after every category and tag of the product has been looked up.
[Base URL]/products/categories
Find a Tag (GET)
Finds a tag by name.
[Base URL]/products/tags?search={name}&per_page=100&hide_empty=false
Create a Tag (POST)
Creates a tag that doesn't exist yet.
[Base URL]/products/tags
Product Variant Endpoints (FROM iPaaS.com)
These run when a variant is transferred on its own. Variants sent with their product use the batch call above.
Get the Variant's Product (GET)
Reads the variant's product, to check it is a variable product and has the variant's options.
[Base URL]/products/{product_id}
Add the Variant's Options to the Product (PUT)
Adds the variant's options to the product's attributes. Sent only when an option is missing.
[Base URL]/products/{product_id}
Find a Variation by SKU (GET)
Finds a variation by SKU before creating it.
[Base URL]/products/{product_id}/variations?sku={sku}&per_page=100
List the Product's Variations (GET)
Lists the product's variations, to find one with the variant's options when none matches by SKU (or the variant has no SKU), so a retry links it instead of duplicating it.
[Base URL]/products/{product_id}/variations?per_page=100&page={n}
Create a Variation (POST)
[Base URL]/products/{product_id}/variations
Get a Variation (GET)
Reads a linked variation before updating it.
[Base URL]/products/{product_id}/variations/{id}
Update a Variation (PUT)
[Base URL]/products/{product_id}/variations/{id}
Stock Endpoints (FROM iPaaS.com)
Stock-only updates send nothing but manage_stock (always true) and stock_quantity.
Get a Product's Stock (GET)
Reads a product's current stock, when iPaaS.com reads the linked stock record.
[Base URL]/products/{id}
Update a Product's Stock (PUT)
[Base URL]/products/{id}
Get a Variation's Stock (GET)
Reads a variation's current stock, when iPaaS.com reads the linked stock record.
[Base URL]/products/{product_id}/variations/{id}
Update a Variation's Stock (PUT)
[Base URL]/products/{product_id}/variations/{id}
Order Endpoints (TO iPaaS.com)
Get an Order (GET)
Reads one order with its lines, fees, shipping, taxes, coupons, addresses, payment fields and the list of its refunds. Used for every order from a webhook or a poll, and to read an order's refunds after it reaches iPaaS.com.
[Base URL]/orders/{id}
Get a Refund (GET)
Reads one refund of an order: amount, reason, refunded lines, shipping and tax. Used for each refund sent as a Return transaction.
[Base URL]/orders/{order_id}/refunds/{refund_id}
List Changed Orders (GET)
Used by order/poll. Lists orders changed since the last poll, oldest change first. Each order's refunds are queued after the order.
[Base URL]/orders?modified_after={watermark}&dates_are_gmt=true&orderby=modified&order=asc&status=any&per_page={Order Page Size}&page={n}Parameter | Description |
| The |
|
|
| Oldest change first. |
|
|
| Order Page Size (default 50, at most 100) records a page. |
Customer Endpoints (TO iPaaS.com)
Get a Customer (GET)
Reads one customer with their billing and shipping addresses. Used for every customer from a webhook or a poll.
[Base URL]/customers/{id}
List Customers (GET)
Used by customer/poll. WooCommerce has no "changed since" filter for customers, so the poll lists customers by id and keeps those with an id above the highest one it has already seen.
[Base URL]/customers?orderby=id&order=desc&role=all&per_page={Customer Page Size}&page={n}Parameter | Description |
| Newest customer first, down to the last one already sent. |
|
|
| Customer Page Size (default 50, at most 100) records a page, newest customers first; the poll stops at the last customer it has already sent. At most 200 pages in one poll; a run that stops at that limit saves a resume point ( |
Customer Endpoints (FROM iPaaS.com)
Find a Customer by Email (GET)
Finds a customer by email before creating one, so an existing customer is linked instead of duplicated.
[Base URL]/customers?email={email}&role=all
Get the Store's Password Setting (GET)
Reads whether the store generates account passwords itself (and emails new customers a link to set one). Read only when a new customer has no password mapped; the answer is kept for ten minutes.
[Base URL]/settings/account/woocommerce_registration_generate_password
Create a Customer (POST)
Creates a customer. A mapped Password is sent only here, when a new account is created.
[Base URL]/customers
Get a Customer (GET)
Reads a linked customer before updating them, to compare each field with the WooCommerce Sync Baseline.
[Base URL]/customers/{id}
Update a Customer (PUT)
Updates a customer. Never carries a password, and keeps the store's username. Not sent when nothing differs from WooCommerce.
[Base URL]/customers/{id}
Webhook Endpoints
The integration manages its own webhooks when the order.created, order.updated, customer.created or customer.updated scope is turned on or off for the subscription.
List Webhooks (GET)
Finds this subscription's webhooks, by the subscription value in their delivery address and their topic. Also read at the start of each poll, and at connection when the Store URL names a different store.
[Base URL]/webhooks?status=all&per_page=100&page={n}
Register a Webhook (POST)
Registers a webhook for one topic.
[Base URL]/webhooks
Update a Webhook (PUT)
Sends status: active and the current delivery_url. At the start of each poll, it turns back on a webhook WooCommerce turned off after repeated failed deliveries, or moves one to the subscription's current webhook key. When a scope is turned on, it does the same for that scope's webhook and also keeps its name current.
[Base URL]/webhooks/{id}
Delete a Webhook (DELETE)
Removes the webhook when its scope is turned off, or removes a duplicate of it.
[Base URL]/webhooks/{id}?force=trueEach webhook posts the whole order or customer to iPaaS.com. iPaaS.com takes the scope from WooCommerce's X-WC-Webhook-Topic header and the record id from the body's id. The integration then reads the record again with Get an Order or Get a Customer.
Authorization
Every call carries the WooCommerce REST API key as HTTP Basic authentication over HTTPS: the Consumer Key is the user name and the Consumer Secret is the password. There is no token exchange, so there is no separate authorization endpoint.
Authorization: Basic <Consumer Key:Consumer Secret, base64-encoded>
The key is never put in a web address. The integration refuses a store address that starts with http:// (WOOC-VALD-1003). See WooCommerce Installation Instructions for how to create the key.
Related Documents
iPaaS.com <> WooCommerce: Background
