<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/Product/PromotionInfo/updateProductOrder(byID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit7ProductV13PromotionInfoV06updateC5Order4byIDyx_tYaKSlRzSS7ElementRtzlFZ"
  },
  "title" : "updateProductOrder(byID:)"
}
-->

# updateProductOrder(byID:)

Sets the display order of promoted Apple In-App Purchases in the App Store, using product identifiers.

```
static func updateProductOrder(byID order: some Collection<String>) async throws
```

## Parameters

`order`

A collection of product identifiers ([`id`](/documentation/StoreKit/Product/id)) in the order that you want the promoted Apple In-App Purchases to appear, from first to last. Use an empty list to cancel previous changes.

## Discussion

Call this static method to override the default order of promoted Apple In-App Purchases on the current device. You provide the product identifiers of the promoted Apple In-App Purchases to set their order.

To hide a promoted Apple In-App Purchase so it doesn’t display in the App Store for the user, don’t include its product identifier when calling this method. You may want to do this, for example, if the user has already purchased the product, or if it isn’t relevant to them for some other reason.

To set the order using [`Product.PromotionInfo`](/documentation/StoreKit/Product/PromotionInfo) objects instead of product identifiers, see [`updateAll(_:)`](/documentation/StoreKit/Product/PromotionInfo/updateAll(_:)).

### Cancel overrides

To cancel the order and visibility changes you make, send an empty collection in the `order` parameter. All Apple In-App Purchases then display in the default order.

```swift
// Cancel overrides by using an empty collection.
do {
    try await Product.PromotionInfo.updateProductOrder(byID: [])
}
catch {
    <#Handle error.#>
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)