Sold Product

Sold products are ProductVariants that have been sold to Badge holder. You must have the merch ConventionPrivilege to access this. Sold Products are accessed via /api/soldproduct.

Properties

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

Complete details in SoldProductProperties.

Related Objects

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

badge

The Badge that purchased this sold product.

badgetype

The BadgeType of sold product, if the sold product was complimentary with a BadgeType.

convention

The Convention this sold product belongs to.

productvariant

The ProductVariant this sold product belongs to.

Includes

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

longname

A very descriptive name for this sold product. It pulls data from several objects, which is why it is not included by default.

Services

The services used to fetch and manipulate sold products.

Search SoldProducts

This section describes basic searchability of SoldProducts, which is now available across several main SoldProduct endpoints.

Available Endpoints

To request SoldProducts, a user must make a request via an endpoint for a parent object. The parent objects for which this consolidated search behavior is valid are:

BadgeType
Convention
User

Departures/differences from basic behavior will be discussed in the documentation for the specific parent=>soldproduct relationship.

This search behavior is not available on the following relationships: Badge, ConventionCart, ConventionReceipt.

A user can always see SoldProducts which belong to Badges they own, or which belong to a Convention for which the user has the merch privilege.

Returns:

 {
    "paging" : {...},
    "items" : [
        {
          "id" : "xxx",
          "soldproduct_number" : 101,
          ...
        },
        ...
    ]
 }
Optional Params
Queryables

Pass a string query to search for a partial match in specifically allowed text fields.

badge.firstname
badge.lastname
productvariant.name
soldproduct_number
Qualifiers
badge_id
badgetype_id
convention_id

convention_id is a valid qualifier but will be part of the URI (e.g. in /api/convention/xxx/soldproducts) or is implicit in all other object endpoints, so there is never need to pass it explicitly.

conventioncart_id
conventionreceipt_id
discount_id
picked_up
productvariant_id
productvariant.product_id or product_id
soldproduct_number
verified

Create Sold Product

You almost certainly want to add it to a ConventionCart instead of creating one. Or if you want to administratively create one, then use that method.

 POST /api/soldproduct
Required Params
convention_id
productvariant_id
badge_id

Returns the same as a normal read.

Administratively Create Sold Product

You almost certainly want to add it to a ConventionCart instead of creating one. Or if you want to administratively create one, then use that method.

 POST /api/soldproduct/verified
Required Params

The same as the Create Sold Product service.

Returns the same as a normal read.

Read Sold Product

 GET /api/soldproduct/xxx

Returns:

 {
   "id" : "xxx",
   "name" : "The Captain is Dead",
   ...
 }

Update Sold Product

 PUT /api/soldproduct/xxx

Returns the same as a normal read.

Delete Sold Product

 DELETE /api/soldproduct/xxx
Optional params
cashdrawer_id

You need to specify this to refund if purchased with cash in the point of sale system.

Returns:

 {
   "success" : 1
 }

Mark Picked Up

 PUT /api/soldproduct/xxx/pick-up

Returns the same as a normal read.

Unmark Picked Up

 PUT /api/soldproduct/xxx/reverse-pick-up

Returns the same as a normal read.

Convert Sold Product to Free

This refunds a charge for a sold product without deleting it. Use of this endpoint requires the merch privilege.

 PUT /api/soldproduct/xxx/convert/free

Returns the same as a normal read.

Convert Sold Product

Convert a sold product purchase to a different ProductVariant. This can be any variant for any Product, it does not need to be one with the same parent Product the sold product currently has. This will charge or refund the difference in the costs. This cannot be used for organizer-granted sold products.

 POST /api/soldproduct/xxx/convert/variant/:variant_id
Required Params
variant_id

The ID of the ProductVariant to convert the sold product to.

Returns a normal read of the sold product converted to.