Products

Creates a new product. A product can't be set to active until it has at least one price variant — create it as draft (the default), add a price variant via POST /price_variants, then PATCH the product to active.

post/products

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

ProductRequest required
name, string
status, 'draft' | 'active' | 'archived'

A product can't be set to active until it has at least one price variant. Create it as draft (or omit — draft is the default), add a price variant via POST /v1/price_variants, then PATCH the product to active.

description, string
body_html, string
slug, string
button_cta, string nullable
confirmation_message, string nullable

Markdown shown at the top of the purchase confirmation email for this product, in place of the generic greeting and thank-you. Links, bold and lists render; Crevio styles it. Takes the same variables as a sequence step body ({{customer.first_name}}, {{customer.last_name}}, {{customer.email}}, {{business.name}}, {{product.name}}, {{order.product_names}}, {{tag.name}}, {{form.name}}, {{customer.fields.<key>}}). Empty or null brings back the generic greeting. The confirmation email itself can't be turned off or replaced, because it carries the buyer's access link.

available_from, string date-time nullable
available_until, string date-time nullable
tax_code, string nullable
images, string[]

MediaLibrary file ids (e.g. file_abc123) to set as the product gallery; the first is the cover. Replaces the existing gallery — an empty array clears it. Create files via POST /v1/files or POST /v1/images/generate.

seo, object

Search-engine metadata for the product page, in the same shape it is returned. Omitted keys are left unchanged.

metadata, object

Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or "" to remove it. Echoed back on reads and in webhook payloads.

Example request

{
  "images": [
    "file_abc123"
  ]
}

Response

Product created

Product required
id, string required
object, string required
name, string required
slug, string required
status, 'draft' | 'active' | 'archived' required
description, string required
confirmation_message, string nullable required
created_at, string date-time required
updated_at, string date-time required
metadata, object required
body_html, string required
button_cta, string nullable required
url, string required

Deprecated: a product's page lives wherever its site puts it, so build links from your site's own routes.

available_from, string date-time nullable required
available_until, string date-time nullable required
tax_code, string nullable required

Stripe tax code (txcd_XXXXXXXX); null uses the account's default

published_at, string date-time nullable required
reviews_count, integer required
average_rating, number nullable required
seo, union

ID by default, full object when expanded

media_gallery, MediaGalleryItem[] required
price_variants, PriceVariant[] required
reviews, Review[]

Changes

    • info

      added the required property price_variants/items/cross_sells to the response with the status

    • info

      added the required property tax_code to the response with the status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    5 more changes in this revision