---
title: "Test a WooCommerce store connection"
method: POST
path: "/companies/{company}/woocommerce/stores/{store}/connection-test"
tags: ["WooCommerce"]
---

# Test a WooCommerce store connection

`POST /companies/{company}/woocommerce/stores/{store}/connection-test`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/woocommerce/stores/{store}/connection-test`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Test the connection with a connected WooCommerce store; it reads the store's system status and writes nothing.
- Returns 200 with `reachable`, `credential_accepted` and, on problems, a `failure_code` (e.g. `woocommerce_credentials_rejected`).
- Requires `Idempotency-Key`; an unknown store returns 404 `store_not_found`.

## Path parameters

- `company` string, uuid, required
- `store` string, uuid, required

## Headers

- `Idempotency-Key` string, required
- `Factuarea-Version` string, date

## Response `200`

- object
  - `data` WooCommerceConnectionCheck, required: The outcome of testing the connection with one of your connected WooCommerce stores. The public `id` is the UUID v7 of the STORE that was tested, so you can tell which shop this diagnosis is about. Nothing is stored: this resource is a diagnosis, not a record. Read `reachable` and `credential_accepted` together — `reachable: false` means the shop did not answer, while `reachable: true` with `credential_accepted: false` means it answered and rejected the credential — and read `failure_code` for the concrete cause, which is what tells «your key is not valid» apart from «your REST API is not published».
    - `id` string, uuid, required: UUID v7 of the store that was tested. Public identity (KEY `id`).
    - `object` 'woocommerce_connection_check', required: Stripe-like discriminator. Always `woocommerce_connection_check` for this resource.
    - `reachable` boolean, required: Whether the shop answered at all. `false` covers a timeout, a transport failure, a 5xx from the merchant hosting and a destination your company has not authorised for outbound traffic.
    - `credential_accepted` boolean, required: Whether the shop accepted the consumer key and secret. Always `false` when `reachable` is `false`: we never got to ask.
    - `store_version` string, nullable, required: WooCommerce version the shop reports, or `null` when it does not report one. Informational: nothing is gated on it.
    - `api_version` string, nullable, required: WordPress version the shop reports, or `null` when it does not report one. WooCommerce does not publish any REST API version of its own — the version this connector speaks (`wc/v3`) is fixed on our side, not something the shop reports — so this field carries the version of WordPress, which is what serves `/wp-json/`, decides whether the route exists depending on the permalink setting and therefore explains most failures of this surface. Informational: nothing is gated on it.
    - `failure_code` string, nullable, required: Code naming the concrete cause when the check did not succeed, or `null` when it did. Today `woocommerce_store_unreachable` (the shop did not answer — the only one worth retrying), `woocommerce_credentials_rejected` (the shop rejected the credential, or it could not be used) and `woocommerce_rest_route_missing` (the shop answered but its REST API is not published, usually because WordPress permalinks are on the plain setting). Not an exhaustive enumeration: new causes may appear without a breaking change, so treat an unknown value as a failure you cannot classify.
    - `checked_at` string, date-time, required: When the check ran (ISO 8601). Nothing is cached: every call tests the shop again.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `422`: Validation failed. The `error.param` field identifies which input is invalid.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
