> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListAvailableFulfillmentOptions

# Package: onlineOrders

# Namespace: OperationsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/operations/list-available-fulfillment-options.md

## Permission Scopes:
Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES

## Introduction

Retrieves a list of the fulfillment options currently available for an operation.

A fulfillment option is available when an order can be submitted for it, given the operation's order scheduling and the fulfillment method's availability.

If you don't specify `deliveryAddress`, the response includes fulfillment options of every fulfillment type.
If you specify `deliveryAddress`, the response includes the non-delivery fulfillment options and only the delivery fulfillment options whose delivery area contains the address.

The response also indicates whether pickup and delivery are configured for the operation, and whether availability exceptions currently block ordering.

---

## REST API

### Schema

```
 Method: listAvailableFulfillmentOptions
 Description: Retrieves a list of the fulfillment options currently available for an operation.  A fulfillment option is available when an order can be submitted for it, given the operation's order scheduling and the fulfillment method's availability.  If you don't specify `deliveryAddress`, the response includes fulfillment options of every fulfillment type. If you specify `deliveryAddress`, the response includes the non-delivery fulfillment options and only the delivery fulfillment options whose delivery area contains the address.  The response also indicates whether pickup and delivery are configured for the operation, and whether availability exceptions currently block ordering.
 URL: https://www.wixapis.com/restaurants-operations/v1/operations/{operationId}/available-fulfillment-options
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  operationId
 Method parameters: 
   param name: deliveryAddress | type: Address | description: Physical address  
    - ONE-OF: 
     - name: streetAddress | type: StreetAddress | description: Street name and number.  
        - name: number | type: string | description: Street number.  
        - name: name | type: string | description: Street name.  
        - name: apt | type: string | description: Apartment number.  
        - name: formattedAddressLine | type: string | description: Optional address line 1  
     - name: addressLine | type: string | description: Main address line, usually street and number as free text.  
        - name: country | type: string | description: Country code.  | validation: format COUNTRY
        - name: subdivision | type: string | description: Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).  
        - name: city | type: string | description: City name.  
        - name: postalCode | type: string | description: Zip/postal code.  
        - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains Apt, Suite, and Floor.  
        - name: formattedAddress | type: string | description: A string containing the full address of this location.  
        - name: hint | type: string | description: Free text to help find the address.  
        - name: geocode | type: AddressLocation | description: Coordinates of the physical address.  
           - name: latitude | type: number | description: Address latitude.  | validation: format double
           - name: longitude | type: number | description: Address longitude.  | validation: format double
        - name: countryFullname | type: string | description: Country full name.  
        - name: subdivisionFullname | type: string | description: Subdivision full name.  
        - name: subdivisions | type: array<Subdivision> | description: Multi-level subdivisions from top to bottom.  | validation: maxItems 6
           - name: code | type: string | description: Short subdivision code.  
           - name: name | type: string | description: Subdivision full name.  
   param name: operationId | type:   none | required: true 
 Return type: ListAvailableFulfillmentOptionsResponse
  - name: pickupConfigured | type: boolean | description: Whether a pickup fulfillment method is configured for the operation.  
  - name: deliveryConfigured | type: boolean | description: Whether a delivery fulfillment method is configured for the operation.  
  - name: fulfillmentOptions | type: array<FulfillmentOption> | description: Available fulfillment options.  
     - ONE-OF: 
        - name: maxTimeOptions | type: integer | description: Maximum fulfillment time in minutes.  
        - name: durationRangeOptions | type: DurationRange | description: Range of the fulfillment time in minutes.  
           - name: minDuration | type: integer | description: Minimum duration in minutes.  
           - name: maxDuration | type: integer | description: Maximum duration in minutes.  
     - ONE-OF: 
        - name: timeWindowsOptions | type: TimeWindowDisplayConfig | description: Options for displaying fulfillment times. Required when `fulfillmentTimesDisplayType` is `TIME_WINDOWS`.  
           - name: durationInMinutes | type: integer | description: Time window duration in minutes.  
     - ONE-OF: 
        - name: pickupOptions | type: PickupDetails | description: Information about the `PICKUP` fulfillment type.  
           - name: address | type: Address | description: Pickup address. This is the restaurant's address.  
              - ONE-OF: 
                 - name: streetAddress | type: StreetAddress | description: Street name and number.  
                    - name: number | type: string | description: Street number.  
                    - name: name | type: string | description: Street name.  
                    - name: apt | type: string | description: Apartment number.  
                    - name: formattedAddressLine | type: string | description: Optional address line 1  
                 - name: addressLine | type: string | description: Main address line, usually street and number as free text.  
              - name: country | type: string | description: Country code.  | validation: format COUNTRY
              - name: subdivision | type: string | description: Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).  
              - name: city | type: string | description: City name.  
              - name: postalCode | type: string | description: Zip/postal code.  
              - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains Apt, Suite, and Floor.  
              - name: formattedAddress | type: string | description: A string containing the full address of this location.  
              - name: hint | type: string | description: Free text to help find the address.  
              - name: geocode | type: AddressLocation | description: Coordinates of the physical address.  
                 - name: latitude | type: number | description: Address latitude.  | validation: format double
                 - name: longitude | type: number | description: Address longitude.  | validation: format double
              - name: countryFullname | type: string | description: Country full name.  
              - name: subdivisionFullname | type: string | description: Subdivision full name.  
              - name: subdivisions | type: array<Subdivision> | description: Multi-level subdivisions from top to bottom.  | validation: maxItems 6
                 - name: code | type: string | description: Short subdivision code.  
                 - name: name | type: string | description: Subdivision full name.  
        - name: deliveryOptions | type: DeliveryDetails | description: Information about the `DELIVERY` fulfillment type.  
           - name: deliveryProviderAppId | type: string | description: GUID of the app that provides the delivery.  | validation: format GUID
           - name: courierPickupInstructions | type: string | description: Pickup instructions for couriers.  | validation: maxLength 250
           - name: deliveryTimeInMinutes | type: integer | description: Time it takes to deliver the order in minutes.  | validation: minimum 0, format int32
        - name: dineInOptions | type: DineInDetails | description: Information about the `DINE_IN` fulfillment type.  
           - name: address | type: Address | description: Dine-in address. This is the restaurant's address.  
     - name: id | type: string | description: Fulfillment method GUID.  | validation: format GUID
     - name: type | type: FulfillmentType | description: Fulfillment type.  
         - enum:
         -     PICKUP: Pickup fulfillment. The customer picks up the order from the restaurant.
         -     DELIVERY: Delivery fulfillment. The restaurant, or a representative, delivers the order to the customer.
     - name: minOrderPrice | type: string | description: Minimum order price to qualify for the fulfillment option.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: fee | type: string | description: Fee for using the fulfillment option.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: availability | type: FulfillmentOptionAvailability | description: Availability of the fulfillment option.  
        - name: startTime | type: string | description: Date and time at which the fulfillment option's availability starts.  | validation: format date-time
        - name: endTime | type: string | description: Date and time at which the fulfillment option's availability ends.  | validation: format date-time
        - name: availableTimes | type: array<DayOfWeekAvailability> | description: List of available times for the days of the week. All the specified times must be within the range between `startTime` and `endTime`.  
           - name: dayOfWeek | type: DayOfWeek | description: The day of week this availability relates to.  
                 - enum:
                 -     MON: Monday.
                 -     TUE: Tuesday.
                 -     WED: Wednesday.
                 -     THU: Thursday.
                 -     FRI: Friday.
                 -     SAT: Saturday.
                 -     SUN: Sunday.
           - name: timeRanges | type: array<TimeOfDayRange> | description: A list of time ranges during which the fulfillment should be available.  
              - name: startTime | type: TimeOfDay | description: The start time in time of day representation.  
                 - name: hours | type: integer | description: Hours. <br /> Min: `0`. <br /> Max: `23`.  
                 - name: minutes | type: integer | description: Minutes. <br /> Min: `0`. <br /> Max: `23`.  
              - name: endTime | type: TimeOfDay | description: The end time in time of day representation.  
        - name: exceptions | type: array<AvailabilityException> | description: List of availability exceptions that override the availability defined in `availableTimes`.  
           - name: startTime | type: string | description: The start time of the availability exception.  | validation: format date-time
           - name: endTime | type: string | description: The end time of the availability exception.  | validation: format date-time
           - name: available | type: boolean | description: An indication whether the exception makes the [`start_time`, `end_time`] range available.  
           - name: reason | type: string | description: The reason for the exception.  
        - name: timeZone | type: string | description: Timezone for which the available times are given.  
        - name: asapHandlingAvailable | type: boolean | description: Whether it's possible to submit an order for as soon as possible handling.  
        - name: futureHandlingAvailable | type: boolean | description: Whether it's possible to submit an order for future handling.  
     - name: fulfillmentTimeType | type: FulfillmentTimeType | description: Fulfillment time type. Relevant only when `orderScheduling.type` is `ASAP`.  
         - enum:
         -     UNDEFINED_FULFILLMENT_TIME: Undefined fulfillment time type.
         -     MAX_TIME: Fulfillment time has a maximum.
         -     DURATION_RANGE: Fulfillment time has a minimum and a maximum.
     - name: fulfillmentTimesDisplayType | type: FulfillmentTimesDisplayType | description: Fulfillment times display type. Relevant only when `orderScheduling.type` is `PREORDER`.  
         - enum:
         -     UNDEFINED_FULFILLMENT_TIMES_DISPLAY: Undefined fulfillment times display type.
         -     TIME_WINDOWS: Fulfillment times are displayed as a list of time windows.
     - name: freeFulfillmentPriceThreshold | type: string | description: Minimum order price to qualify for free fulfillment. If the order price exceeds this amount, the `fee` is waived.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: instructions | type: string | description: Fulfillment instructions for the customer.  | validation: maxLength 250
     - name: businessLocationId | type: string | description: GUID of the business location of the fulfillment option.  | validation: format GUID
  - name: blockedByAvailabilityExceptions | type: boolean | description: Whether availability exceptions currently block ordering for the operation.  
  - name: blockedByPausedOrdering | type: boolean | description: Whether an ordering-paused availability exception currently blocks ordering for the operation.  


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.restaurants.operations.listAvailableFulfillmentOptions(operationId, options)
 Description: Retrieves a list of the fulfillment options currently available for an operation.  A fulfillment option is available when an order can be submitted for it, given the operation's order scheduling and the fulfillment method's availability.  If you don't specify `deliveryAddress`, the response includes fulfillment options of every fulfillment type. If you specify `deliveryAddress`, the response includes the non-delivery fulfillment options and only the delivery fulfillment options whose delivery area contains the address.  The response also indicates whether pickup and delivery are configured for the operation, and whether availability exceptions currently block ordering.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  operationId
 Method parameters: 
   param name: operationId | type: string | description: GUID of the operation to retrieve fulfillment options for. | required: true | validation: format GUID
   param name: options | type: ListAvailableFulfillmentOptionsOptions  none  
        - name: deliveryAddress | type: Address | description: Delivery address.  When specified, the response includes only the delivery fulfillment options that deliver to this address.  
           - ONE-OF: 
              - name: streetAddress | type: StreetAddress | description: Street name and number.  
                 - name: number | type: string | description: Street number.  
                 - name: name | type: string | description: Street name.  
                 - name: apt | type: string | description: Apartment number.  
                 - name: formattedAddressLine | type: string | description: Optional address line 1  
              - name: addressLine | type: string | description: Main address line, usually street and number as free text.  
           - name: country | type: string | description: Country code.  | validation: format COUNTRY
           - name: subdivision | type: string | description: Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).  
           - name: city | type: string | description: City name.  
           - name: postalCode | type: string | description: Zip/postal code.  
           - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains Apt, Suite, and Floor.  
           - name: formattedAddress | type: string | description: A string containing the full address of this location.  
           - name: hint | type: string | description: Free text to help find the address.  
           - name: geocode | type: AddressLocation | description: Coordinates of the physical address.  
              - name: latitude | type: number | description: Address latitude.  
              - name: longitude | type: number | description: Address longitude.  
           - name: countryFullname | type: string | description: Country full name.  
           - name: subdivisionFullname | type: string | description: Subdivision full name.  
           - name: subdivisions | type: array<Subdivision> | description: Multi-level subdivisions from top to bottom.  | validation: maxItems 6
              - name: code | type: string | description: Short subdivision code.  
              - name: name | type: string | description: Subdivision full name.  
 Return type: PROMISE<ListAvailableFulfillmentOptionsResponse>
  - name: pickupConfigured | type: boolean | description: Whether a pickup fulfillment method is configured for the operation.  
  - name: deliveryConfigured | type: boolean | description: Whether a delivery fulfillment method is configured for the operation.  
  - name: fulfillmentOptions | type: array<FulfillmentOption> | description: Available fulfillment options.  
     - ONE-OF: 
        - name: maxTimeOptions | type: integer | description: Maximum fulfillment time in minutes.  
        - name: durationRangeOptions | type: DurationRange | description: Range of the fulfillment time in minutes.  
           - name: minDuration | type: integer | description: Minimum duration in minutes.  
           - name: maxDuration | type: integer | description: Maximum duration in minutes.  
     - ONE-OF: 
        - name: timeWindowsOptions | type: TimeWindowDisplayConfig | description: Options for displaying fulfillment times. Required when `fulfillmentTimesDisplayType` is `TIME_WINDOWS`.  
           - name: durationInMinutes | type: integer | description: Time window duration in minutes.  
     - ONE-OF: 
        - name: pickupOptions | type: PickupDetails | description: Information about the `PICKUP` fulfillment type.  
           - name: address | type: Address | description: Pickup address. This is the restaurant's address.  
              - name: city | type: string | description: none  
              - name: subdivision | type: string | description: none  
              - name: country | type: string | description: none  
              - name: postalCode | type: string | description: none  
              - name: addressLine1 | type: string | description: none  
              - name: addressLine2 | type: string | description: none  
        - name: deliveryOptions | type: DeliveryDetails | description: Information about the `DELIVERY` fulfillment type.  
           - name: deliveryProviderAppId | type: string | description: GUID of the app that provides the delivery.  | validation: format GUID
           - name: courierPickupInstructions | type: string | description: Pickup instructions for couriers.  | validation: maxLength 250
           - name: deliveryTimeInMinutes | type: integer | description: Time it takes to deliver the order in minutes.  | validation: minimum 0, format int32
        - name: dineInOptions | type: DineInDetails | description: Information about the `DINE_IN` fulfillment type.  
           - name: address | type: Address | description: Dine-in address. This is the restaurant's address.  
     - name: _id | type: string | description: Fulfillment method GUID.  | validation: format GUID
     - name: type | type: FulfillmentType | description: Fulfillment type.  
         - enum:
         -     PICKUP: Pickup fulfillment. The customer picks up the order from the restaurant.
         -     DELIVERY: Delivery fulfillment. The restaurant, or a representative, delivers the order to the customer.
     - name: minOrderPrice | type: string | description: Minimum order price to qualify for the fulfillment option.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: fee | type: string | description: Fee for using the fulfillment option.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: availability | type: FulfillmentOptionAvailability | description: Availability of the fulfillment option.  
        - name: startTime | type: Date | description: Date and time at which the fulfillment option's availability starts.  
        - name: endTime | type: Date | description: Date and time at which the fulfillment option's availability ends.  
        - name: availableTimes | type: array<DayOfWeekAvailability> | description: List of available times for the days of the week. All the specified times must be within the range between `startTime` and `endTime`.  
           - name: dayOfWeek | type: DayOfWeek | description: The day of week this availability relates to.  
                 - enum:
                 -     MON: Monday.
                 -     TUE: Tuesday.
                 -     WED: Wednesday.
                 -     THU: Thursday.
                 -     FRI: Friday.
                 -     SAT: Saturday.
                 -     SUN: Sunday.
           - name: timeRanges | type: array<TimeOfDayRange> | description: A list of time ranges during which the fulfillment should be available.  
              - name: startTime | type: TimeOfDay | description: The start time in time of day representation.  
                 - name: hours | type: integer | description: Hours. <br /> Min: `0`. <br /> Max: `23`.  
                 - name: minutes | type: integer | description: Minutes. <br /> Min: `0`. <br /> Max: `23`.  
              - name: endTime | type: TimeOfDay | description: The end time in time of day representation.  
        - name: exceptions | type: array<AvailabilityException> | description: List of availability exceptions that override the availability defined in `availableTimes`.  
           - name: startTime | type: Date | description: The start time of the availability exception.  
           - name: endTime | type: Date | description: The end time of the availability exception.  
           - name: available | type: boolean | description: An indication whether the exception makes the [`start_time`, `end_time`] range available.  
           - name: reason | type: string | description: The reason for the exception.  
        - name: timeZone | type: string | description: Timezone for which the available times are given.  
        - name: asapHandlingAvailable | type: boolean | description: Whether it's possible to submit an order for as soon as possible handling.  
        - name: futureHandlingAvailable | type: boolean | description: Whether it's possible to submit an order for future handling.  
     - name: fulfillmentTimeType | type: FulfillmentTimeType | description: Fulfillment time type. Relevant only when `orderScheduling.type` is `ASAP`.  
         - enum:
         -     UNDEFINED_FULFILLMENT_TIME: Undefined fulfillment time type.
         -     MAX_TIME: Fulfillment time has a maximum.
         -     DURATION_RANGE: Fulfillment time has a minimum and a maximum.
     - name: fulfillmentTimesDisplayType | type: FulfillmentTimesDisplayType | description: Fulfillment times display type. Relevant only when `orderScheduling.type` is `PREORDER`.  
         - enum:
         -     UNDEFINED_FULFILLMENT_TIMES_DISPLAY: Undefined fulfillment times display type.
         -     TIME_WINDOWS: Fulfillment times are displayed as a list of time windows.
     - name: freeFulfillmentPriceThreshold | type: string | description: Minimum order price to qualify for free fulfillment. If the order price exceeds this amount, the `fee` is waived.  | validation: decimalValue {"gte":"0.00","maxScale":3}
     - name: instructions | type: string | description: Fulfillment instructions for the customer.  | validation: maxLength 250
     - name: businessLocationId | type: string | description: GUID of the business location of the fulfillment option.  | validation: format GUID
  - name: blockedByAvailabilityExceptions | type: boolean | description: Whether availability exceptions currently block ordering for the operation.  
  - name: blockedByPausedOrdering | type: boolean | description: Whether an ordering-paused availability exception currently blocks ordering for the operation.  


```

### Examples

### listAvailableFulfillmentOptions
```javascript
import { operations } from '@wix/restaurants';

async function listAvailableFulfillmentOptions(operationId,options) {
  const response = await operations.listAvailableFulfillmentOptions(operationId,options);
};
```

### listAvailableFulfillmentOptions (with elevated permissions)
```javascript
import { operations } from '@wix/restaurants';
import { auth } from '@wix/essentials';

async function myListAvailableFulfillmentOptionsMethod(operationId,options) {
  const elevatedListAvailableFulfillmentOptions = auth.elevate(operations.listAvailableFulfillmentOptions);
  const response = await elevatedListAvailableFulfillmentOptions(operationId,options);
}
```

### listAvailableFulfillmentOptions (self-managed)
Self-managed 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 { operations } from '@wix/restaurants';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listAvailableFulfillmentOptions(operationId,options) {
  const response = await myWixClient.operations.listAvailableFulfillmentOptions(operationId,options);
};
```

---