v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Products

Update details of a Product

Updates the details of an existing Product, based on the given unique identifier as either an external key or internal key.

patch/v2/products/{unique_identifier}

Path parameters

unique_identifierstring required

Unique identifier of Product. Can be the internal PartnerStack key (e.g. prod_abc123) or the external subscription key (e.g. Stripe/Chargebee product ID).

Request body

amountinteger nullable

The amount of the product in cents

external_subscription_keystring nullable

The external subscription key (e.g., from billing system)

status'trial' | 'active' | 'churned' nullable

The status of the product

Example request

{
  "amount": 10000,
  "external_subscription_key": "sub_1234567890",
  "status": "active"
}

Response

Updates the details of an existing Product, based on the given unique identifier as either an external key or internal key.

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "amount": 1000,
    "click_xid": "click_1234567890",
    "company_id": 123,
    "currency": "USD",
    "customer_key": "cust_1234567890",
    "external_subscription_key": "sub_1234567890",
    "field_data": {
      "key": "value"
    },
    "member_email": "member@example.com",
    "member_logo": "https://cdn.example.com/profile_123.jpg",
    "member_name": "Jane Doe",
    "metadata": {
      "key": "value"
    },
    "name": "Premium Plan",
    "partner_logo": "https://cdn.example.com/logo.png",
    "partner_name": "Acme Agency",
    "partnership_key": "part_1234567890",
    "product_book_key": "prod_book_1234567890",
    "stack_key": "stack_1234567890",
    "status": "active",
    "team_color": "violet"
  }
}