HTTP Operation Type Object DTO Why-DTOs?
Mutation createSalesQuote SalesQuoteCreateGLDtoInput
Mutation updateSalesQuote SalesQuoteUpdateGLDtoInput
Mutation deleteSalesQuote SalesQuoteDeleteGLDtoInput
Query salesQuotes filtered by id Why?  
Query salesQuotes  
Query salesQuoteLines  
Quick Tips

It is possible to query either salesQuote or directly from salesQuoteLines.

  • Querying salesQuote allows you to retrieve entire documents with all their associated line items.
    This is useful when you need the complete context of a document, including all details of the related lines.
  • Querying salesQuoteLines directly is beneficial when you want to filter or aggregate specific line item data across multiple documents, such as analyzing product sales, quantities, or prices.

More info API resources overview / 📝some Filter vs. Direct Line Filtering

Description

Both known as Sales quotes in the API context and in the product interface.
This resource serves as the blueprint for creating, modifying, and tracking sales quotes within the sales pipeline.
It leverages standard and customized data fields to accurately represent quotes for customers, which are crucial for managing and closing sales opportunities.

Note that it is possible to enter quotes for leads by providing the lead’s identification information within the context of the quote.
This avoids the need to always create a customer in advance.
However, this possibility is limited to the quote; as soon as a quote is won and generates an order, a customer becomes mandatory.

img

Explore the Must-See Sage Active Public API V2 Quoting Example!

Dive into the invaluable resource of our front-end app example!
This example showcases the practical use of Sage Active Public API for efficient quote management.

It’s a perfect demonstration of how you can leverage the API’s capabilities in real-world scenarios, significantly simplifying the quoting process.

Now, this application also allows you to import a complete set of demo data into the current company if it does not yet have any data.

Click here to access the example : Sample quotes

img


To see examples of mutations that include the adding of Quote :
download the Postman collection: Quick start / 5. Test your first query in Postman

graphQL Mutation
mutation ($values: SalesQuoteCreateGLDtoInput!) {  
    createSalesQuote(input: $values) {
    idoperationalNumber
  }
}
graphQL Variables
{
  "values": {
    "customerId": "{customerId}",
    "documentDate": "2023-12-05",
    "lines": [
      {
        "productId": "{productId1}",
        "totalQuantity": 50,
        "unitPrice": 11,
        "firstDiscount": 5
      },
      {
        "productId": "{productId2}",
        "totalQuantity": 1,
        "unitPrice": 140
      }
    ]
  }
}
Example of Response
{
    "data": {
        "createSalesQuote": {
            "id": "e451aff7-074f-4e72-a6fb-4ea25e9d9c64",
            "operationalNumber": "0027"
        }
    }
}
Key Value
Authorization Bearer Current access Token How to find?
X-TenantId Current tenant id How to find?
X-OrganizationId Current organization Id How to find?
x-api-key Primary or secondary subscription key of your app How to find?

salesQuotes

Common to all documents

Fields Type Description Length
id UUID Id  
creationDate DateTime Creation Date  
modificationDate DateTime Modification Date  
       
General Infos      
customer Customer Fields of Customer  
customerId UUID ID of the Customer entity. No mandatory for Quote  
documentDate DateTime Document Date  
operationalNumber String Document Number 50
status String
  • Pending
  • Closed
  • Declined
15
socialName String Social Name 50
contactName String Contact Name 50
contactPhone String Contact Phone 15
contactEmail String Contact Email 50
countryAcronym String Country Acronym 2
       
Quote Lines      
lines[] Array Document Lines  
       
Totals and discount      
totalGross Decimal Total Gross  
totalDiscount Decimal Total Discount  
totalNet Decimal Total Net  
discount Decimal Discount  
totalCustomerDiscount Decimal Total discount specific to the customer  
totalLiquid Decimal Total amount due including taxes  
totalVat Decimal Total Vat  
totalVatBase Decimal Total Vat Base  
totalFeeSurcharge Decimal Total Vat Surcharge  
totalVatFee Decimal Total Surcharge Base  
       
Notes      
comments String Comments 1000
remarks String Remarks 1000
       
Customer Information      
documentID String Identification Number 20
vatNumber String Vat Number 20
invoiceEmail String Invoice Email 50
hasEquivalenceSurcharge Boolean Subject to the equivalence surcharge regime  
mainAddress ObjectType Main Address  
deliveryAddress ObjectType Delivery Address  
salesDiscountGroup SalesDiscount Fields of SalesDiscount  
salesDiscountGroupId UUID Sales Discount ID  
salesTariff SalesTariff Fields of SalesTariff  
salesTariffId UUID Sales tariff ID  

Specific to sales quote documents

Fields Type Description Length
declinedReason String Indicates the reason why a quote was declined 100
Info
  • customerId: A unique identifier (UUID) for the Customer entity.
  • discount: Represents the total discount that has been applied to the document.
  • hasEquivalenceSurcharge/totalFeeSurcharge/totalVatFee :

    unused for the French market

    Indicates whether a customer is subject to the equivalence surcharge regime.

    The equivalence surcharge (totalFeeSurcharge), as applied in Spain, is a form of simplified VAT for retail traders who cannot recover VAT.
    The rates of the equivalence surcharge vary according to the VAT rate applicable to the products, with surcharge rates of 5.2% for products with a general VAT of 21%, 1.4% for products with a reduced VAT of 10%, and other rates for different products or categories. The equivalence surcharge is calculated on amount of general VAT (totalVatFee).

    unused for the German market

  • socialName :

    mandatory for the French market

    no mandatory for the Spanish market

    no mandatory for the Germany market

Specific to quotes

  • Status:
    • Pending: The quote is in progress and can be modified.
    • Closed: The quote can no longer be modified; it has either been transferred to an order or it has been closed.
    • Declined: The quote is declined and can no longer be modified.
  • customerId : It is not mandatory to link an existing customer in Sage Active to a quote.
    This allows for sending offers to prospects without the need to create a customer.
    For this purpose, it is possible to directly specify the contact details of the third party in the quote, which will be specific to the current quote.
    However, for other types of documents, linking the document to an existing customer is mandatory.
    For this reason, through the Sage Active interface, when generating an order from a quote, if the quote is not associated with a customer, the creation of the customer will be required.
    img

salesQuotes/lines or salesQuoteLines

If the query targets salesQuotes, then use lines to get the details of the lines.
If the query targets salesQuoteLines, access the following fields directly, including the option to retrieve information on the parent salesQuotes.

Common to all documents

Fields Type Description Length
id UUID Id  
creationDate DateTime Date of creation  
modificationDate DateTime Last modification date  
       
salesQuotes Parent Information      
salesQuotes salesQuote Fields of the parent salesQuotes 36
salesQuoteId UUID salesQuote ID  
       
Product Information      
product Product Fields of Product 36
productId UUID Product ID  
productCode String Product code 15
productName String Product name 2500
       
unitOfMeasurement Unit of Measurement Fields of Unit of Measurement  
unitOfMeasurementId UUID Unit of Measurement ID  
       
Tax and Price Information      
totalQuantity Int Quantity product  
unitPrice Decimal Unit price  
totalNet Decimal Net price  
vatPercentage Decimal VAT percentage  
equivalenceSurchargePercentage Decimal Surcharge percentage  
       
Discounts      
firstDiscount Decimal First discount percentage  

Specific to sales quote document lines

Fields Type Description Length
pendingQuantity Int Pending Quantity  
status String
  • Pending
  • Completed
  • Partial
  • Declined
15

Info

  • unitOfMeasurementId: UUID specifying the ID of the unit of measurement associated with the product.

  • firstDiscount: Various levels of discounts applicable to the document line. These are optional fields and are usually filled in based on promotional schemes or contractual obligations.

  • productId: The unique identifier for the product. Automatically filled when selecting a product.

  • vatPercentage: The percentage of Value Added Tax (VAT) applicable to this line. Important for accounting and for generating accurate invoices.
  • equivalenceSurchargePercentage: The percentage of equivalence surcharge applied in Spain .

Specific to sales quote document lines

  • pendingQuantity: The quantity of the sales quote line that is still pending. This integer represents the amount of product yet to be fulfilled.
  • status: Indicates the current status of the Sales Quote Line, reflecting its progression in the sales process. Possible statuses include:
    • Pending: The quote line is awaiting approval or further action.
    • Completed: The quote line has been fully approved and is finalized.
    • Partial: The quote line has been partially approved or is awaiting completion of certain conditions.
    • Declined: The quote line is declined and can no longer be modified.

salesQuotes/addresses

Common to all documents

Do not use the addresses[] array.
Instead, use mainAddress for the primary address and deliveryAddress for the delivery address.
Each of these objects contains only one address, representing a singular primary or delivery address, respectively.

Fields Type Description Length
countryId UUID Country Id  
country String Fields of Country  
countryIsoCodeAlpha2 String Country Code 2
countryName String CountryName  
name String Code 50
firstLine String First Line 35
secondLine String Second Line 35
city String Town 35
zipCode String Postal Code 9
province String Province 25
Info
  • countryIsoCodeAlpha2 : ISO2 country code.
    This field can be used for creation and serves as a simple alternative to assign the country of the address by using the ISO2 code directly, rather than the country ID in the Countries resource.