Part Properties

Each part has the following properties and is accessed via /api/part. Complete details in PartProperties.

id

The unique id for this part. It will never change.

wing_object_type

part.

date_created

A date when the part was created.

date_updated

A date when the part was last updated.

name

The name the part is known by.

quantity

An integer between 1 and 2147483647. Defaults to 1. This is how many of the part are in stock.

photo_id

A File id. Sets an image of the part. The ID is from a File. If a photo_id is specified, then an extra property called photo will be added which will briefly describe the image.

description

A full written description of the part.

price

The retail price of this part.

price_10

The same as price, but represents the price for each when purchased in quantities of 10 or greater.

price_100

The same as price_10, but represents the price for each when purchased in quantities of 100 or greater.

price_1000

The same as price_100, but represents the price for each when purchased in quantities of 1000 or greater.

original_price

The same as price, but ignores sales.

original_price_10

The same as original_price, but represents the price for each when purchased in quantities of 10 or greater.

original_price_100

The same as original_price_10, but represents the price for each when purchased in quantities of 100 or greater.

original_price_1000

The same as original_price_100, but represents the price for each when purchased in quantities of 1000 or greater.

sku_id

A Sku id. The stock keeping unit to be used when adding this to the Cart.

weight

The weight of this part in pounds.

color

The color of the part. Defaults to Pictured. See Part Options below for details.

category

Basic taxonomy for the part. Defaults to Miscellaneous. See Part Options below for details.

Part Relationships

gameparts

The list of GamePart that use this part.

sku

Sku

Part Methods

The methods used to fetch and manipulate parts.

Part Options

Provides a list of the options that can be used to fill out various fields when creating or updating a part.

 GET /api/part/_options

Returns:

 {
    "color" : [...],
    "category" : [...]
 }

NOTE: You can also get this data by adding _include_options=1 to the parameter list when fetching a part.

Create Part

 POST /api/part
session_id

Required. The unique session id provided by a Session method.

name

Required.

photo_id

Optional.

weight

Optional.

quantity

Optional.

low_quantity

Optional.

color

Optional.

category

Optional.

notes

Optional.

description

Optional.

Returns:

 {
   "id" : "xxx",
   "name" : "Joystick Pawn",
   ...
 }

Update Part

 PUT /api/part/xxx

See Create Part for details.

Delete Part

 DELETE /api/part/xxx
session_id

Required. The unique session id provided by a Session method.

Returns:

 {
   "success" : 1
 }

Fetch Part

 GET /api/part/xxx
session_id

Optional. The unique session id provided by a Session method.

_include_options

Optional. See "Options" in Intro and Part Options above for details.

_include_relationships

Optional. See "Relationships" in Intro and Part Relationships above for details.

Returns:

 {
   "id" : "xxx",
   "name" : "Rope",
   ...
 }

Search All Parts

See Search.

^ Back to Top ^