# Claim a pending store connection

> Attaches a store installed from the platform's app store, or connected in another browser, to the organization. The one-time token comes from the redirect…

Source: https://docs.pidgely.com/api-reference/commerce/claim-store/

`POST https://api.pidgely.com/commerce/stores/claim`

Attaches a store installed from the platform's app store, or connected in another browser, to the organization. The one-time token comes from the redirect (`?claim=`) and expires after an hour.

**Authorization:** `Bearer pdg_…`. An API key with `full_access`. A `sending_access` key gets `401 restricted_api_key`.

## Body parameters

JSON object.

| Name | Type | Required | Description |
|---|---|---|---|
| `token` | string | Yes | The API key. Shown only once. |

## Request

This endpoint is not in the [SDKs](https://docs.pidgely.com/sdks/) yet; call it over HTTP.

```bash tab="cURL"
curl -X POST 'https://api.pidgely.com/commerce/stores/claim' \
  -H "Authorization: Bearer $PIDGELY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "token": "token"
}'
```

## Response

`200 OK`

```json
{
  "object": "commerce",
  "id": "0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21",
  "platform": "nuvemshop",
  "name": "Example",
  "domain": "domain",
  "url": "https://acme.com/webhooks/pidgely",
  "currency": "currency",
  "locale": "locale",
  "status": "pending",
  "status_reason": "status_reason",
  "checkouts_supported": false,
  "sync": {
    "status": "idle",
    "mode": "backfill",
    "resource": "customers",
    "imported": {},
    "error": "error",
    "started_at": "2026-10-12 16:44:41.000000+00",
    "last_synced_at": "2026-10-12 16:44:41.000000+00",
    "next_sync_at": "2026-10-12 16:44:41.000000+00"
  },
  "counts": {
    "customers": 1,
    "products": 1,
    "orders": 1,
    "checkouts": 1
  },
  "email": {
    "from": "Acme <onboarding@acme.com>",
    "reply_to": "reply_to",
    "locale": "locale",
    "effective_locale": "effective_locale"
  },
  "connected_at": "2026-10-12 16:44:41.000000+00",
  "created_at": "2026-10-12 16:44:41.000000+00"
}
```

### Response fields

| Name | Type | Required | Description |
|---|---|---|---|
| `object` | string | Yes | Object type. One of `store`. |
| `id` | string | Yes | Unique id (UUID). UUID. |
| `platform` | string | Yes | One of `nuvemshop`, `shopify`, `woocommerce`, `vtex`. |
| `name` | string | Yes | Display name. |
| `domain` | string | Yes | — |
| `url` | string | Yes | Public `https` URL that receives the events. |
| `currency` | string | Yes | — |
| `locale` | string | Yes | — |
| `status` | string | Yes | Current status. One of `pending`, `connected`, `error`, `disconnected`. |
| `status_reason` | string | No | — |
| `checkouts_supported` | boolean | Yes | — |
| `sync` | object | Yes | — |
| `sync.status` | string | Yes | Current status. One of `idle`, `queued`, `running`, `failed`. |
| `sync.mode` | string | No | One of `backfill`, `reconcile`, `purge`. |
| `sync.resource` | string | No | One of `customers`, `products`, `orders`, `checkouts`. |
| `sync.imported` | object (map of integer) | Yes | Records read so far by the current or last sync, per resource. |
| `sync.error` | string | No | — |
| `sync.started_at` | string \| null | Yes | Format: `date-time`. |
| `sync.last_synced_at` | string \| null | Yes | Format: `date-time`. |
| `sync.next_sync_at` | string \| null | Yes | Format: `date-time`. |
| `counts` | object | Yes | — |
| `counts.customers` | integer | Yes | — |
| `counts.products` | integer | Yes | — |
| `counts.orders` | integer | Yes | — |
| `counts.checkouts` | integer | Yes | — |
| `email` | object | Yes | Email address. |
| `email.from` | string | Yes | — |
| `email.reply_to` | string | Yes | Reply-To address or list of addresses. |
| `email.locale` | string | Yes | — |
| `email.effective_locale` | string | Yes | — |
| `connected_at` | string \| null | Yes | Format: `date-time`. |
| `created_at` | string | Yes | Creation time, `YYYY-MM-DD HH:MM:SS.ffffff+00` (UTC). Format: `date-time`. |

## Errors

Errors have the shape `{"statusCode", "name", "message"}`. See [Errors](https://docs.pidgely.com/errors/) for the full list.

| Status | Name | When |
|---|---|---|
| 401 | `missing_api_key`, `restricted_api_key` | No `Authorization: Bearer` header, or a `sending_access` key called an endpoint that needs `full_access`. |
| 403 | `invalid_api_key`, `validation_error` | The API key is invalid or revoked, or the request is not allowed for this account (unverified domain, plan limit, paused account). |
| 404 | `not_found` | The resource does not exist in this account (or the id is not a valid UUID). |
| 409 | — | Conflict (store_connected_elsewhere, store_connecting, store_not_connected) |
| 429 | `rate_limit_exceeded` | Too many requests per second. Wait for `Retry-After` seconds. |
