Products
Products represent in-app purchase or subscription items from Apple App Store, Google Play, or Stripe. They map store-specific product IDs to your project and can carry entitlement information used by campaigns and audience targeting.
All product endpoints require a private API key (Authorization: Bearer sk_...).
Create a Product
POST /v1/projects/:id/productsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the product |
store | string | Yes | Store type: apple, google, or stripe |
storeProductId | string | Yes | The product identifier in the store (e.g., com.app.monthly_pro) |
basePlanId | string | No | Google Play base plan ID (only relevant for google store) |
offerIds | string[] | No | Array of promotional offer IDs |
entitlements | string[] | No | Array of entitlement keys this product grants (e.g., ["pro", "analytics"]) |
displayPrice | string | No | Human-readable price string (e.g., "$9.99") |
displayPeriod | string | No | Human-readable billing period (e.g., "monthly", "annual") |
Example
curl -X POST https://agentwallie.com/api/v1/projects/PROJECT_ID/products \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_your_private_key" \
-d '{
"name": "Pro Monthly",
"store": "apple",
"storeProductId": "com.myapp.pro_monthly",
"entitlements": ["pro", "analytics"],
"displayPrice": "$9.99",
"displayPeriod": "monthly"
}'Response 201 Created
{
"id": "prod_abc123",
"name": "Pro Monthly",
"store": "apple",
"storeProductId": "com.myapp.pro_monthly",
"basePlanId": null,
"offerIds": "[\"summer_sale\"]",
"entitlements": "[\"pro\",\"analytics\"]",
"displayPrice": "$9.99",
"displayPeriod": "monthly",
"projectId": "PROJECT_ID",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z"
}⚠️
offerIds and entitlements are stored as JSON-encoded strings. When reading products, parse these fields from their string representation.
List Products
GET /v1/projects/:id/productsReturns all products for the project.
Example
curl https://agentwallie.com/api/v1/projects/PROJECT_ID/products \
-H "Authorization: Bearer sk_your_private_key"Response 200 OK
[
{
"id": "prod_abc123",
"name": "Pro Monthly",
"store": "apple",
"storeProductId": "com.myapp.pro_monthly",
"basePlanId": null,
"offerIds": null,
"entitlements": "[\"pro\"]",
"displayPrice": "$9.99",
"displayPeriod": "monthly",
"projectId": "PROJECT_ID",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z"
},
{
"id": "prod_def456",
"name": "Pro Annual",
"store": "google",
"storeProductId": "pro_annual",
"basePlanId": "annual-base",
"offerIds": null,
"entitlements": "[\"pro\"]",
"displayPrice": "$79.99",
"displayPeriod": "annual",
"projectId": "PROJECT_ID",
"createdAt": "2025-01-15T10:05:00.000Z",
"updatedAt": "2025-01-15T10:05:00.000Z"
}
]Update a Product
PUT /v1/projects/:id/products/:pidAll fields are optional. Only provided fields are updated.
Request Body
| Field | Type | Description |
|---|---|---|
name | string | New display name |
store | string | apple, google, or stripe |
storeProductId | string | New store product identifier |
basePlanId | string | Google Play base plan ID |
offerIds | string[] | Replacement offer IDs |
entitlements | string[] | Replacement entitlement keys |
displayPrice | string | Updated price string |
displayPeriod | string | Updated period string |
Example
curl -X PUT https://agentwallie.com/api/v1/projects/PROJECT_ID/products/prod_abc123 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_your_private_key" \
-d '{
"displayPrice": "$7.99",
"entitlements": ["pro", "analytics", "export"]
}'Response 200 OK
Returns the updated product object.
Delete a Product
DELETE /v1/projects/:id/products/:pidExample
curl -X DELETE https://agentwallie.com/api/v1/projects/PROJECT_ID/products/prod_abc123 \
-H "Authorization: Bearer sk_your_private_key"Response 204 No Content
No response body.
Store Types
| Store | Description | Notes |
|---|---|---|
apple | Apple App Store | Uses storeProductId as the App Store product identifier |
google | Google Play | Supports basePlanId for subscription base plans and offerIds for promotional offers |
stripe | Stripe | Uses storeProductId as the Stripe Price or Product ID |