---
search:
  tags:
    - Connectors
    - POST
seo:
  description: >-
    Creates a connector in pairing state for the store and returns a… Reference
    for the POST /stores/{store_id}/connectors/pairing endpoint in the Sarvex V1
    API.
sidebar:
  label: Begin connecting a store
  badge: POST
title: Begin connecting a store
type: openapi-operation
---
Creates a connector in `pairing` state for the store and returns a one-time pairing code for
the plugin. Store-scoped like every other per-store resource: a merchant may have several
stores, so the store cannot be inferred from the bearer. The store must belong to the
caller's merchant (404 otherwise).

`POST /stores/{store_id}/connectors/pairing`

**Request body** (`application/json`, required)

- `platform` (platform, required) — Connectable commerce backends: WooCommerce and Magento. The model and enum extend to further platform types without structural change.

Request body example:

```json
{
  "platform": "woocommerce"
}
```

**Responses**

- `201` — Connector created in pairing state.
- `404` — Resource not found within the caller's tenant.
- `422` — Request body failed validation.

Response example, 201:

```json
{
  "connector_id": "string",
  "store_id": "string",
  "platform": "woocommerce",
  "connector_type": "commerce",
  "status": "pairing",
  "sync_model": "realtime",
  "last_signal_at": "2019-08-24T14:15:22Z",
  "last_full_sync_at": "2019-08-24T14:15:22Z",
  "last_heartbeat_at": "2019-08-24T14:15:22Z",
  "freshness_warning": true,
  "plugin_version": "string",
  "profile_serving": {
    "profile_route_ok": true,
    "last_profile_served_at": "2019-08-24T14:15:22Z",
    "serving_from_cache": true,
    "advertised_endpoint": "string"
  },
  "pairing_code": "string"
}
```

Response example, 404:

```json
{
  "error": {
    "code": "not_found",
    "message": "Resource not found.",
    "details": null
  }
}
```

Response example, 422:

```json
{
  "error": {
    "code": "validation_error",
    "message": "One or more fields are invalid.",
    "details": {
      "fields": {
        "email": "must be a valid email address"
      }
    }
  }
}
```
