You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(iap-subscriptions): update offer codes with pricing and auto-renew
- Add per-territory price and free territory support for IAP offer codes
- Introduce isAutoRenewEnabled flag for subscription offer codes
- Update CLI commands and API docs with new create parameters and examples
|`asc subscription-offer-codes create --subscription-id <id> --name <n> --duration <d> --mode <m> --periods <n> --eligibility <e>... --offer-eligibility <oe> [--auto-renew <bool>] [--price <T>=<pp-id>...] [--free-territory <T>...]`| all required as before. `--auto-renew` defaults to `true`; pass `false` for non-renewing offers (ASC accepts only `--mode FREE_TRIAL` in that case). `--price`/`--free-territory` same shape as IAP.|
29
29
|`asc subscription-offer-codes update --offer-code-id <id> --active <bool>`| both |
30
30
|`asc subscription-offer-codes prices list --offer-code-id <id>`|`--offer-code-id`|
31
31
|`asc subscription-offer-code-custom-codes list/create/update`| as IAP equivalents |
@@ -134,9 +134,9 @@ Custom codes and one-time-use codes both surface a `deactivate` affordance only
134
134
| Path | Method | Description |
135
135
|------|--------|-------------|
136
136
|`/api/v1/iap/:iapId/offer-codes`| GET | List IAP offer codes (returns `productionCodeCount`/`sandboxCodeCount` per item) |
137
-
|`/api/v1/iap/:iapId/offer-codes`| POST | Create an IAP offer code — body: `{name, customerEligibilities: ["NON_SPENDER"\|"ACTIVE_SPENDER"\|"CHURNED_SPENDER"]}`|
137
+
|`/api/v1/iap/:iapId/offer-codes`| POST | Create an IAP offer code — body: `{name, customerEligibilities[], prices: [{territory, pricePointId?}]}`. Omit `pricePointId` (or set to `null`) for a free territory. **Required at create time — read-only after.**|
138
138
|`/api/v1/subscriptions/:subscriptionId/offer-codes`| GET | List subscription offer codes (same per-environment counts) |
139
-
|`/api/v1/subscriptions/:subscriptionId/offer-codes`| POST | Create a subscription offer code — body: `{name, duration, mode, periods, customerEligibilities[], offerEligibility}`|
139
+
|`/api/v1/subscriptions/:subscriptionId/offer-codes`| POST | Create a subscription offer code — body: `{name, duration, mode, periods, customerEligibilities[], offerEligibility, isAutoRenewEnabled?, prices: [{territory, pricePointId?}]}`. `isAutoRenewEnabled` defaults to `true` (also accepts `autoRenew`). Same `prices` shape and read-only-after rule as IAP.|
140
140
|`/api/v1/iap-offer-codes/:offerCodeId/prices`| GET | Per-territory prices for an IAP offer code |
141
141
|`/api/v1/subscription-offer-codes/:offerCodeId/prices`| GET | Per-territory prices for a subscription offer code |
142
142
|`/api/v1/iap-offer-codes/:offerCodeId/one-time-codes`| GET | List one-time-use code batches |
@@ -149,9 +149,34 @@ Custom codes and one-time-use codes both surface a `deactivate` affordance only
149
149
`environment` in the POST body is optional — defaults to `production`. Accepts `"production"`, `"sandbox"`, `"PRODUCTION"`, or `"SANDBOX"`.
150
150
151
151
```bash
152
+
# Generate sandbox redemption codes for an existing offer code
152
153
curl -X POST http://localhost:8080/api/v1/iap-offer-codes/oc-1/one-time-codes \
The CSV `values` endpoint is intentionally CLI-only — REST clients should list the parent `one-time-codes` resource and follow its affordances to deactivate or create new batches.
0 commit comments