getPriceQuote( )
Gets an existing price quote by ID.
Description
The getPriceQuote()
function returns a Promise that resolves to the price quote
with the specified ID.
Syntax
function getPriceQuote(id: string): Promise<PriceQuote>
getPriceQuote Parameters
NAME
TYPE
DESCRIPTION
The ID of the price quote to get.
Returns
Fulfilled - The price quote with the given ID.
Return Type:
NAME
TYPE
DESCRIPTION
ID and version of the price quote.
Status of the price quote. One of:
"Draft"
"Sent"
"Processing"
"Accepted"
"Rejected"
"Expired"
"Void"
"Deleted"
"Invoiced"
Number of the price quote, unique within your site.
Title of the price quote.
Currency code.
Locale information.
Customer listed on the price quote.
Line items listed on the price quote.
Discount included in the price quote.
Payment terms.
List of taxes calculated based on the line items.
Total values.
Additional metadata included in the price quote.
Price quote company ID.
Price quote invoice ID, when converting price quote to invoice.
Dates associated with the price quote.
Was this helpful?
Get a price quote by ID
1import { Permissions, webMethod } from 'wix-web-module';2import { priceQuotes } from 'wix-billing-backend';34export const getPriceQuote = webMethod(Permissions.Anyone, (id) => {5 return priceQuotes.getPriceQuote(id);6});78/* Promise resolves to:9 *10 * {11 * "id":{12 * "id": "411a5551-b0f6-4826-8a41-ebae2879f857",13 * "version": 2514 * },15 * "status": "Draft",16 * "number": "0000001",17 * "title": "My Price Quote",18 * "currency": "USD",19 * "customer": {20 * "contactId": "4f7c6637-0657-4696-a00b-9bc2ae4e035d",21 * "email": "john.doe@somedomain.com",22 * "address": {23 * "country": "USA",24 * "subdivision": "NY",25 * "city": "New York",26 * "postalCode": "10011",27 * "streetAddress": {28 * "value": "235 W 23rd St",29 * "type": "Name"30 * },31 * "addressLine": "someStreet",32 * "formatted": "235 W 23rd St, New York, NY 10011, USA"33 * },34 * "billingAddress": {35 * "country": "USA",36 * "streetAddress": {37 * "value": "235 W 23rd St",38 * "type": "Name"39 * },40 * "addressLine": "235 W 23rd St, New York, NY 10011, USA",41 * "postalCode": "10011",42 * "subdivision": "NY",43 * "city": "New York",44 * "formatted": "235 W 23rd St, New York, NY 10011, USA"45 * },46 * "shippingAddress": {47 * "country": "USA",48 * "streetAddress": {49 * "value": "235 W 23rd St",50 * "type": "Name"51 * },52 * "addressLine": "235 W 23rd St, New York, NY 10011, USA",53 * "postalCode": "10011",54 * "subdivision": "NY",55 * "city": "New York",56 * "formatted": "235 W 23rd St, New York, NY 10011, USA"57 * },58 * "phone": "5555555555",59 * "company": "Some Company",60 * "companyId": "Some Company Id",61 * "fullName": "John Doe",62 * "firstName": "John",63 * "lastName": "Doe"64 * },65 * "dates": {66 * "issueDate": 2019-03-13T00:00:00.000Z,67 * "validThroughDate": 2019-06-12T00:00:00.000Z,68 * "lastSeenDate": 2019-03-14T00:00:00.000Z69 * },70 * "discount": {71 * "value": 2.5,72 * "type": "Fixed"73 * },74 * "lineItems":[75 * {76 * "id": "00001",77 * "name": "Item 1",78 * "description": "First Item",79 * "price": 10.5,80 * "quantity": 3,81 * "taxes": [82 * {83 * "name": "tax name",84 * "rate": 8.5,85 * "code": "tax code"86 * }87 * ]88 * },89 * {90 * "id": "00002",91 * "name": "Item 2",92 * "description": "Second Item",93 * "price": 50,94 * "quantity": 1,95 * "taxes": [96 * {97 * "name": "tax name",98 * "rate": 8.5,99 * "code": "tax code"100 * }101 * ]102 * }103 * ],104 * "locale": {105 * "language": "en"106 * },107 * "totals": {108 * "discountAmount": null,109 * "taxedAmount": 6.93,110 * "fees": [],111 * "subtotal": 81.5,112 * "total": 88.43113 * },114 * "taxes": [115 * {116 * "name": "tax name",117 * "rate": 8.5,118 * "taxable": 81.5,119 * "taxed": 6.93,120 * "code": "tax code"121 * }122 * ],123 * "metadata": {124 * "notes": "Some note",125 * "legalTerms": "Some legal terms",126 * "sourceUrl": "http://legalurl.com",127 * "source": "Some source",128 * "sourceRefId": "Some source ref id"129 * },130 * "paymentTerms": {131 * "termType": "DueOnReceipt",132 * "termData": "some term data"133 * },134 * "companyId": "Some company id",135 * "wasSent": true136 * }137 */