ProductBulkRate
Describes a product bulk rate, representing the discount details applied when purchasing a specified quantity of a product.
Type Definition
type ProductBulkRate {
isPercentage: Boolean
amount: Float
quantity: Int
}Fields
| Field | Type | Description | Nullable | Relationship |
|---|---|---|---|---|
isPercentage | Boolean | Returns true if discount is a percentage. | Yes | None |
amount | Float | Returns the discount amount. | Yes | None |
quantity | Int | Returns the quantity to purchase to get this discount. | Yes | None |
Relationships
The ProductBulkRate object type does not have direct relationships to other object types. It is typically used as part of a product’s pricing or discount structure to describe bulk purchase discounts.
Usage Examples
Basic Query
{
productBulkRate {
isPercentage
amount
quantity
}
}Field Selection
{
productBulkRate {
quantity
amount
}
}Nested Queries
{
product(id: 12345) {
name
bulkRates {
quantity
isPercentage
amount
}
}
}Filtering and Sorting
The ProductBulkRate type itself does not support filtering, sorting, or pagination directly. These operations should be applied on the parent collections or queries that return ProductBulkRate objects, such as product bulk rate lists.
Implements
This type does not implement any interfaces.
Connections
No connection fields are defined on ProductBulkRate.
Related Types
Product— Often contains a list ofProductBulkRateobjects to represent bulk discount tiers.
Best Practices
- When querying bulk rates, select only the fields you need to optimize response size.
- Use the
quantityfield to understand the minimum purchase quantity required for the discount. - Check
isPercentageto determine if theamountrepresents a percentage discount or a fixed amount. - Handle optional fields carefully as any of the fields may be null if no discount applies.
- Combine bulk rate data with product pricing information to calculate final prices in your application logic.
Notes
- The API currently requires no authentication but this may change in future versions.
ProductBulkRatefields are optional and may be null if no bulk discount is configured.- There are no computed or derived fields on this type; all fields represent stored data.
- No field arguments are defined for this type.
- Since this type is a simple data object, performance considerations primarily depend on the parent queries returning it.
- Cache bulk rate data alongside product data to reduce repeated queries for pricing information.
Last updated on