Filter to get prices from multiple items at once
query {
generateQuotePrice(
items: [FindPriceQuoteItemInput],
params: FindPriceQuoteParams
){
# QuotePrice
}
}
There are multiple parameters that may affect the price and they are part of the FindPriceQuoteParams
model
Param | Description |
---|---|
exactStudentAge |
Some courses may have restrictions of additional fees based on student age |
currencyId |
ID of the currency the price will be shown. You can send |
studentNationalityId |
Could be used to get market promotions |
agencyLocationCountryId |
Could be used to get market promotions |
studentCurrentLocationCountryId |
This is used to determine whether the student is onShort or offShore. If this field is null, then the student is considered offShore. |
offeringSearchForCourseOfferingsQuery.gql
query getPrice(
$items: [FindPriceQuoteItemInput]
$params: FindPriceQuoteParams
) {
generateQuotePrice (items: $items, params: $params) {
totalPriceAmount
currency { ...currency }
generatedOn
quotePriceItems {
...priceItem
}
}
}
fragment priceItem on QuotePriceItem {
... on CoursePriceItem {
offering { ...offering }
currency { ...currency }
fees { ...fees }
discounts { ...discounts }
# Regular Price without discounts
originalPriceAmount
# Final price after discounts
priceAmount
priceUsd
durationAmount
durationType { codeName }
}
... on AccommodationPriceItem {
currency { ...currency }
fees { ...fees }
discounts { ...discounts }
originalPriceAmount
priceAmount
priceUsd
durationAmount
durationType{ codeName }
}
... on ServicePriceItem {
offeringId
currency { ...currency }
discounts { ...discounts }
}
}
fragment currency on Currency {
code
currencyId
symbol
}
fragment fees on FeePriceItem {
currency{ ...currency }
originalPriceAmount
discounts { ...discounts }
fee {
feeId
name
feeType{
feeTypeId
name
}
}
}
fragment offering on Offering {
offeringId
name
}
fragment promotionTypeSelection on PromotionTypeSelection {
promotion { name }
}
fragment discounts on DiscountItem{
... on AmountOffDiscountItem {
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on PercentageOffDiscountItem{
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on DurationExtensionDiscountItem{
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on OtherOfferingDiscountItem {
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on FeeDiscountItem {
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on CustomDiscountItem {
description
promotionTypeSelection{ ...promotionTypeSelection }
}
... on BonusCommissionDiscountItem {
bonusCommissionPriceAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
... on OverrideDiscountItem {
priceDiscountAmount
currency{ ...currency }
promotionTypeSelection{ ...promotionTypeSelection }
}
__typename
}
Variables
{
"items": [
{
"offeringId": 1,
"startDate": "2020-06-08",
"durationAmount": 4,
"durationTypeId": 3
}
],
"params": {
"studentNationalityId": 148,
"agencyLocationCountryId": 148,
"exactStudentAge": 18,
"currencyId": -1
}
}