Skip to main content

Discount

Discount entity with category association.

Represents a discount in the system that can be associated with a specific category. Provides access to the category details for discount organization and application rules.

type Discount implements IDiscount {
categoryId: Int
category(
hidden: YesNo
): Category
id: String!
createdAt: DateTime!
lastModifiedAt: DateTime!
value: Float!
quantityFrom: Int!
validFrom: DateTime
validTo: DateTime
pricesheetId: String!
productId: Int
priceGroup: String
discountType: PriceDiscountType!
pricesheet: Pricesheet
product(
hidden: Boolean
): Product
}

Fields

Discount.categoryId ● Int scalar

Category Id

Discount.category ● Category object

Category associated with the discount.

The category that this discount applies to, providing context for discount rules and application. Null when no category is associated with the discount.

Discount.category.hidden ● YesNo enum

Filter by category visibility status.

Y = include only if category is hidden, N = include only if category is visible. When omitted, includes category regardless of visibility status.

Discount.id ● String! non-null scalar

Primary identifier of the discount (UUID).

Discount.createdAt ● DateTime! non-null scalar

Creation date

Discount.lastModifiedAt ● DateTime! non-null scalar

Last modified date

Discount.value ● Float! non-null scalar

Discount value, either percentage or fixed amount

Discount.quantityFrom ● Int! non-null scalar

Indicates the minimum quantity threshold needed to qualify for the bulk price.

Discount.validFrom ● DateTime scalar

Start date from which the bulk pricing is effective. Must be a valid ISO 8601 date string.

Discount.validTo ● DateTime scalar

End date of the bulk pricing offer. Must be a valid ISO 8601 date string.

Discount.pricesheetId ● String! non-null scalar

The foreign key identifier for the pricesheet this discount belongs to.

Discount.productId ● Int scalar

Product Id

Discount.priceGroup ● String scalar

Price group

Discount.discountType ● PriceDiscountType! non-null enum

The method used to apply discounts for bulk prices / volume discounts.

Discount.pricesheet ● Pricesheet object

AUTH: Role=[pricing.OWNER]

Discount.product ● Product object

Complete product information for the discounted item.

Detailed product data including specifications, original pricing, and all attributes for the product that this discount applies to.

Discount.product.hidden ● Boolean scalar

Include hidden products in the lookup.

When true, includes products marked as hidden in the search. When false or not specified, only returns visible products.

Interfaces

IDiscount interface

Returned By

discount query ● discountCreate mutation ● discountUpdate mutation

Member Of

DiscountResponse object