Platform Release 27 April 2018

We extended our GraphQL schema:

extend type DiscountCode {

  """
  How many times this discount code was applied
  (only applications that were part of a successful checkout are considered)
  """
  applicationCount: Long!
}

extend type ProductVariant {
  availability: ProductVariantAvailabilityWithChannels
}

type ProductVariantAvailabilityWithChannels {
  noChannel: ProductVariantAvailability
  channels(
    """"
    The IDs of channels to include.

    If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned.
    """
    includeChannelIds: [String!],

    """
    The IDs of channels to exclude.

    If neither `includeChannelIds` nor `excludeChannelIds` are provided, then all channels are returned.
    """
    excludeChannelIds: [String!],
    limit: Int,
    offset: Int): ProductVariantAvailabilitiesResult
}

type ProductVariantAvailability {
  isOnStock: Boolean!
  restockableInDays: Int
  availableQuantity: Long
}

type ProductVariantAvailabilitiesResult {
  limit: Int
  offset: Int
  total: Int!
  results: [ProductVariantAvailabilityWithChannel!]!
}

type ProductVariantAvailabilityWithChannel {
  channelRef: Reference!
  channel: Channel!
  availability: ProductVariantAvailability!
}