> 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 # GetAggregatedMethodAvailability # Package: onlineOrders # Namespace: FulfillmentMethodsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/online-orders/fulfillment-methods/get-aggregated-method-availability.md ## Permission Scopes: Manage Restaurants - all permissions: SCOPE.RESTAURANTS.MEGA-SCOPES ## Introduction Retrieves the aggregated availability of a list of fulfillment methods. The aggregated availability is a list of times during which one or more of the given fulfillment methods is available, and the types of those fulfillment methods. --- ## REST API ### Schema ``` Method: getAggregatedMethodAvailability Description: Retrieves the aggregated availability of a list of fulfillment methods. The aggregated availability is a list of times during which one or more of the given fulfillment methods is available, and the types of those fulfillment methods. URL: https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/aggregated-availability Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: fulfillmentMethodIds Method parameters: param name: fulfillmentMethodIds | type: array | description: IDs of fulfillment methods used to determine the aggregated availability. | required: true Return type: GetAggregatedMethodAvailabilityResponse - name: aggregatedAvailability | type: Availability | description: The aggregated availability of the given fulfillment methods. - name: availableTimes | type: array | description: A list of availability times for the days of the week. - 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 | 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.
Min: `0`.
Max: `23`. - name: minutes | type: integer | description: Minutes.
Min: `0`.
Max: `23`. - name: endTime | type: TimeOfDay | description: The end time in time of day representation. - name: timeZone | type: string | description: The timezone in which the availability times are given. - name: fulfillmentTypes | type: array | description: Types of fulfillment methods available during at least some the aggregated availability's `availableTimes`. - enum: - UNKNOWN_FULFILLMENT_TYPE: Unknown fulfillment type. - PICKUP: The customer must pick up the order from the restaurant. - DELIVERY: The restaurant, or someone on behalf of the restaurant, must deliver the order to the customer. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.onlineOrders.FulfillmentMethodsService.getAggregatedMethodAvailability(fulfillmentMethodIds) Description: Retrieves the aggregated availability of a list of fulfillment methods. The aggregated availability is a list of times during which one or more of the given fulfillment methods is available, and the types of those fulfillment methods. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: fulfillmentMethodIds Method parameters: param name: fulfillmentMethodIds | type: array | description: IDs of fulfillment methods used to determine the aggregated availability. | required: true Return type: PROMISE - name: aggregatedAvailability | type: Availability | description: The aggregated availability of the given fulfillment methods. - name: availableTimes | type: array | description: A list of availability times for the days of the week. - 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 | 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.
Min: `0`.
Max: `23`. - name: minutes | type: integer | description: Minutes.
Min: `0`.
Max: `23`. - name: endTime | type: TimeOfDay | description: The end time in time of day representation. - name: timeZone | type: string | description: The timezone in which the availability times are given. - name: fulfillmentTypes | type: array | description: Types of fulfillment methods available during at least some the aggregated availability's `availableTimes`. - enum: - UNKNOWN_FULFILLMENT_TYPE: Unknown fulfillment type. - PICKUP: The customer must pick up the order from the restaurant. - DELIVERY: The restaurant, or someone on behalf of the restaurant, must deliver the order to the customer. ``` ### Examples ### getAggregatedMethodAvailability ```javascript import { fulfillmentMethods } from '@wix/restaurants'; async function getAggregatedMethodAvailability(fulfillmentMethodIds) { const response = await fulfillmentMethods.getAggregatedMethodAvailability(fulfillmentMethodIds); }; ``` ### getAggregatedMethodAvailability (with elevated permissions) ```javascript import { fulfillmentMethods } from '@wix/restaurants'; import { auth } from '@wix/essentials'; async function myGetAggregatedMethodAvailabilityMethod(fulfillmentMethodIds) { const elevatedGetAggregatedMethodAvailability = auth.elevate(fulfillmentMethods.getAggregatedMethodAvailability); const response = await elevatedGetAggregatedMethodAvailability(fulfillmentMethodIds); } ``` ### getAggregatedMethodAvailability (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 { fulfillmentMethods } from '@wix/restaurants'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { fulfillmentMethods }, // Include the auth strategy and host as relevant }); async function getAggregatedMethodAvailability(fulfillmentMethodIds) { const response = await myWixClient.fulfillmentMethods.getAggregatedMethodAvailability(fulfillmentMethodIds); }; ``` ---