Skip to content

ffl_woo_sync.woocommerce.connect

Source: apps/ffl_woo_sync/ffl_woo_sync/woocommerce/connect.py · 2 endpoint(s)

Generated by make api-docs — do not edit by hand.

start_connect

POST /api/method/ffl_woo_sync.woocommerce.connect.start_connect

Auth (derived from code): Roles: System Manager

Begin a one-click connection: issue a one-time state and return the store's approval URL.

The saved Store URL is used; the browser is sent to WooCommerce's /wc-auth/v1/authorize page, which posts a new read/write REST key back to wc_auth_callback once the store owner approves.

Returns: {"url": <the store's wc-auth approval URL>}.

Raises: ValidationError: the Store URL is blank or not HTTPS, or (outside developer mode) this POS's own address is not HTTPS — set host_name in the site config.

apps/ffl_woo_sync/ffl_woo_sync/woocommerce/connect.py:169

wc_auth_callback

POST /api/method/ffl_woo_sync.woocommerce.connect.wc_auth_callback

Auth (derived from code): Guest — no session; the endpoint verifies the caller itself (HMAC signature, HTTP Basic credentials or a one-time token).

WooCommerce wc-auth callback: receives the REST key the store owner approved.

arg type required default description
user_id string | null no None The one-time state; valid for 15 minutes and spent on first use.
consumer_key string | null no None The new WooCommerce consumer key.
consumer_secret string | null no None The new WooCommerce consumer secret.
key_permissions string | null no None Must be read_write.
key_id — no None WooCommerce's id for the key (not used).

Payload: WooCommerce's JSON body {key_id, user_id, consumer_key, consumer_secret, key_permissions}. user_id carries the one-time state from start_connect.

Returns: 200 {"ok": true} once the key is stored and the rest of the connection is queued; 400 {"ok": false, "error"} for an unknown, expired or used state, a key that is not read/write, or a store that is no longer the one in Settings.

apps/ffl_woo_sync/ffl_woo_sync/woocommerce/connect.py:227