---
title: "flashSaleCampaignByProduct"
description: "Query flash sale campaigns by a specific product."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/common-objects/queries/flash-sale-campaign-by-product'
  md: 'https://developer.shopline.com/docs/storefront-api/common-objects/queries/flash-sale-campaign-by-product.md'
---
# flashSaleCampaignByProduct

Query flash sale campaigns by a specific product.

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`FlashSaleCampaign`

## Arguments

* `flashSaleProduct`

  [FlashSaleProductInput!](https://developer.shopline.com/docs/storefront-api/products/inputs/flash-sale-product-input.md)

  The product information used to query flash sale campaigns. 

* `buyerId`

  [ID](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  Pass in this argument to retrieve the buyer's eligible flash sale campaigns. If no eligible campaigns are found, no campaign information is returned. 

## Returns

* `combinesWithDiscounts`

  [Boolean](https://developer.shopline.com/docs/storefront-api/common/scalars/boolean.md)

  Whether discount codes and automatic discounts can be applied after the flash sale price.

* `displaySettings`

  [FlashSaleDisplaySettings](https://developer.shopline.com/docs/storefront-api/common-objects/objects/flash-sale-display-settings.md)

  Display settings for the campaign

* `endsAt`

  [Date](https://developer.shopline.com/docs/storefront-api/common/scalars/date.md)

  The date and time when the campaign ends

* `flashSaleInfoByVariant`

  [[FlashSaleItem]](https://developer.shopline.com/docs/storefront-api/common-objects/objects/flash-sale-item.md)

  商品款式的活动信息	The campaign information matching the supplied product or product variant.

* `id`

  [ID](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  The unique ID of the flash sale campaign.

* `productInventory`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  The total available quantity of promotional items.

* `purchaseLimitConfiguration`

  [PurchaseLimitConfiguration](https://developer.shopline.com/docs/storefront-api/common-objects/objects/purchase-limit-configuration.md)

  The purchase limit configuration for buyers

* `seoHandleUrl`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The URL used for viewing the campaign products on the shop's Online Store. Returns null if the campaign does not generate a landing page.

* `soldQuantity`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  The total sold quantity of promotional items. 

* `startsAt`

  [Date](https://developer.shopline.com/docs/storefront-api/common/scalars/date.md)

  The date and time when the campaign starts

* `title`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The title of the campaign.

## Code Example

```graphql
 {
	flashSaleCampaignByProduct(flashSaleProduct, buyerId ) 
		 {
			# FlashSaleCampaign fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

