Setup
To use the ItemModifiers API, install the @wix/restaurants
package using npm or Yarn:
1npm install @wix/restaurants
or
1yarn add @wix/restaurants
Then import { itemModifiers }
from @wix/restaurants
:
1import { itemModifiers } from '@wix/restaurants'
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates multiple item modifiers.
To create only one item modifier, use Create Modifier.
Permission Scopes
For app development, you must have one of the following permission scopes:function bulkCreateModifiers(modifiers: Array<Modifier>, options: BulkCreateModifiersOptions): Promise<BulkCreateModifiersResponse>
List of item modifiers to create.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates multiple item modifiers.
Each time a item modifier is updated,
revision
increments by 1.
The current revision
must be passed when updating an item modifier.
This ensures you're working with the latest item modifier
and prevents unintended overwrites.
To update only one modifier, use Update Modifier.
Permission Scopes
For app development, you must have one of the following permission scopes:function bulkUpdateModifiers(modifiers: Array<MaskedModifier>, options: BulkUpdateModifiersOptions): Promise<BulkUpdateModifiersResponse>
List of item modifiers to update.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates an item modifier.
To create multiple item modifiers at once, use Bulk Create Modifiers.
Permission Scopes
For app development, you must have one of the following permission scopes:function createModifier(modifier: Modifier): Promise<Modifier>
Item modifier to create.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves an item modifier.
Permission Scopes
For app development, you must have one of the following permission scopes:function getModifier(modifierId: string): Promise<Modifier>
ID of the item modifier to retrieve.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of item modifiers.
Permission Scopes
For app development, you must have one of the following permission scopes:function listModifiers(options: ListModifiersOptions): Promise<ListModifiersResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of item modifiers, given the provided paging, filtering, and sorting.
Query Modifiers runs with these defaults, which you can override:
createdDate
is sorted inASC
orderpaging.limit
is200
For field support for filters and sorting, see Item Modifiers: Supported Filters and Sorting.
To learn about working with Query endpoints, see API Query Language and Sorting and Paging.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
_id | eq() ,ne() ,in() |
_createdDate | eq() ,ne() ,gt() ,ge() ,lt() ,le() |
_updatedDate | eq() ,ne() ,gt() ,ge() ,lt() ,le() |
name | eq() ,ne() ,in() |
Permission Scopes
For app development, you must have one of the following permission scopes:function queryModifiers(): ModifiersQueryBuilder
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates an item modifier.
Each time the item modifier is updated,
revision
increments by 1.
The current revision
must be passed when updating the item modifier.
This ensures you're working with the latest item modifier
and prevents unintended overwrites.
To update multiple item modifiers at once, use Bulk Update Modifiers.
Permission Scopes
For app development, you must have one of the following permission scopes:function updateModifier(_id: string, modifier: UpdateModifier): Promise<Modifier>
Item modifier ID.