mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 07:35:48 +03:00
[GH-ISSUE #158] Add Offer Codes CLI support (subscription one-time use codes) #40
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rudrankriyam on GitHub (Jan 25, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/158
Summary
Add support for subscription offer codes (one-time use codes) via the App Store Connect API to distribute subscription offers.
Background
Offer codes replace promo codes for subscriptions. The App Store Connect API supports one-time use offer codes via
subscriptionOfferCodeOneTimeUseCodesand the relatedsubscriptionOfferCodesrelationships. App promo codes are not available via the API.Current State
Not implemented. Users must use the App Store Connect web UI to generate offer codes manually.
Desired Feature
Commands
API Endpoints
The App Store Connect API provides:
POST /v1/subscriptionOfferCodeOneTimeUseCodes- Create one-time use codesGET /v1/subscriptionOfferCodes/{id}/oneTimeUseCodes- List batches for an offer codeGET /v1/subscriptionOfferCodeOneTimeUseCodes/{id}- Get batch detailsGET /v1/subscriptionOfferCodeOneTimeUseCodes/{id}/values- Download code values (CSV)PATCH /v1/subscriptionOfferCodeOneTimeUseCodes/{id}- Deactivate a batchFields
Request:
numberOfCodes- Number of codes to generateexpirationDate- Date in YYYY-MM-DD formatofferCode- Relationship tosubscriptionOfferCodesResponse:
numberOfCodes- Number of codes createdcreatedDate- Creation timestampexpirationDate- Expiration dateactive- Whether the batch is activeofferCode- Related subscription offer codeExamples
Related Commands
sandbox- Sandbox testers for subscription purchase testingPriority
Medium - Useful for tester and marketing distribution workflows.
@rudrankriyam commented on GitHub (Jan 26, 2026):
@cursor implement this
@cursor[bot] commented on GitHub (Jan 26, 2026):
asc promocodes listandasc promocodes generatecommands (including optional file output), plus README docs/examples.Tests run:
make testgo test ./cmd -run PromoCodesgo test ./internal/asc -run PromoCodesWalkthrough artifact: A screen recording of the promo code test commands passing is available at
promo_codes_tests_success/recording_demo.mp4.@rudrankriyam commented on GitHub (Jan 26, 2026):
Resolved by #187 (offer codes CLI support).