Project

General

Profile

User Inventory


Get Inventories

This method retrieves a list of inventories you have.

Request

Method URI
GET /inventories

* Parameters

Parameter Name Value Optional Description
item_type String Y The type of the item to include or exclude
- If you don't specify this value, this method retrieves inventories with any type of item.
- You can pass a comma-separated string to specify multiple item types to include/exclude.
- You can add a minus( - ) sign to specify a type to exclude
status String Y The status of the inventory to include or exclude
- Available values are:
-- "Y" : available
-- "S" : in stockroom A
-- "B" : in stockroom B
-- "C" : in stockroom C
-- "N" : unavailable
-- "R" : reserved
- If you don't specify this value, this method retrieves inventories in any status.
- You can pass a comma-separated string to specify multiple status to include/exclude.
- You can add a minus( - ) sign to specify a status to exclude.
category_id Integer Y The ID of the category to include or exclude
- If you don't specify this value, this method retrieves inventories with any category of item.
- You can pass a comma-separated string to specify multiple categories to include/exclude.
- You can add a minus( - ) sign to specify a category to exclude.
- You can only specify the main category of the item.
color_id Integer Y The ID of the color to include or exclude
- If you don't specify this value, this method retrieves inventories with any color of item.
- You can pass a comma-separated string to specify multiple colors to include/exclude.
- You can add a minus( - ) sign to specify a color to exclude.

* Request body

Do not supply a request body with this method.
 

Response

If successful, this method returns a list of the the summary of an inventory resource as "data" in the response body.

Example

  • GET /inventories
    • Retrieves a list of inventories
  • GET /inventories?item_type=part,set
    • Retrieves inventories of PART or SET
  • GET /inventories?category_id=123
    • Retrieves inventories of category ID #123
  • GET /inventories?status=-R
    • Retrieves a list of inventories not in RESERVED status
  • GET /inventories?status=B
    • Retrieves a list of inventories in stockroom B
  • GET /inventories?color_id=1&item_type=part
    • Retrieves inventories of color ID #123 and PART

Get Inventory

This method retrieves information about a specific inventory.

Request

Method URI
GET /inventories/{inventory_id}

* Parameters

Parameter Name Value Optional Description
inventory_id Integer The ID of the inventory to get

* Request body

Do not supply a request body with this method.
 

Response

If successful, this method returns an inventory resource as "data" in the response body.

Example

  • GET /inventories/1234
    • Retrieves a specific inventories with inventory ID #1234

Create Inventory

Creates a new inventory with an item.

Request

Method URI
POST /inventories

* Parameters

Do not supply a request parameter with this method.

* Request body

In the request body, supply an inventory resource. The inventory resource should includes:
  • item.no
  • item.type
  • color_id
  • quantity
  • unit_price
  • new_or_used
  • completeness (only when item.type is "set")
  • description
  • remarks
  • bulk
  • is_retain
  • is_stock_room
  • stock_room_id (only when is_sock_room is "true")
  • my_cost
  • sale_rate
  • tier_quantity1
  • tier_price1
  • tier_quantity2
  • tier_price2
  • tier_quantity3
  • tier_price3

Note that to set tier price options, all 6 values must be entered
 

Response

If successful, this method returns an inventory resource as "data" in the response body.

Example

  • POST /inventories
    • Creates a new inventory

Create Inventories

Creates multiple inventories in a single request. Note that you can create an inventory only with items in the BL Catalog.

Request

Method URI
POST /inventories

* Parameters

Do not supply a request parameter with this method.

* Request body

In the request body, supply an array of inventory resource. The inventory resource should includes:
  • item.no
  • item.type
  • color_id
  • quantity
  • unit_price
  • new_or_used
  • completeness (only when item.type is "set")
  • description
  • remarks
  • bulk
  • is_retain
  • is_stock_room
  • stock_room_id (only when is_sock_room is "true")
  • my_cost
  • sale_rate
  • tier_quantity1
  • tier_price1
  • tier_quantity2
  • tier_price2
  • tier_quantity3
  • tier_price3

Note that to set tier price options, all 6 values must be entered
 

Response

If successful, this method returns an empty "data".

  • POST /inventories
    • Creates new inventories

Update Inventory

This method updates properties of the specified inventory.

Request

Method URI
PUT /inventories/{inventory_id}

* Parameters

Parameter Name Value Optional Description
inventory_id Integer The ID of the inventory to update

* Request body

In the request body, supply an inventory resource. The inventory resource can includes:
  • quantity (has to have a + (plus) or - (minus) sign in front of it. You can only add or subtract quantity, not set it to a new value because quantity can change when buyers submit orders in your store. )
  • unit_price
  • description
  • remarks
  • bulk
  • is_retain
  • is_stock_room
  • stock_room_id (only when is_sock_room is "true")
  • my_cost
  • sale_rate
  • tier_quantity1
  • tier_price1
  • tier_quantity2
  • tier_price2
  • tier_quantity3
  • tier_price3

Note that to set tier price options, all 6 values must be entered
 

Response

If successful, this method returns an inventory resource as "data" in the response body.

Example

  • PUT /inventories/1234
    • Updates inventory #1234

Delete Inventory

This method deletes the specified inventory.

Request

Method URI
DELETE /inventories/{inventory_id}

* Parameters

Parameter Name Value Optional Description
inventory_id Integer The ID of the inventory to delete

* Request body

Do not supply a request body with this method.
 

Response

If successful, this method returns an empty "data".

Example

  • DELETE /inventories/1234
    • Deletes inventory #1234

Add picture from clipboard (Maximum size: 24.4 MB)