It is possible to query either salesOrder or directly from salesOrderLines.
Querying salesOrder 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 salesOrderLines 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.
Both known as Sales orders in the API context and in the product interface.
This resource serves as the comprehensive record for managing customer orders within the order-to-cash process.
Utilizing the standardized and custom data fields, it captures detailed information such as customer codes, discounts, and product lines, which are essential for fulfilling customer orders.
To change the Status of a salesOrder, refer to the global sales documents page, which details the available options depending on the document type.
API resources overview / 📝 Update Document Status
lines[]*The value of the field or object is mandatory
Array
Document Lines
Totals and discount
totalNet
Decimal
Amount after discounts, before taxes. See InfoAdditional information is available in the Info block below
totalGross
Decimal
Total amount before discounts and taxes. See InfoAdditional information is available in the Info block below
totalDiscount
Decimal
Sum of all discounts applied. See InfoAdditional information is available in the Info block below
totalCustomerDiscount
Decimal
Discount specific to the customer. See InfoAdditional information is available in the Info block below
totalLiquid
Decimal
Final amount due, including taxes. See InfoAdditional information is available in the Info block below
totalVat
Decimal
Total Value Added Tax (VAT) applied. See InfoAdditional information is available in the Info block below
totalVatBase
Decimal
Total taxable base before VAT. See InfoAdditional information is available in the Info block below
totalFeeSurcharge
Decimal
Total equivalence surcharge applied, based on VAT. See InfoAdditional information is available in the Info block below
totalVatFee
Decimal
VAT amount used as the base for the surcharge. See InfoAdditional information is available in the Info block below
discount
Decimal
Specific discount applied. See InfoAdditional information is available in the Info block below
Notes
comments
String
Notes for the customer/recipient of the document
1000
remarks
String
Internal notes for the document
1000
Customer Information
documentID
String
Identification Number See InfoAdditional information is available in the Info block below
20
documentTypeDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
DocumentType
Fields of DocumentType used for identification purposes
documentTypeIdCOMING SOON This feature is currently in development and will be available in the next version. It’s already documented to keep you informed about its upcoming availability
UUID
Identifier of the document type See InfoAdditional information is available in the Info block below
vatNumber
String
Vat Number See InfoAdditional information is available in the Info block below
20
invoiceEmail
String
Invoice Email
50
hasEquivalenceSurcharge
Boolean
Subject to the equivalence surcharge regime See InfoAdditional information is available in the Info block below
customerId: A unique identifier (UUID) for the Customer entity.
totalGross: Represents the total amount before any discounts or taxes are applied. It includes the sum of all item prices at their full value.
totalDiscount: The aggregated discount amount applied to the document, including all types of discounts that reduce the gross total.
totalNet: The total amount after applying discounts but before adding taxes. It represents the taxable base amount.
discount: Represents a specific discount amount applied within the document. This can be a percentage or a fixed amount reduction.
totalCustomerDiscount: A discount specifically applied based on customer-specific conditions, such as loyalty discounts or promotional offers tailored to the customer.
totalLiquid: The total payable amount, which includes taxes and any additional fees. This represents the final amount due.
totalVat: The total Value Added Tax (VAT) calculated on the taxable base. This amount represents the sum of all VAT applied across items in the document.
totalVatBase: The total taxable base amount before VAT is applied. This is the sum of all net amounts subject to VAT.
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
vatNumber : An EU VAT Number is a unique identifier for tax purposes within the European Union, used primarily for cross-border transactions. It starts with a two-letter country code followed by a series of numbers and sometimes letters, varying by country.
This field is not applicable for customers that are not registered in the VIES system.
documentId : Identification number, value formats may differ depending on legislationCode.
For a French , you can fill any SIREN of 9 characters or any SIRET of 14 characters.
The value is not mandatory.
For a German , you may enter either a Steuer-IdNr with exactly 11 characters or another value ranging from 11 to 14 characters.
The value is not mandatory.
For a Spanish , you need to fill a valid NIF/DNI/NIE number.
The value is mandatory.
documentTypeId: COMING SOON This feature is currently in development and will be available in the next version. It’s already documented to keep you informed about its upcoming availability
This functionality determines the corresponding document type based on the document number provided.
This determination is vital for verifying the real existence of a customer, thereby ensuring their authenticity and compliance with regulations.
Specific to sales order documents
Status:
Pending: The order is in progress and can be modified.
Closed: The order can no longer be modified; it has either been transferred to a delivery note or it has been closed.
salesOrders/lines or salesOrderLines
If the query targets salesOrders, then use lines to get the details of the lines.
If the query targets salesOrderLines, access the following fields directly, including the option to retrieve information on the parent salesOrders.
Common to all documents
Fields
Type
Description
Length
idSSystem field that cannot be assigned
UUID
Id
creationDate SSystem field that cannot be assigned
DateTime
Date of creation
modificationDate SSystem field that cannot be assigned
DateTime
Last modification date
salesOrders Parent Information
salesOrders DATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
salesOrder
Fields of the parent salesOrders
36
salesOrderId
UUID
salesOrder ID
Product Information
productDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
Sales Quote Line ID See InfoAdditional information is available in the Info block below
pendingQuantity RThis field is read-only, its value cannot be assigned
Decimal
Pending Quantity See InfoAdditional information is available in the Info block below
status
String
See InfoAdditional information is available in the Info block below
Pending
Completed
Partial
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 order document lines
pendingQuantity: The quantity of the sales order line that is still pending. This integer represents the amount of product yet to be fulfilled.
salesQuoteLineId: ID of the sales quote line that was used to define the order when generating an order from a quote.
status: The current status of the Sales Order Line, indicating the processing stage of this specific line item within the order. Possible values are:
Pending: The line item is acknowledged but not yet in process.
Completed: The line item has been fully processed and shipped.
Partial: The line item is partially fulfilled with more items yet to be processed.
salesOrders/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.
countryDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
String
Fields of Country
countryIsoCodeAlpha2
String
Country Code See InfoAdditional information is available in the Info block below
2
countryNameRThis field is read-only, its value cannot be assigned
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.