Search...
createBackInStockNotificationRequest( )
Developer Preview
Create a BackInStockNotificationRequest. May not create new entry if there is existing non resolved request for same CatalogReference and email (will return existing request in response)
Syntax
function createBackInStockNotificationRequest(request: BackInStockNotificationRequest, options: CreateBackInStockNotificationRequestOptions): Promise<BackInStockNotificationRequest>
createBackInStockNotificationRequest Parameters
NAME
TYPE
DESCRIPTION
request
BackInStockNotificationRequest
Notification request data (id is ignored, as it's generated by server)
options
CreateBackInStockNotificationRequestOptions
Returns
Created BackInStockNotificationRequest
Return Type:
Promise<
BackInStockNotificationRequest
>NAME
TYPE
DESCRIPTION
_createdDate
Date
Order creation date and time.
_id
string
Request id (autogenerated upon creation)
autoNotified
boolean
Describes how notification was made: automatically or manually by store owner
catalogReference
CatalogReference
Item identifier
contactId
string
Contact id (autogenerated upon creation) which is associated with given email. Will receive all notifications
email
string
Email that will receive notification about item being back in stock
itemUrl
string
override default item url returned from the implementer
status
string
Request status
Was this helpful?
createBackInStockNotificationRequest example
Copy Code
1import { backInStockNotification } from 'wix-ecom.v2';23 async function createBackInStockNotificationRequest(request, options) {4 try {5 const result = await backInStockNotification.createBackInStockNotificationRequest(request, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13