> 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: bingWebmasterTools

# Namespace: BwtService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/bing-webmaster-tools/site-readiness-v1/get-site-readiness.md

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

## Introduction

Retrieves the site's readiness in Bing Webmaster Tools.

Returns whether the site's Bing setup is complete, and if not, the first
blocking step. Use this to decide what to resolve next. For example, a
`SITE_NOT_ADDED` blocking reason means the site isn't in the connected
Bing account yet, so call Add Site.

Setup steps are checked in order, and only the first missing one is
returned: `NOT_CONNECTED`, `SITE_NOT_PUBLISHED`, `DOMAIN_NOT_CONNECTED`,
`SITE_NOT_ADDED`, then `SITE_OWNER_NOT_VERIFIED`. Readiness is read live
from Bing and changes nothing.

---

## REST API

### Schema

```
 Method: getSiteReadiness
 Description: Retrieves the site's readiness in Bing Webmaster Tools.  Returns whether the site's Bing setup is complete, and if not, the first blocking step. Use this to decide what to resolve next. For example, a `SITE_NOT_ADDED` blocking reason means the site isn't in the connected Bing account yet, so call Add Site.  Setup steps are checked in order, and only the first missing one is returned: `NOT_CONNECTED`, `SITE_NOT_PUBLISHED`, `DOMAIN_NOT_CONNECTED`, `SITE_NOT_ADDED`, then `SITE_OWNER_NOT_VERIFIED`. Readiness is read live from Bing and changes nothing.
 URL: https://www.wixapis.com/gsc/connection/v1/bing/site-readiness
 Method: GET
 Return type: GetSiteReadinessResponse
  - name: siteReadiness | type: SiteReadiness | description: The site's current Bing Webmaster Tools readiness.  
     - name: status | type: ReadinessStatus | description: Whether the site has completed Bing Webmaster Tools setup.  | read-only: true 
         - enum:
         -     UNKNOWN_READINESS_STATUS: Unknown readiness status.
         -     READY: The site is fully set up in Bing Webmaster Tools.
         -     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.
         -     NOT_CONNECTED: The site has no Bing account connected: it was never connected, the connection was removed, or Bing no longer accepts the stored credentials. Connect a Bing account with the BWT Connection API.
         -     SITE_NOT_PUBLISHED: The site is not published. Publish it first.
         -     DOMAIN_NOT_CONNECTED: The site has no connected domain. Connect a domain first.
         -     SITE_NOT_ADDED: The connection works, but the site isn't in the connected Bing account yet. Call Add Site.
         -     SITE_OWNER_NOT_VERIFIED: The site is in the connected Bing account, but its ownership isn't verified yet. Call Verify Site.

 Possible Errors:
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

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

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bwt.siteReadiness.getSiteReadiness()
 Description: Retrieves the site's readiness in Bing Webmaster Tools.  Returns whether the site's Bing setup is complete, and if not, the first blocking step. Use this to decide what to resolve next. For example, a `SITE_NOT_ADDED` blocking reason means the site isn't in the connected Bing account yet, so call Add Site.  Setup steps are checked in order, and only the first missing one is returned: `NOT_CONNECTED`, `SITE_NOT_PUBLISHED`, `DOMAIN_NOT_CONNECTED`, `SITE_NOT_ADDED`, then `SITE_OWNER_NOT_VERIFIED`. Readiness is read live from Bing and changes nothing.
 Return type: PROMISE<GetSiteReadinessResponse>
  - name: siteReadiness | type: SiteReadiness | description: The site's current Bing Webmaster Tools readiness.  
     - name: status | type: ReadinessStatus | description: Whether the site has completed Bing Webmaster Tools setup.  | read-only: true 
         - enum:
         -     UNKNOWN_READINESS_STATUS: Unknown readiness status.
         -     READY: The site is fully set up in Bing Webmaster Tools.
         -     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.
         -     NOT_CONNECTED: The site has no Bing account connected: it was never connected, the connection was removed, or Bing no longer accepts the stored credentials. Connect a Bing account with the BWT Connection API.
         -     SITE_NOT_PUBLISHED: The site is not published. Publish it first.
         -     DOMAIN_NOT_CONNECTED: The site has no connected domain. Connect a domain first.
         -     SITE_NOT_ADDED: The connection works, but the site isn't in the connected Bing account yet. Call Add Site.
         -     SITE_OWNER_NOT_VERIFIED: The site is in the connected Bing account, but its ownership isn't verified yet. Call Verify Site.

 Possible Errors:
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

### Get the site's Bing Webmaster Tools readiness
```javascript
import { siteReadiness } from "@wix/bwt";

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

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

```

### 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/bwt';
// 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();
};
```

---