View Categories

Launching soon on the Shopify App StoreAbout Request a Quote, Hide PriceJoin the waitlist

GraphQL API reference: Request a Quote

4 min read

Table of Contents

The GraphQL operations of SI Request a Quote, Hide Price. They use the same address, keys and rules as all our apps: see GraphQL API reference: Rentals & Bookings for how to send a request, and the API overview for keys, limits and errors. The same operations are in REST: REST API reference: Request a Quote.

Needs the SI Request a Quote, Hide Price app. It works on a store without Rentals & Bookings. Make the key on its API access page; a key made in any of our apps works too, because keys belong to the store. On a store without the app, its operations are refused before anything runs, with errors[].extensions.code: "app_not_installed" and data.app: "quotes". Every operation needs a secret key; mutations need Allow changes (write).

If the store’s Quotes plan doesn’t include API access, the operations answer plan_required. Ids are gid://sirentals/SalesQuote/<id>; salesQuote(id:) also takes the number (Q-1042) or the public id. Lines keep Shopify’s gid://shopify/ProductVariant/…. The codes are the REST API’s: invalid, invalid_status, not_found, plan_required, shopify_error.

Operations #

OperationArgumentsWhat it does
salesQuotes
query · secret key
returns SalesQuoteConnection!
filter: SalesQuoteFilterInput
first: Int
after: String
last: Int
before: String
The store’s quotes, newest first, by status, source, customer, a search or a change date.
salesQuote
query · secret key
returns SalesQuote
id: ID!One quote by id, number (Q-1042) or public id, with its versions, events, notes and emails; null when there is none.
createSalesQuote
mutation · secret key
returns SalesQuotePayload!
input: SalesQuoteCreateInput!Create a quote: DRAFT (you prepare it; nothing is emailed until it is sent, or send: true) or REQUEST (as if the customer asked).
updateSalesQuote
mutation · secret key
returns SalesQuotePayload!
id: ID!
input: SalesQuoteUpdateInput!
Change the working version. A sent version never changes: editing it starts the next version.
sendSalesQuote
mutation · secret key
returns SalesQuotePayload!
id: ID!Send the working version to the customer.
cancelSalesQuote
mutation · secret key
returns SalesQuotePayload!
id: ID!
reason: String
Withdraw a quote that isn’t accepted yet.
reopenSalesQuote
mutation · secret key
returns SalesQuotePayload!
id: ID!Reopen an expired, declined, rejected or cancelled quote.
convertSalesQuote
mutation · secret key
returns SalesQuoteConvertPayload!
id: ID!
mode: SalesQuoteConvertMode = INVOICE
Turn the sent version into a Shopify draft order: INVOICE (the customer gets the payment link) or ORDER (the order is made now, payment pending).
addSalesQuoteNote
mutation · secret key
returns SalesQuoteMessagePayload!
id: ID!
body: String!
Add an internal note (staff only).
addSalesQuoteMessage
mutation · secret key
returns SalesQuoteMessagePayload!
id: ID!
body: String!
Send the customer a message (emailed and shown on their quote page).
mutation NewQuote {
  createSalesQuote(input: {
    as: DRAFT
    customer: {email: "[email protected]", name: "Jordan Lee"}
    lines: [{variantId: "gid://shopify/ProductVariant/44001", title: "Party tent 6×12 m", quantity: 1, unitPrice: "1350.00"}]
    customerMessage: "Here is the price for your December event."
    send: true
  }) {
    salesQuote { id number status total }
    userErrors { code field message }
  }
}

SalesQuoteFilterInput

FieldTypeNotes
status[SalesQuoteStatus!]
searchStringNumber, customer name or email, product title or SKU.
sourceStringstorefront, cart, quick, admin, api, b2b_review, import.
customerIdID
updatedSinceStringOnly quotes changed at or after this moment (ISO 8601).

SalesQuoteCreateInput

FieldTypeNotes
asSalesQuoteCreateAs = DRAFT
customerSalesQuoteCustomerInput
lines[SalesQuoteLineInput!]
localeString
sendBooleanDRAFT only: send it at once.
customerMessageString
termsString
expiresAtStringY-m-d (end of that day in the store’s time zone) or ISO 8601.
discountSalesQuoteDiscountInput
shippingSalesQuoteShippingInput
tags[String!]

SalesQuoteCustomerInput

FieldTypeNotes
idIDThe Shopify customer (gid://shopify/Customer/… or the number), when there is one.
emailString
nameString
phoneString

SalesQuoteLineInput

FieldTypeNotes
variantIdIDA catalog variant (gid://shopify/ProductVariant/… or the number). Leave it out for a custom item.
productIdID
titleString!
variantTitleString
skuString
quantityInt!
listPriceStringThe catalog price (defaults to what the variant costs when the line comes from the storefront).
unitPriceStringYour price per unit. Empty = the list price. Required for a custom item.
requestedPriceString
discountSalesQuoteDiscountInput
taxableBoolean
requiresShippingBoolean
propertiesJSONLine properties (visible, and product-option data with keys starting with _).
noteString

SalesQuoteDiscountInput

FieldTypeNotes
typeSalesQuoteDiscountType!
valueString!A percentage (0–100) or an amount; FIXED on a line is per unit.
titleString

SalesQuoteShippingInput

FieldTypeNotes
titleString
priceString!

SalesQuoteUpdateInput

FieldTypeNotes
customerSalesQuoteCustomerInput
lines[SalesQuoteLineInput!]Replaces every line of the working version.
customerMessageString
termsString
expiresAtString
discountSalesQuoteDiscountInput
shippingSalesQuoteShippingInput
taxExemptBoolean
tags[String!]
EnumValues
SalesQuoteStatusNEW
IN_REVIEW
DRAFT
SENT
CHANGES_REQUESTED
ACCEPTED
ORDERED
EXPIRED
DECLINED
REJECTED
CANCELLED
SalesQuoteCreateAsDRAFT
REQUEST
SalesQuoteDiscountTypePERCENT
FIXED
SalesQuoteConvertModeINVOICE
ORDER
TypeFields
SalesQuote
A quote (the customer’s request and every version the store sent).
id: ID!, number: String!, publicId: String!, status: SalesQuoteStatus!, source: String!, customer: SalesQuoteCustomer!, total: String, currency: String, expiresAt: String, viewedAt: String, createdAt: String, updatedAt: String, draftOrderId: ID, orderId: ID, orderName: String, invoiceUrl: String, tags: [String!]!, answers: JSON, working: SalesQuoteVersion, sent: SalesQuoteVersion, request: SalesQuoteVersion, versions: [SalesQuoteVersionSummary!]!, notes: [SalesQuoteMessage!]!
SalesQuoteCustomerid: ID, name: String, email: String, phone: String
SalesQuoteVersionn: Int!, author: String!, locked: Boolean!, sentAt: String, currency: String, subtotal: String!, discountTotal: String!, shippingTotal: String!, taxTotal: String!, total: String!, taxesIncluded: Boolean!, customerMessage: String, terms: String, discount: JSON, shipping: JSON, lines: [SalesQuoteLine!]!
SalesQuoteLinevariantId: ID, productId: ID, title: String!, variantTitle: String, sku: String, custom: Boolean!, quantity: Int!, listPrice: String, requestedPrice: String, unitPrice: String, discount: JSON, lineTotal: String!, taxable: Boolean!, requiresShipping: Boolean!, properties: JSON, note: String
SalesQuoteVersionSummaryn: Int!, author: String!, locked: Boolean!, sentAt: String, total: String!, currency: String
SalesQuoteMessageid: ID!, author: String!, body: String!, internal: Boolean!, at: String
SalesQuotePayloadsalesQuote: SalesQuote, userErrors: [RentalUserError!]!
SalesQuoteConvertPayloadsalesQuote: SalesQuote, draftOrderId: ID, invoiceUrl: String, orderId: ID, orderName: String, userErrors: [RentalUserError!]!
SalesQuoteMessagePayloadmessage: SalesQuoteMessage, userErrors: [RentalUserError!]!