> 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

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/provider-state-v1/sample-flows.md

## Article Content:

# Provider State: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

## Pause and resume receiving new leads

A provider needs to stop receiving new leads for a while, for example while they're on vacation, and start again when they're back. A provider manages this themselves through their availability, and it only takes effect while they're published in the marketplace.

To pause and resume receiving new leads:

1. Call [Get Provider State](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/provider-state-v1/get-provider-state.md) and confirm `status.statusType` is `PUBLISHED`. Availability can only be changed for a published provider.
1. Call [Set Availability](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/provider-state-v1/set-availability.md) with `enabled` set to `false` to pause new leads.
1. Call [Set Availability](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/provider-state-v1/set-availability.md) with `enabled` set to `true` to resume new leads. Resuming also clears any active prolonged-unavailability warning on the provider's status.

## Check whether a provider can currently receive leads

Before showing a provider as active or surfacing their availability controls, an app needs to know both whether the provider is live in the marketplace and whether they're accepting new leads.

To check whether a provider can currently receive leads:

1. Call [Get Provider State](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/provider-state-v1/get-provider-state.md) to retrieve the provider's current state.
1. Read `status.statusType` to see whether the provider is `PUBLISHED`. A provider that's `SUSPENDED`, `REMOVED`, `BANNED`, or still in the application stages isn't receiving leads.
1. Read `availability.enabled` to see whether the published provider is accepting new leads, and `availability.reason` to see why leads are paused when it's `false`.
1. Read `status.description` for any warning that the provider is at risk of suspension or removal.