Create a quote
A quote models prices and services for a customer. Default options for header
, description
, footer
, and expires_at
can be set in the dashboard via the quote template.
Parameters
- line_
itemsarray of objects A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
- metadataobject
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata
.
More parameters
- application_
fee_ amountintegerConnect only - application_
fee_ percentfloatConnect only - automatic_
taxobject - collection_
methodenum - customerstring
- default_
tax_ ratesarray of strings - descriptionstring
- discountsarray of objects
- expires_
attimestamp - footerstring
- from_
quoteobject - headerstring
- invoice_
settingsobject - on_
behalf_ ofstringConnect only - subscription_
dataobject - test_
clockstring - transfer_
dataobjectConnect only
Returns
Returns the quote object.
Update a quote
A quote models prices and services for a customer.
Parameters
- line_
itemsarray of objects A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
- metadataobject
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata
.
More parameters
- application_
fee_ amountintegerConnect only - application_
fee_ percentfloatConnect only - automatic_
taxobject - collection_
methodenum - customerstring
- default_
tax_ ratesarray of strings - descriptionstring
- discountsarray of objects
- expires_
attimestamp - footerstring
- headerstring
- invoice_
settingsobject - on_
behalf_ ofstringConnect only - subscription_
dataobject - transfer_
dataobjectConnect only
Returns
Returns the updated quote object.
Retrieve a quote's line items
When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
Parameters
No parameters.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data
property that contains an array of up to limit
quote line items, starting after Line Item starting_after
. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty.
Retrieve a quote's upfront line items
When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
Parameters
No parameters.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data
property that contains an array of up to limit
upfront line items, starting after Line Item starting_after
. Each entry in the array is a separate Line Item object. If no more upfront line items are available, the resulting array will be empty.
Retrieve a quote
Retrieves the quote with the given ID.
Parameters
No parameters.
Returns
Returns a quote if a valid quote ID was provided. Raises an error otherwise.