Product Variant

Product variants are variations on a Product, such as size or color. You cannot add a product to your ConventionCart, but you can add a product variant. You must have the merch ConventionPrivilege to access this. Product Variants are accessed via /api/productvariant.

Properties

See "Object Properties" in Introduction for basic shared properties.

Complete details in ProductVariantProperties. It also has these extra read-only properties:

quantity_available

The number of units of this variant that can still be purchased.

Related Objects

See "Related Objects" in Introduction for how to use them.

convention

The Convention this product variant belongs to.

product

The Product this product variant belongs to.

Relationships

See "Relationships" in Introduction for how to use them.

soldproducts

Services

The services used to fetch and manipulate product variants.

Search Product Variants

This will search across all conventions. To search on a single convention see "Relationships" in Convention.

 GET /api/productvariant
Optional Params
query

Searches a partial name.

Returns:

 {
    "paging" : {...},
    "items" : [
        {
          "id" : "xxx",
          "name" : "T-Shirt, Large",
          ...
        },
        ...
    ]
 }

Create Product Variant

 POST /api/productvariant
Required Params
convention_id
product_id
name

Returns the same as a normal read.

Read Product Variant

 GET /api/productvariant/xxx

Returns:

 {
   "id" : "xxx",
   "name" : "T-Shirt, Large",
   ...
 }

Update Product Variant

 PUT /api/productvariant/xxx

Returns the same as a normal read.

Delete Product Variant

 DELETE /api/productvariant/xxx

Returns:

 {
   "success" : 1
 }