> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetSiteReadiness

# Package: googleSearchConsole

# Namespace: GscService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/google-search-console/site-readiness-v1/get-site-readiness.md

## Permission Scopes:
View SEO Settings: SCOPE.PROMOTE.VIEW-SEO

## Introduction

Retrieves the site's readiness in Google Search Console.

Returns whether the site's Google connection and ownership verification
are in place, and if not, the first blocking step. Use this to decide what
to resolve next — for example, a `SITE_OWNER_NOT_VERIFIED` blocking reason
means the site's ownership isn't proven to Google yet, so call Verify
Site.

---

## REST API

### Schema

```
 Method: getSiteReadiness
 Description: Retrieves the site's readiness in Google Search Console.  Returns whether the site's Google connection and ownership verification are in place, and if not, the first blocking step. Use this to decide what to resolve next — for example, a `SITE_OWNER_NOT_VERIFIED` blocking reason means the site's ownership isn't proven to Google yet, so call Verify Site.
 URL: https://www.wixapis.com/gsc/connection/v1/site-readiness
 Method: GET
 Return type: GetSiteReadinessResponse
  - name: siteReadiness | type: SiteReadiness | description: The site's current Google Search Console readiness.  
     - name: status | type: ReadinessStatus | description: Whether the site has completed Google Search Console setup.  | read-only: true 
         - enum:
         -     UNKNOWN_READINESS_STATUS: Unknown readiness status.
         -     READY: The site is fully set up in Google Search Console.
         -     NOT_READY: Setup isn't complete. See `blockingReason` for the step that's missing.
     - name: blockingReason | type: BlockingReason | description: The first setup step that's still blocking the site. Only returned when `status` is `NOT_READY`.  | read-only: true 
         - enum:
         -     UNKNOWN_BLOCKING_REASON: Unknown blocking reason.
         -     TOKEN_INVALID: The stored Google credentials are no longer usable. Reconnect the Google account with the GSC Connection API.
         -     SITE_OWNER_NOT_VERIFIED: Site ownership hasn't been verified with Google. Call Verify Site.
         -     DOMAIN_MISSING: The site doesn't have a premium domain, which Google Search Console setup requires.
         -     SITE_NOT_CREATED: The site hasn't been created yet.


```

### Examples

### Get Site Readiness
```curl
curl -X GET \
'https://www.wixapis.com/gsc/v1/site-readiness' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.gsc.siteReadiness.getSiteReadiness()
 Description: Retrieves the site's readiness in Google Search Console.  Returns whether the site's Google connection and ownership verification are in place, and if not, the first blocking step. Use this to decide what to resolve next — for example, a `SITE_OWNER_NOT_VERIFIED` blocking reason means the site's ownership isn't proven to Google yet, so call Verify Site.
 Return type: PROMISE<GetSiteReadinessResponse>
  - name: siteReadiness | type: SiteReadiness | description: The site's current Google Search Console readiness.  
     - name: status | type: ReadinessStatus | description: Whether the site has completed Google Search Console setup.  | read-only: true 
         - enum:
         -     UNKNOWN_READINESS_STATUS: Unknown readiness status.
         -     READY: The site is fully set up in Google Search Console.
         -     NOT_READY: Setup isn't complete. See `blockingReason` for the step that's missing.
     - name: blockingReason | type: BlockingReason | description: The first setup step that's still blocking the site. Only returned when `status` is `NOT_READY`.  | read-only: true 
         - enum:
         -     UNKNOWN_BLOCKING_REASON: Unknown blocking reason.
         -     TOKEN_INVALID: The stored Google credentials are no longer usable. Reconnect the Google account with the GSC Connection API.
         -     SITE_OWNER_NOT_VERIFIED: Site ownership hasn't been verified with Google. Call Verify Site.
         -     DOMAIN_MISSING: The site doesn't have a premium domain, which Google Search Console setup requires.
         -     SITE_NOT_CREATED: The site hasn't been created yet.


```

### Examples

### Get the site's Google Search Console readiness
```javascript
import { siteReadiness } from "@wix/gsc";

async function getSiteReadiness() {
  const response = await siteReadiness.getSiteReadiness();
}

/* Promise resolves to:
 * {
 *   "siteReadiness": {
 *     "status": "NOT_READY",
 *     "blockingReason": "SITE_OWNER_NOT_VERIFIED"
 *   }
 * }
 */

```

### getSiteReadiness (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { siteReadiness } from '@wix/gsc';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { siteReadiness },
  // Include the auth strategy and host as relevant
});


async function getSiteReadiness() {
  const response = await myWixClient.siteReadiness.getSiteReadiness();
};
```

---