Endpoints:
Create Quote
POST /quotes
will create a new quote
Required fields:
email
, first_name
, and last_name
are required in order to create a quote,
When adding line_items:
if custom_product
is true, price
and title
are required for the product to be added to the quote.
If custom_product
is false, variant_id
is required for the product to be added to the quote.
This endpoint will return 200 OK
with the current JSON representation of the Quote if the creation was a success. See Get Quote endpoint for more info on the payload.
Example JSON Request
{
"email": "johnsmith@myemail.com",
"first_name": "John",
"last_name": "Smith",
"phone": "122-123-1234",
"remarks": "",
"customer_id": 123127982734,
"assignee_id": 12123,
"internal_notes": "",
"public_notes": "",
"tags": "priority, needs review",
"discount": {
"discount_amount": 10,
"discount_type": "fixed",
"discount_reason": "$10 off special"
},
"custom_fields": [
{
"id": 12121,
"value": "Company Name"
},
{
"id": 2569,
"value": "1234 somewhere street"
}
],
"line_items":[
{
"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"
},
"properties": {
"key": "property name",
"value": "property value"
}
},
{
"variant_id":23452345234523,
"quantity":1,
"custom_product": false
},
{...},
{...}
]
}
Get Quote
GET /quotes/1234
will return a quote with the ID of 1234
.
Example JSON Response
{
"assignee": {
"assignee_id": 234234,
"assignee_name": "Staff User"
},
"created_on": "2022-11-22T15:14:27.597",
"custom_fields": [
"id": 4767458,
"name": "Shipping Address",
"value: null
],
"customer_id": 123123123,
"discount_amount": null,
"discount_reason": null,
"discount_total": null,
"discount_type": null,
"email": "johnSmith@email.com",
"first_name": "John",
"id": 2453,
"internal_notes": "double check pricing",
"last_name": "Smith",
"line_items":[
{
"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"
}
],
"phone": null,
"public_notes": null,
"quote_number": 458,
"remarks": "Please line the drawers",
"shipping": {
"shipping_handle": null,
"shipping_name": null,
"shipping_price": null,
"shipping_total": 0,
},
"shopify_order_id": null,
"shopify_order_number": null,
"status": "Accepted",
"subtotal": 235.25,
"tags": null,
"total": 235.25,
"total_tax": 10.25,
}
Get Quotes
GET /quotes
will return a paginated list of all quotes in the shop
Optional URL parameters:
page
the value that was returned in the next_page
property from a previous request
page_size
the number of results per page
The endpoint will return a property called next_page
. This is a cursor value and can be passed as the page
parameter on subsequent calls to get the next page of results.
Example JSON Response
{
"total_records":52,
"next_page":2116349,
"data":[
{
"assignee": {
"assignee_id": 234234,
"assignee_name": "Staff User"
},
"created_on": "2022-11-22T15:14:27.597",
"custom_fields": [
"id": 4767458,
"name": "Shipping Address",
"value: null
],
"customer_id": 123123123,
"discount_amount": null,
"discount_reason": null,
"discount_total": null,
"discount_type": null,
"email": "johnSmith@email.com",
"first_name": "John",
"id": 2453,
"internal_notes": "double check pricing",
"last_name": "Smith",
"line_items":[
{
"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"
}
],
"phone": null,
"public_notes": null,
"quote_number": 458,
"remarks": "Please line the drawers",
"shipping": {
"shipping_handle": null,
"shipping_name": null,
"shipping_price": null,
"shipping_total": 0,
},
"shopify_order_id": null,
"shopify_order_number": null,
"status": "Accepted",
"subtotal": 235.25,
"tags": null,
"total": 235.25,
"total_tax": 10.25,
},
{...},
{...}
]
}
Update Quote
PUT /quotes/1
will update the quote with the id
of 1
Only quotes with a status of Created, Sent, and Viewed can be edited. If you try to update a quote with another status, you will receive a 400 error with a message that the quote has already been accepted or declined and can no longer be edited.
This endpoint will return200 OK
with the current JSON representation of the Quote if the creation was a success. See Get Quote endpoint for more info on the payload.
Example JSON Request to update the internal notes
{
"internal_notes": "Make sure this quote is complete before the end of the month"
}
Example JSON Request to update the quote status
{
"status": "accepted"
}
valid statuses are created
, sent
, viewed
, accepted
, declined
, canceled
and ordered
.
Example JSON Request to remove the assigned Shopify customer
{
"customer_id": null
}
Example JSON Request to update the customer information
{
"first_name": "Susan",
"last_name": "Johnson",
"email": "susan.johnson@email.com",
"phone": "123-123-4455"
}
Example JSON Request to update the custom fields
{
"custom_fields": [
{
"id": 7781,
"value": "option1"
},
{...}
]
}
The id
of the custom field can be found on the Custom Form Fields page.
When updating radio, drop down, and checklist field types, the value passed must be an existing option for the selected field. If the option does not exist, then the value for the custom field will be removed.
When updating dates, if the date is not in the correct format, the value will be removed from the custom field. Valid date formats are:
- YYYY-MM-DD
- MM-DD-YYYY
When updating an address field type the value passed should be a valid JSON address object with the following format. If the address is not in the correct format the value will be removed from the custom field.
{
"custom_fields": [
{
"id": 7781,
"value": {"city":"Ocean View","country":"us","countryName":"UNITED STATES","line1":"305452 Spring Ct","postalOrZip":"19970","provinceOrState":"DE","provinceOrStateName":"Delaware"}
},
{...}
]
}
Passing an empty value for a custom field will remove the existing value from the quote.
Example JSON Request to add discount
{
"discount": {
"discount_type": "percentage",
"discount_amount": 50,
"discount_reason": "50% off giveaway"
}
}
Valid discount types are fixed_amount
and percentage
Example JSON Request to add custom shipping charge
{
"shipping": {
"shipping_name": "Local Delivery",
"shipping_price": 25.50
}
}
Only custom shipping rates can be added through the API.
Delete Quote
DELETE /quotes/1
will delete the quote from your shop with the id
of 1
No parameters are required. Returns200 OK
if successful.
Send Quote
POST /quotes/email
will send the quote email to the customer
Required fields:
quote_id
is required to send the quote email.
This endpoint will return200 OK
if the request was a success.
{
"quote_id": 1231,
"include_link": false,
"include_pdf": false,
"email_assignee": true
}
Get Quotes by CustomerID
GET /customers/1234/quotes
will return a paginated list of all quotes created for the customer with the ID 1234
Optional URL parameters:
page
the value that was returned in the next_page
property from a previous request
page_size
the number of results per page
The endpoint will return a property called next_page
. This is a cursor value and can be passed as the page
parameter on subsequent calls to get the next page of results.
Example JSON Response
{
"total_records":52,
"next_page":2116349,
"data":[
{
"assignee": {
"assignee_id": 234234,
"assignee_name": "Staff User"
},
"created_on": "2022-11-22T15:14:27.597",
"custom_fields": [
"id": 4767458,
"name": "Shipping Address",
"value: null
],
"customer_id": 123123123,
"discount_amount": null,
"discount_reason": null,
"discount_total": null,
"discount_type": null,
"email": "johnSmith@email.com",
"first_name": "John",
"id": 2453,
"internal_notes": "double check pricing",
"last_name": "Smith",
"line_items":[
{
"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"
}
],
"phone": null,
"public_notes": null,
"quote_number": 458,
"remarks": "Please line the drawers",
"shipping": {
"shipping_handle": null,
"shipping_name": null,
"shipping_price": null,
"shipping_total": 0,
},
"shopify_order_id": null,
"shopify_order_number": null,
"status": "Accepted",
"subtotal": 235.25,
"tags": null,
"total": 235.25,
"total_tax": 10.25,
},
{...},
{...}
]
}