Parameters containing flash_sale_id and items
A promise that resolves to the result with any failed items
Create a new shop flash sale
Use this API to create a new shop flash sale activity for a specific time slot. The time slot must be obtained from getTimeSlotId() and must start in the future.
Parameters containing timeslot_id
A promise that resolves to the created flash sale information
Delete shop flash sale
Use this API to delete a shop flash sale. Cannot delete ongoing and expired flash sales.
Parameters containing flash_sale_id
A promise that resolves to the deleted flash sale information
Delete items from shop flash sale
Use this API to delete items from a shop flash sale. Deleting an item will delete all its models/variations.
Parameters containing flash_sale_id and item_ids
A promise that resolves to the result with any failed items
Get item criteria for shop flash sale
Use this API to get the criteria that items must meet to be eligible for shop flash sales. Criteria vary by product category and region.
Optionalparams: GetItemCriteriaParamsNo parameters required
A promise that resolves to the criteria details
Get shop flash sale details
Use this API to get detailed information about a specific shop flash sale.
Parameters containing flash_sale_id
A promise that resolves to the flash sale details
Get shop flash sale items
Use this API to get items and their details in a shop flash sale. Returns both item information and model details for items with variations.
Parameters containing flash_sale_id, offset, and limit
A promise that resolves to the items and their details
Get shop flash sale list
Use this API to get a list of shop flash sales with pagination support. You can filter by type (upcoming, ongoing, expired) and time range.
Parameters for filtering and pagination
A promise that resolves to the list of flash sales
Get available time slot IDs
Use this API to get available time slots for creating shop flash sales. You can only use time slots that start in the future.
Parameters containing start_time and end_time
A promise that resolves to the list of available time slots
Update shop flash sale status
Use this API to enable or disable a shop flash sale. Disabling a flash sale will disable all items in the session. Cannot edit flash sales with 'system_rejected' status.
Parameters containing flash_sale_id and status
A promise that resolves to the updated flash sale information
Update shop flash sale items
Use this API to update items in a shop flash sale. Can only edit items/models in disabled or enabled status. Cannot modify price or stock of enabled items, must disable first.
Parameters containing flash_sale_id and items
A promise that resolves to the result with any failed items
const result = await sdk.shopFlashSale.updateShopFlashSaleItems({
flash_sale_id: 802063533822541,
items: [
{
item_id: 3744623870,
purchase_limit: 10,
models: [
{
model_id: 5414485721,
status: 1, // enable
input_promo_price: 65.0,
stock: 150
}
]
}
]
});
console.log('Failed items:', result.response.failed_items);
Add items to shop flash sale
Use this API to add items to a shop flash sale. Maximum 50 enabled items per flash sale. For items with variations, specify model_id and prices for each variation.