Connectors
Inbound product/order import connectors — Shopify, YouCan, Google Sheets, Facebook Lead Ads — connect, pull, and webhook sync.
Connectors import products and orders from external platforms into Feeef and keep them in
sync. Four types exist: shopify, youcan, google_sheets, and facebook_leads. Connector
configs live under store.integrations.connectors.connectors[]; reads always strip auth
secrets (only auth.authType survives serialization).
Two sync directions per connector:
- Pull — you (or the dashboard) trigger an import of
productsand/ororders. - Push — the platform calls a public Feeef webhook on changes (Shopify webhooks, YouCan resthooks, Google Drive watch channels, Facebook leadgen subscriptions), registered automatically at install time.
Management API — at a glance
| Method | Path | Description | Auth |
|---|---|---|---|
GET | /v1/stores/{storeId}/integrations/connectors | List connectors (secrets stripped) | Bearer |
POST | /v1/stores/{storeId}/integrations/connectors | Create a non-OAuth connector (apiKey / public auth) | Bearer |
DELETE | /v1/stores/{storeId}/integrations/connectors/{connectorId} | Remove a connector | Bearer |
POST | /v1/stores/{storeId}/integrations/connectors/{connectorId}/pull | Import now — body { "resources": ["products", "orders"] } | Bearer |
POST | /v1/stores/{storeId}/integrations/connectors/{connectorId}/webhooks | Re-register platform webhooks/watches | Bearer |
GET | /v1/integrations/connectors/mobile-result?nonce={nonce} | One-time OAuth outcome after a native deep-link | Public |
Writes require an editor/admin/owner role on the store. OAuth-based connectors (all four
platforms in practice) must be created through the install flow below — POST …/connectors
rejects authType: "oauth2".
OAuth install flow
Get an install URL — GET …/connectors/{platform}/install-url returns
{ "installUrl": "…" }. Optional query params: popup=true (web popup instead of full
redirect), origin (postMessage target), callbackScheme (native deep-link scheme for
mobile).
Open it — the merchant authorizes on the platform (Shopify consent screen, YouCan OAuth, Google account picker, Facebook login).
Feeef handles the callback — GET /v1/integrations/connectors/{platform}/callback
(Public) exchanges the code, saves the connector with its tokens, registers webhooks, and
kicks off an initial pull. Browsers get redirected/postMessaged back; native apps receive a
deep link with a nonce.
Native apps fetch the outcome — GET /v1/integrations/connectors/mobile-result?nonce=…
returns the one-time result (short TTL).
Start an install
curl -H "Authorization: Bearer $FEEEF_TOKEN" \
"https://api.feeef.org/v1/stores/{storeId}/integrations/connectors/shopify/install-url?shop=my-shop.myshopify.com"Pull products and orders
curl -X POST "https://api.feeef.org/v1/stores/{storeId}/integrations/connectors/{connectorId}/pull" \
-H "Authorization: Bearer $FEEEF_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "resources": ["products"] }'Omitting resources pulls both (Facebook Leads pulls orders only — leads become orders).
Platform specifics
Shopify
| Method | Path | Description | Auth |
|---|---|---|---|
GET | /v1/stores/{storeId}/integrations/connectors/shopify/install-url?shop={shop} | OAuth URL for {shop}.myshopify.com | Bearer |
GET | /v1/stores/{storeId}/integrations/connectors/shopify/install | Redirect variant of the above | Bearer |
GET | /v1/integrations/connectors/shopify/callback | OAuth callback | Public |
POST | /v1/integrations/connectors/shopify/webhook | Order/product event receiver (HMAC-verified) | Public |
Ships with default order/product field mappings; the callback registers order + product webhooks and runs the initial pull.
YouCan
| Method | Path | Description | Auth |
|---|---|---|---|
GET | /v1/stores/{storeId}/integrations/connectors/youcan/install-url | OAuth URL | Bearer |
GET | /v1/stores/{storeId}/integrations/connectors/youcan/install | Redirect variant | Bearer |
GET | /v1/integrations/connectors/youcan/callback | OAuth callback | Public |
POST | /v1/integrations/connectors/youcan/webhook/{storeId}/{connectorId} | Resthook receiver | Public |
Google Sheets (import)
Reads order rows from a spreadsheet you pick, mapped column-by-column.
| Method | Path | Description | Auth |
|---|---|---|---|
GET | …/connectors/google-sheets/install-url | Reuses an existing Google OAuth grant when present, else returns an install URL | Bearer |
GET | …/connectors/{connectorId}/google-sheets/spreadsheets | List Drive spreadsheets | Bearer |
POST | …/connectors/{connectorId}/google-sheets/spreadsheets | Create a spreadsheet | Bearer |
GET | …/connectors/{connectorId}/google-sheets/spreadsheets/{spreadsheetId}/tabs | List sheet tabs | Bearer |
GET | …/connectors/{connectorId}/google-sheets/spreadsheets/{spreadsheetId}/sheets/{sheetName}/headers | Read header row | Bearer |
POST | …/connectors/{connectorId}/google-sheets/configure | Bind spreadsheet + tab, set up the Drive watch | Bearer |
POST | …/connectors/{connectorId}/google-sheets/field-mapping | Update column → order-field mapping | Bearer |
POST | /v1/integrations/connectors/google-sheets/webhook/{storeId}/{connectorId} | Drive change notifications | Public |
The base path for the Bearer rows above is /v1/stores/{storeId}/integrations. Drive watch
channels expire and are re-armed via the generic …/{connectorId}/webhooks endpoint.
Dart helpers: prepareGoogleSheetsConnector, listGoogleSpreadsheets,
createGoogleSpreadsheet, listGoogleSheetTabs, fetchGoogleSheetHeaders,
configureGoogleSheetsConnector, updateGoogleSheetsFieldMapping on
Feeef.instance.connectors.
This is the import direction. The separate googleSheet store integration (order export
to a sheet) uses GET /v1/oauth2/google/sheets/auth-url + the /v1/oauth2/google/sheets
callback, POST /v1/stores/{storeId}/integrations/google-sheets/sync-headers,
GET …/google-sheets/list and POST …/google-sheets/create — configure it via the
integrations config API under the googleSheet key.
Facebook Lead Ads
Turns leadgen form submissions into Feeef orders.
| Method | Path | Description | Auth |
|---|---|---|---|
GET | …/connectors/facebook-leads/install-url | Facebook OAuth URL | Bearer |
GET | …/connectors/facebook-leads/install | Redirect variant | Bearer |
GET | /v1/integrations/connectors/facebook-leads/callback | OAuth callback | Public |
GET | …/connectors/facebook-leads/pages | Pages the connected account manages | Bearer |
GET | …/connectors/facebook-leads/forms | Lead forms for a page | Bearer |
POST | …/connectors/facebook-leads/configure | Bind page + forms, subscribe the page to leadgen | Bearer |
POST | …/connectors/{connectorId}/facebook-leads/reconfigure | Change page/forms on an existing connector | Bearer |
GET / POST | /v1/integrations/connectors/facebook-leads/webhook | Verification challenge + lead events | Public |
Bearer rows are under /v1/stores/{storeId}/integrations. Dart helpers:
getFacebookLeadsInstallUrl, listFacebookPages, listFacebookLeadForms,
configureFacebookLeadsConnector.
One-shot catalog importers
Separate from connectors, /v1/actions has stateless product scrapers/importers (Bearer):
GET fetchYoucanProductsByHost, GET fetchWoocommerceProductsByHost,
GET fetchFoorwebProductsBySubdomain, GET fetchStoreinoProductsByUrl,
GET fetchLightfunnelsProductByUrl. They fetch product data by URL for import wizards — no
config stored, no sync.
Related
- Integrations — the
connectorsconfig envelope and billing - Marketing — Meta ads integration and pixel server events
- Webhooks — outbound order and product events to your own endpoints (inbound connector writes are skipped so they do not echo back to you)