[GH-ISSUE #438] Add consolidated asc iap prices command to reduce IAP pricing lookup from ~3 min to seconds #124

Closed
opened 2026-02-26 21:33:36 +03:00 by kerem · 0 comments
Owner

Originally created by @rudrankriyam on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/438

Problem

Getting the current price of all IAPs in an app requires multiple sequential CLI calls and takes ~3 minutes even for a single IAP. A user reported this in a tweet:

"It took ~3m to check the IAP price. My prompt was 'Check the current price of all the IAPs in this app with $ Asc Ppp Pricing'. Any chance to boost the whole process?"
@lexrus

Screenshot

Current workflow (per IAP)

To get full pricing info for a single IAP, an agent currently has to run 4–6 commands sequentially:

  1. asc iap list --app <APP_ID> — discover IAPs
  2. asc iap price-schedules get --iap-id <IAP_ID> — get schedule ID
  3. asc iap price-schedules base-territory --schedule-id <SCHEDULE_ID> — get base territory
  4. asc iap price-schedules automatic-prices --schedule-id <SCHEDULE_ID> --paginate — auto prices
  5. asc iap price-schedules manual-prices --schedule-id <SCHEDULE_ID> --paginate — manual prices
  6. asc iap price-points list --iap-id <IAP_ID> --territory USA --paginate — map price point to dollar amount

For an app with N IAPs, this becomes 4–6×N API calls, all sequential. Each call has network latency + JWT auth overhead, so this adds up fast.

Proposed solution

1. New asc iap prices command (consolidated)

A single command that returns a complete pricing summary for one or all IAPs in an app:

# All IAPs in an app
asc iap prices --app 6757860829 --output json

# Single IAP
asc iap prices --iap-id 6757972362 --output json

# Human-readable table
asc iap prices --app 6757860829 --output table

Output should include (per IAP):

  • IAP name, product ID, type, IAP ID
  • Base territory + current price (resolved to currency amount, not just price point ID)
  • Estimated proceeds
  • Scheduled price changes (territory, old → new price point, effective date)

Example JSON output:

{
  "iaps": [
    {
      "id": "6757972362",
      "name": "Lifetime Unlock",
      "productId": "sublist.lifetime",
      "type": "NON_CONSUMABLE",
      "baseTerritory": "USA",
      "currentPrice": { "amount": "9.99", "currency": "USD" },
      "estimatedProceeds": { "amount": "8.49", "currency": "USD" },
      "scheduledChanges": [
        {
          "territory": "MUS",
          "fromPricePoint": "10127",
          "toPricePoint": "10137",
          "effectiveDate": "2026-02-16"
        }
      ]
    }
  ]
}

2. Parallel API calls internally

The implementation should:

  • Fetch all IAPs for the app in one call
  • Fan out price schedule + price point lookups concurrently (bounded goroutines)
  • Resolve price point IDs → concrete currency amounts server-side using include / fields query params where the API supports it
  • Collapse automatic + manual prices into a single view

3. Use API include and fields parameters

Several App Store Connect API endpoints support include parameters that can reduce round-trips:

  • GET /v1/inAppPurchasePriceSchedules/{id}?include=manualPrices,automaticPrices,baseTerritory — fetch schedule + prices + territory in one call
  • Use fields[inAppPurchasePrices] to limit response size

This alone could reduce per-IAP calls from 4–6 down to 1–2.

Implementation checklist

  • Add include support to existing price-schedules get (fetch related resources in one call)
  • Create internal/cli/iap/prices.go with the consolidated asc iap prices command
  • Register in internal/cli/iap/iap.go and internal/cli/registry/registry.go
  • Implement concurrent fan-out for multi-IAP lookups (respect API rate limits)
  • Resolve price point IDs to human-readable amounts (currency + value)
  • Support --output json|table|markdown formats
  • Add --territory filter (optional, show only specific territory prices)
  • Add cmdtest coverage
  • Update skill docs with the new command

Impact

  • Before: ~3 minutes for 1 IAP (6+ sequential commands, agent trial-and-error)
  • After: Single command, ~2–5 seconds (1–2 API calls per IAP, parallel fan-out)
  • Dramatically improves the AI agent experience — one prompt, one command, instant answer
Originally created by @rudrankriyam on GitHub (Feb 7, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/438 ## Problem Getting the current price of all IAPs in an app requires **multiple sequential CLI calls** and takes ~3 minutes even for a single IAP. A user reported this in a tweet: > *"It took ~3m to check the IAP price. My prompt was 'Check the current price of all the IAPs in this app with \$ Asc Ppp Pricing'. Any chance to boost the whole process?"* > — [@lexrus](https://x.com/lexrus/status/1888025750755164457) ![Screenshot](https://github.com/user-attachments/assets/placeholder) ### Current workflow (per IAP) To get full pricing info for a single IAP, an agent currently has to run **4–6 commands sequentially**: 1. `asc iap list --app <APP_ID>` — discover IAPs 2. `asc iap price-schedules get --iap-id <IAP_ID>` — get schedule ID 3. `asc iap price-schedules base-territory --schedule-id <SCHEDULE_ID>` — get base territory 4. `asc iap price-schedules automatic-prices --schedule-id <SCHEDULE_ID> --paginate` — auto prices 5. `asc iap price-schedules manual-prices --schedule-id <SCHEDULE_ID> --paginate` — manual prices 6. `asc iap price-points list --iap-id <IAP_ID> --territory USA --paginate` — map price point to dollar amount For an app with **N IAPs**, this becomes **4–6×N API calls**, all sequential. Each call has network latency + JWT auth overhead, so this adds up fast. ## Proposed solution ### 1. New `asc iap prices` command (consolidated) A single command that returns a complete pricing summary for one or all IAPs in an app: ```bash # All IAPs in an app asc iap prices --app 6757860829 --output json # Single IAP asc iap prices --iap-id 6757972362 --output json # Human-readable table asc iap prices --app 6757860829 --output table ``` **Output should include (per IAP):** - IAP name, product ID, type, IAP ID - Base territory + current price (resolved to currency amount, not just price point ID) - Estimated proceeds - Scheduled price changes (territory, old → new price point, effective date) **Example JSON output:** ```json { "iaps": [ { "id": "6757972362", "name": "Lifetime Unlock", "productId": "sublist.lifetime", "type": "NON_CONSUMABLE", "baseTerritory": "USA", "currentPrice": { "amount": "9.99", "currency": "USD" }, "estimatedProceeds": { "amount": "8.49", "currency": "USD" }, "scheduledChanges": [ { "territory": "MUS", "fromPricePoint": "10127", "toPricePoint": "10137", "effectiveDate": "2026-02-16" } ] } ] } ``` ### 2. Parallel API calls internally The implementation should: - Fetch all IAPs for the app in one call - Fan out price schedule + price point lookups **concurrently** (bounded goroutines) - Resolve price point IDs → concrete currency amounts server-side using `include` / `fields` query params where the API supports it - Collapse automatic + manual prices into a single view ### 3. Use API `include` and `fields` parameters Several App Store Connect API endpoints support `include` parameters that can reduce round-trips: - `GET /v1/inAppPurchasePriceSchedules/{id}?include=manualPrices,automaticPrices,baseTerritory` — fetch schedule + prices + territory in **one call** - Use `fields[inAppPurchasePrices]` to limit response size This alone could reduce per-IAP calls from 4–6 down to **1–2**. ## Implementation checklist - [ ] Add `include` support to existing `price-schedules get` (fetch related resources in one call) - [ ] Create `internal/cli/iap/prices.go` with the consolidated `asc iap prices` command - [ ] Register in `internal/cli/iap/iap.go` and `internal/cli/registry/registry.go` - [ ] Implement concurrent fan-out for multi-IAP lookups (respect API rate limits) - [ ] Resolve price point IDs to human-readable amounts (currency + value) - [ ] Support `--output json|table|markdown` formats - [ ] Add `--territory` filter (optional, show only specific territory prices) - [ ] Add cmdtest coverage - [ ] Update skill docs with the new command ## Impact - **Before**: ~3 minutes for 1 IAP (6+ sequential commands, agent trial-and-error) - **After**: Single command, ~2–5 seconds (1–2 API calls per IAP, parallel fan-out) - Dramatically improves the AI agent experience — one prompt, one command, instant answer
kerem 2026-02-26 21:33:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#124
No description provided.