12 June 2023
Composable Commerce
HTTP API
Enhancement
Pricing and DiscountsGraphQL

We introduced new update actions on the Standalone Prices API that allow you to modify the start and end dates of a Standalone Price. This feature simplifies the process of maintaining accurate pricing information for your customers. Prior to this enhancement, changing the validity dates required the deletion and recreation of Standalone Prices, a process that was time-consuming and error-prone.

Alongside the new update actions, we also introduced corresponding Subscription Messages to enhance visibility and tracking.

Changes:

The following changes were introduced in terms of GraphQL SDL:

extend input StandalonePriceUpdateAction {
  setValidFrom: SetStandalonePriceValidFrom
  setValidFromAndUntil: SetStandalonePriceValidFromAndUntil
  setValidUntil: SetStandalonePriceValidUntil
}

input SetStandalonePriceValidFrom {
  validFrom: DateTime
}

input SetStandalonePriceValidFromAndUntil {
  validFrom: DateTime
  validUntil: DateTime
}

input SetStandalonePriceValidUntil {
  validUntil: DateTime
}

type StandalonePriceValidFromAndUntilSet implements MessagePayload {
  validFrom: DateTime
  validUntil: DateTime
  previousValidFrom: DateTime
  previousValidUntil: DateTime
  type: String!
}

type StandalonePriceValidFromSet implements MessagePayload {
  validFrom: DateTime
  previousValidFrom: DateTime
  type: String!
}

type StandalonePriceValidUntilSet implements MessagePayload {
  validUntil: DateTime
  previousValidUntil: DateTime
  type: String!
}