v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Products

Create a Product

Creates a new Product for a customer, based on the given product_book key, customer key, and status.

post/v2/products

Request body

amountinteger nullable

The amount of the product instance in cents

click_xidstring nullable

The click xID associated with this product

created_atinteger nullable

The created_at date of the product in epoch (ms). Optional, defaults to current time.

currencystring nullable

The currency of the product instance

customer_keystring required

The key of the customer that owns this product

external_subscription_keystring nullable

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

field_dataobject nullable

Product custom properties

metadataobject nullable

Product metadata

partnership_keystring nullable

The partnership_key of the partnership that product is associated with

product_book_keystring required

The key of the product book that defines this product

stack_keystring nullable

The stack_key of the team member that product is associated with. This corresponds to the specific partner member within that partner team.

status'trial' | 'active' | 'churned' required

The status of the product

Example request

{
  "amount": 1000,
  "click_xid": "click_1234567890",
  "created_at": 1717785600000,
  "currency": "USD",
  "customer_key": "cust_1234567890",
  "external_subscription_key": "sub_1234567890",
  "field_data": {
    "key": "value"
  },
  "metadata": {
    "key": "value"
  },
  "partnership_key": "part_1234567890",
  "product_book_key": "prod_book_1234567890",
  "stack_key": "stck_1234567890",
  "status": "active"
}

Response

Creates a new Product for a customer, based on the given product_book key, customer key, and status.

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"
  }
}