Products

Create product

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
  • URL: https://api.crevio.co/v1/products
  • Auth: API key in header Authorization

Headers

Idempotency-Keystring

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

namestring
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.

descriptionstring
body_htmlstring
slugstring
button_ctastring nullable
available_fromstring date-time nullable
available_untilstring date-time nullable
tax_codestring nullable
imagesstring[]

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.

Example request

{
  "images": [
    "file_abc123"
  ]
}

Response

Product created

idstring required
objectstring required
namestring required
slugstring required
status'draft' | 'active' | 'archived' required
descriptionstring required
created_atstring date-time required
updated_atstring date-time required
metadataobject required
body_htmlstring required
button_ctastring nullable required
urlstring required
available_fromstring date-time nullable required
available_untilstring date-time nullable required
published_atstring date-time nullable required
reviews_countinteger required
average_ratingnumber nullable required

Changes

No recorded changes to this operation across all 2 revisions of this API.