Skip to main content
A quote has a header and one or more lines. Purchase quotes (QuoteType 1) and sales quotes (QuoteType 2) use the same endpoints.
The API does not calculate line amounts, but it checks that they add up. Line amounts, discount amounts, VAT, additional taxes and withholding are stored as you send them; a line whose amounts do not follow Noyax’s rules is rejected (5118). The quote totals and AverageExchangeRate are filled from the lines; values sent for them are ignored. The rules are on the calculations page. A line’s AdditionalTaxes follow the same rules as the product’s additional taxes: at most 3, each Code required and one of the listed codes, and a code can be used only once on a line.

Required fields

  • QuoteType: 1 purchase quote, 2 sales quote. It cannot be changed after the quote is created (5015).
  • QuoteNumber: unique within the company for the same QuoteType, at most 10 characters (5002). Send "Next" on create to generate it from the company’s number series: ALTEKLİFNO for purchase quotes and VERTEKLİFNO for sales quotes. "Next" cannot be sent on update (5003).
  • Date: the quote date. If you send a time it is stored as the quote time, otherwise the current time is used.
  • CustomerCode: a customer the user can see. RepresentativeName is optional and must be a representative of that customer.
  • Lines: at least one line (5012).
The quote currency is not a request field: each line sends its own CurrencyCode. The document currency is derived from the lines (the single currency they share, or the company’s default currency when they differ) and returned as CurrencyCode. AverageExchangeRate is not sent either; it is filled from the lines (a value in the request is ignored): when all lines share one currency, the average of the line exchange rates weighted by the line amounts (the sum of AmountExcludingTax × ExchangeRate divided by the sum of AmountExcludingTax); when the lines have different currencies, 1. See currencies.

Lines

  • The product is given with ProductCode (the product’s code) or ECommerceProductCode (its e-commerce integration code); one of them is required. If both are sent, ProductCode is used. UnitCode is required. The unit must be one of the product’s own units (its main unit or its second/third unit).
  • Quantity must be greater than 0; UnitPrice cannot be negative and must exclude VAT. VatIncluded is ignored (it is still accepted so that existing requests keep working).
  • CurrencyCode is required on every line. ExchangeRate must be 1 when the line currency is the company’s default currency; otherwise it is required and must be greater than 0.
  • Discounts is the list of discount rates of the line. They are applied one after another in list order: 10, 10 and 10 give a 27.1% line discount. Leave the list empty when the line has no discount.
  • LineGroupName is optional and comes from the line groups definition.
  • Lines have no ID: their order in the list is their order in the quote, and update replaces all lines.

Status

Status is read-only. Quotes created through the API are always 0 (pending), and update never changes the status. Quotes accepted, revised or rejected in Noyax show that status here.

Editing and deleting

Editing and deleting are not restricted by status: a quote can be updated or deleted whatever its status is, even if it was already converted to an order, invoice or despatch in Noyax. Noyax only asks the user to confirm in that case; the API has no such confirmation, so check on your side before changing such quotes. A quote that other records refer to (for example a service slip or an opportunity) cannot be deleted (5014).

Sharing

SharingCode limits who can see the quote: empty means everyone, otherwise it must be one of the user’s sharing codes (5011). Quotes the user cannot see return 404.