LineItems
Endpoint supporting LineItem creation, view, and deletion. A LineItem is a snapshot of a product, based on a StockItem, that has been added to a Cart.
Fields
url
- Type: url
- Read Only
The url to this line item.
cart_id
- Type: id
this and the cart attribute are tied together
cart
"type": "field",
stock_number
"type": "string", "required": true, "max_length": 64
location_number
"type": "string", "required": true, "max_length": 64
product_name
"type": "string", "max_length": 200
stock_description_1
"type": "string", "max_length": 30
stock_description_2
"type": "string", "max_length": 30
stock_description_3
"type": "string", "max_length": 30
weight
"type": "decimal",
dimensions
"type": "string", "max_length": 128
quantity
"type": "decimal", "required": false,
price
"type": "decimal",
discount_percent
"type": "decimal",
extended_price
"type": "decimal",
comments
"type": "string",
product_thumbnail
"type": "url", "max_length": 200
category_code
"type": "string", "max_length": 10
##Endpoints
List
GET /api/lineitems/
List all LineItems in all Carts that are related to your user or session.
Create
POST /api/lineitems/
{
"cart_id": null,
"cart": null,
"stock_number": "",
"location_number": "",
"quantity": null,
"comments": "",
}
Create a new LineItem in a Cart.
Retrieve
GET /api/lineitems/:key/
Return a LineItem by primary key.
Update
PUT /api/lineitems/:key/
{
"cart_id": 15918,
"stock_number": "",
"location_number": "",
"quantity": null,
"comments": "",
}
Modify / replace a LineItem.
Partial Update
PATCH /api/lineitems/:key/
{
"quantity":5
}
Modify specific fields on a LineItem (i.e. Quantity, Comments)
Destroy
DELETE /api/lineitems/:key/
Delete a LineItem (Remove from Cart).
