Endpoints:
Add Line Items to Quote
POST /quotes/1234/line_items
will add new line items to the existing quote with the id
of 1234
Required fields:
This endpoint expects an array of line item objects to be added to the quote.
If custom_product
is true, price
and title
are required for the line item to be added to the quote.
If custom_product
is false, variant_id
is required for the line item to be added to the quote.
This endpoint will return 200 OK
with the current JSON representation of the line items if the creation was a success. See Get Line Items endpoint for more info on the payload.
Example JSON Request
[
{
"quantity":1,
"custom_product": true,
"price":15.25,
"title": "Big Brown Bear Boots",
"sku": "23j4h22344",
"barcode": null,
"image_url": "https://hostedimatges.com/new-image.jpg",
"weight":1300,
"weight_units": "g",
"requires_shipping":true,
"taxable": true,
"discount": {
"discount_amount": 10,
"discount_type": "fixed",
"reason": "$10 off special"
},
"item_properties": [
{
"key": "property name",
"value": "property value"
}
]
},
{
"variant_id":23452345234523,
"quantity":1,
"custom_product": false
},
{...},
{...}
]
Get Line Items
GET /quotes/1234/line_items
will return the line items for the quote with the id
of 1234
.
Example JSON Response
[
{
"barcode": null,
"custom_image_path": null,
"custom_product": false,
"discount_amount": null,
"discount_reason": null,
"discount_total": null,
"discount_type": null,
"grams": 1300,
"id": 24234,
"image": "https://cdn.shopify.com/s/files/1/0741/5951/products/babys-room_925x_a0353b7b-e8a4-4ead-8a1d-f52ba1ae998d.jpg?v=1602785660",
"item_properties": [],
"line_price": 225.00,
"original_line_price": 225.00,
"product_id": 234523452345,
"quantity": 1,
"requires_shipping": false,
"sku": null,
"taxable": false,
"title": "Antique Drawers",
"total": 225.00,
"url": null,
"variant_id": 123123123123,
"variant_title": "5 Drawer",
"item_properties": [
{
"key": "property name",
"value": "property value"
}
]
},
{...}
]
Update Line Item
PUT /quotes/1234/line_items/1
will update the line item with the id
of 1
in the quote with the id
of 1234
Shopify Products:
Only the quantity of real Shopify products can be updated. Products are considered to be real Shopify products if they have a product_id
or a variant_id
This endpoint will return200 OK
with the current JSON representation of the Line Item if the creation was a success. See Get Line Items endpoint for more info on the payload.
Example JSON Request to update the Price
{
"price": 10.50
}
Example JSON Request to update SKU and the Title
{
"title": "Fur Pillow Set",
"sku": sku1234567
}
Delete Line Item
DELETE /quotes/1234/line_items/1
will delete the line item with theid
of 1 from the quote with the id
of 1234
No parameters are required. Returns200 OK
if successful.