Skip to main content

Create

Creates a new product.

Examples

$saved = new SureCart\Models\Product([
'name' => 'Product 1',
'description' => 'Product 1 description',
])->save();

Model Attributes

archived boolean

Whether or not this product is archived.

description string

The product’s description, meant to be displayable to the customer.

licensing_enabled boolean

Whether or not licensing is enabled for this product.

license_activation_limit integer

The max number of activations allowed per license. If set to `null` then unlimited activations are allowed.

name string

The product’s name, meant to be displayable to the customer.

recurring boolean

Whether the product is for a one-time purchase or a recurring (subscription) purchase.

shipping_enabled boolean

If set to `true` checkouts with this product will require a full shipping address.

tax_category string

The tax category/code that matches this product – one of `digital`, `tangible`, `service`, or `saas`.

tax_enabled boolean

If set to `true` this product is considered taxable.

metadata object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

current_release_download string

The UUID of the current release download.

image string

The UUID of the media.

prices array

A list of this product's prices. (This can only be set when creating a new product.)

product_group string

The UUID of the product group.

Response Attributes

id string

The UUID of the specific object.

object string

A string describing the object type returned.

archived boolean

Whether or not this product is archived.

description string

The product’s description, meant to be displayable to the customer.

licensing_enabled boolean

Whether or not licensing is enabled for this product.

license_activation_limit integer

The max number of activations allowed per license. If set to `null` then unlimited activations are allowed.

name string

The product’s name, meant to be displayable to the customer.

recurring boolean

Whether the product is for a one-time purchase or a recurring (subscription) purchase.

shipping_enabled boolean

If set to `true` checkouts with this product will require a full shipping address.

tax_category string

The tax category/code that matches this product – one of `digital`, `tangible`, `service`, or `saas`.

tax_enabled boolean

If set to `true` this product is considered taxable.

metadata object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

archived_at integer

Time at which the object was archived. Measured in seconds since the Unix epoch.

current_release_download expandable

The associated current release download.

image expandable

The associated media.

metrics object

downloads expandable

A list of associated downloads.

prices expandable

A list of associated prices.

product_group expandable

The associated product group.

created_at integer

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at integer

Time at which the object was last updated. Measured in seconds since the Unix epoch.