Site.pro Site.pro
  • AI Website BuilderAI Website Builder
    • AI Website BuilderAI Website Builder
    • Online StoresOnline Stores
    • PricesPrices
    • CollaborationCollaboration
    • Website ImportWebsite Import
    • PluginsPlugins
    • Website BuilderWebsite Builder
    • TemplatesTemplates
    • For Design StudiosFor Design Studios
    • Useful LinksUseful Links
    • Affiliate ProgramAffiliate Program
    • We Build for YouWe Build for You
    • ExamplesExamples
    • LanguagesLanguages
  • DomainsDomains
    • Register Domain NameRegister Domain Name
    • Migrate DomainsMigrate Domains
    • For Domain InvestorsFor Domain Investors
    • Domain ZonesDomain Zones
    • DomainityDomainity
    • FAQ: DomainsFAQ: Domains
    • Popular Domain ZonesPopular Domain Zones
    • .com.com
    • .org.org
    • .net.net
    • .us.us
    • .co.co
  • EmailEmail
    • Free EmailFree Email
    • Email for BusinessEmail for Business
    • PricesPrices
    • Transfer EmailsTransfer Emails
    • Custom Domain EmailCustom Domain Email
    • FAQ: EmailFAQ: Email
    • Popular FAQsPopular FAQs
    • Email SetupEmail Setup
    • Auto ReplyAuto Reply
    • Auto ForwardingAuto Forwarding
    • Spam ProtectionSpam Protection
  • Accounting SoftwareAccounting Software
    • Accounting SoftwareAccounting Software
    • ModulesModules
    • PricesPrices
    • Integrations, APIIntegrations, API
    • Accounting Companies (389)Accounting Companies (389)
    • Software Integrators (52)Software Integrators (52)
    • Affiliate PartnersAffiliate Partners
    • Useful LinksUseful Links
    • Business TypesBusiness Types
    • Use CasesUse Cases
    • Accounting CompaniesAccounting Companies
    • Sole ProprietorSole Proprietor
    • InvoicingInvoicing
    • FarmerFarmer
    • E-commerceE-commerce
  • For ResellersFor Resellers
    • White LabelWhite Label
    • Revenue ShareRevenue Share
    • PricesPrices
    • PanelsPanels
    • How it WorksHow it Works
    • Marketing MaterialsMarketing Materials
    • Mass ImportMass Import
    • Our PartnersOur Partners
    • Reselling ExamplesReselling Examples
    • DocumentationDocumentation
    • Free WebsitesFree Websites
  • LearnLearn
    • Knowledge BaseKnowledge Base
    • BlogBlog
    • Growth HackingGrowth Hacking
    • For HostingsFor Hostings
    • For EducationFor Education
    • Website Сreation TutorialWebsite Сreation Tutorial
    • Teaching Institutions (69)Teaching Institutions (69)
    • Accounting Courses WorldwideAccounting Courses Worldwide
  • AI Website BuilderAI Website Builder
    • AI Website BuilderAI Website BuilderAI creates websites for you
    • Online StoresOnline StoresBuild online stores
    • PricesPricesAdvanced Features
    • CollaborationCollaborationCo-create websites live
    • Website ImportWebsite ImportImport Any Website
    • PluginsPluginsBuilder plugin and functions
    • Website BuilderWebsite BuilderKey Features
    • TemplatesTemplates200+ Awesome Templates
    • For Design StudiosFor Design StudiosBenefits for Design Studios
    • Useful LinksUseful Links
    • Affiliate ProgramAffiliate Program
    • We Build for YouWe Build for You
    • ExamplesExamples
    • LanguagesLanguages
  • DomainsDomains
    • Register Domain NameRegister Domain NameDomain registration, parking, transfer
    • Migrate DomainsMigrate DomainsTransfer. Connect. Renew
    • For Domain InvestorsFor Domain InvestorsDiscount on all domains
    • Domain ZonesDomain ZonesBuy New Domain Name
    • DomainityDomainityDomain usage by country
    • FAQ: DomainsFAQ: DomainsFind Answer
    • Popular Domain ZonesPopular Domain Zones
    • .com.com
    • .org.org
    • .net.net
    • .us.us
    • .co.co
  • EmailEmail
    • Free EmailFree EmailCreate email
    • Email for BusinessEmail for BusinessAdvanced features & protection
    • PricesPricesCheap email hosting
    • Transfer EmailsTransfer EmailsMigrate your mailboxes
    • Custom Domain EmailCustom Domain EmailEmail address with your domain
    • FAQ: EmailFAQ: EmailFind Answer
    • Popular FAQsPopular FAQs
    • Email SetupEmail Setup
    • Auto ReplyAuto Reply
    • Auto ForwardingAuto Forwarding
    • Spam ProtectionSpam Protection
  • Accounting SoftwareAccounting Software
    • Accounting SoftwareAccounting SoftwareCloud based ERP
    • ModulesModulesMain accounting software modules
    • PricesPrices30 days free trial
    • Integrations, APIIntegrations, APIIntegration with external systems
    • Accounting Companies (389)Accounting Companies (389)Choose your partner for accounting
    • Software Integrators (52)Software Integrators (52)Pick your integrations partner
    • Affiliate PartnersAffiliate PartnersPartners and Affiliate program
    • Useful LinksUseful LinksCalculators and Calendars
    • Business TypesBusiness TypesUse Cases
    • Use CasesUse Cases
    • Accounting CompaniesAccounting Companies
    • Sole ProprietorSole Proprietor
    • InvoicingInvoicing
    • FarmerFarmer
    • E-commerceE-commerce
  • For ResellersWhite LabelFor ResellersWhite Label
    • White LabelWhite LabelCustomise Builder
    • Revenue ShareRevenue ShareEarn 50% from each upgrade
    • PricesPricesRevenue Share. White Label
    • PanelsPanelsOne product for all platforms
    • How it WorksHow it WorksCloud or On-Premises
    • Marketing MaterialsMarketing MaterialsVideo. Mockups. Blocks
    • Mass ImportMass Import
    • Our PartnersOur Partners
    • Reselling ExamplesReselling Examples
    • DocumentationDocumentation
    • Free WebsitesFree Websites
  • LearnLearn
    • Knowledge BaseKnowledge BaseFAQ, Tutorial, Video
    • BlogBlogSite.pro Blog
    • Growth HackingGrowth HackingBoost your sales
    • For HostingsFor HostingsTips on marketing
    • For EducationFor EducationTraining. Tutorials
    • Website Сreation TutorialWebsite Сreation Tutorial
    • Teaching Institutions (69)Teaching Institutions (69)
    • Accounting Courses WorldwideAccounting Courses Worldwide
  • RegisterRegister
    Site.pro

    Create Your Account

    Get started — free and easy!

    Register

    By registering, you accept our Terms of Service
  • Log inLog in
    Site.pro

    Welcome back!

    Access your work space

    Log in

    New user? Create account
    Forgot password?
  • $
    $
  • EnglishEnglish
  • AI Website Builder (354)
    • Managing Website (22)
    • Website Builder (308)
      • Website creation (70)
      • Text (15)
      • Pictures (7)
      • Additional (8)
      • Media (15)
      • Social (13)
      • SEO (23)
      • Import (7)
      • Commerce (84)
      • Maps (12)
      • Advanced (19)
      • Forms (7)
      • Errors (23)
      • Custom plugins (5)
    • Web Design Studio (5)
    • Affiliate Program (9)
    • Education (10)
  • Account & Billing (37)
    • Account / Profile (8)
    • Payments (8)
  • Domains (47)
    • Purchasing (20)
    • Domain Investors (1)
    • Connecting (26)
  • Mailboxes (29)
  • Accounting Software (731)
    • Dashboard (company) (15)
    • Clients (11)
    • Warehouse (125)
      • Sales (55)
      • Simplified invoicing (5)
      • Client prices (1)
      • Automatic invoicing (1)
      • Purchases (30)
      • Sales return (5)
      • Item stock (1)
      • Prekės judėjimas (1)
      • Consignment balance (2)
      • Inventory (1)
      • Perkainavimas (1)
      • Internal movement confirmation (1)
      • E-commerce (17)
      • Cash register sales (4)
    • General ledger (31)
      • General register (16)
      • Doc. settlement (2)
      • Period closure (1)
      • Currency exchange rate range (2)
      • Currency exchange rate adjustment (1)
      • Financial accountability articles (2)
      • Cost centers (2)
      • Chart of accounts (4)
    • Bank (28)
      • Bank (10)
      • Bank link with cor. account (1)
      • Import statements (14)
      • SEPA payments (3)
    • Cashier (5)
      • Cashier (3)
      • Money receiving receipts (1)
      • Žinynai (1)
    • Reports (34)
      • Inventory report (8)
      • General ledger reports (9)
      • Ind. activity report (1)
      • Sales-purchases (4)
      • Debt management (4)
      • Balances / PLN (2)
      • Other reports (3)
    • Personnel (24)
      • Employees (19)
      • Requests (1)
      • CV (1)
      • Žinynai (3)
        • Pareigos (1)
        • Request types (2)
    • Reference book (20)
      • Item cards (5)
      • Warehouse (7)
        • Warehouses (2)
        • Operation types (5)
      • Intrastat (2)
      • Vietovės (1)
      • Bankai (1)
      • Currencies (3)
      • Currency exchange rates (1)
    • Production (5)
      • Technological cards (1)
      • Production from technological cards (2)
      • Bundle / debundle (2)
    • Assets (15)
      • Long-term assets (13)
      • Low value assets (1)
      • General report (1)
    • Documents (39)
      • Orders (19)
        • Orders (12)
        • Order attributes (5)
        • Daily allowance (2)
      • Insurance (2)
      • Sutartys (1)
      • Emails registry (2)
      • Siunčiamų laiškų registras (1)
      • Siunčiamų / gaunamų dokumentų registras (1)
      • Annual leave (9)
        • Accumulated holiday days (2)
        • Vacation balances (6)
      • Incapacity certificate (2)
      • Internal documents (2)
    • Salary (49)
      • Payroll (26)
      • Timesheets (7)
      • Darbo grafikai (1)
      • Wage prints (13)
      • Reference book (2)
        • Wage codes (Registers) (2)
    • Declaration (34)
      • Generate declarations (18)
      • Declaration signs (1)
      • i.VAZ (3)
      • i.SAF (5)
      • SAF-T (1)
      • GPAIS (6)
    • Settings (150)
      • Settings (30)
        • System and logos (5)
        • Sales (5)
        • Accounting (7)
        • Deklaravimas (1)
        • Data exchange (2)
        • Users / employees (1)
        • Invoices recognition (2)
        • Papildomi darbuotojo požymiai (1)
        • Additional item attributes (1)
        • Additional sale attributes (1)
        • Dokumentų vizavimas (1)
        • Self-employed (1)
        • Sending invoices by email (2)
      • Integrations (107)
        • API (15)
          • API for e-commerce (8)
          • API simplified (4)
        • Artificial Intelligence Assistant (3)
        • Plugins for E-shops (7)
          • WooCommerce (4)
          • PrestaShop (1)
          • Opencart (1)
          • Adobe Commerce (Magento) (1)
        • Trading Platforms (23)
          • Allegro (1)
          • eBay (2)
          • Amazon (3)
          • Shopify (5)
          • Etsy (5)
          • Site.pro (3)
          • Varle.lt (1)
          • Verskis (1)
          • Pigu.lt (1)
        • Cash registers (16)
          • Čekis cash register (1)
          • Paysera POS (1)
          • Raso cash registers (11)
          • Restera (1)
          • nSoft (1)
        • Automatic import of bank statements (6)
        • Creditonline.eu (1)
        • MIP (6)
        • Analytics (2)
      • Data import (13)
    • Account (135)
      • Dashboard (27)
      • Companies and users (30)
      • File upload (7)
      • Employee account (5)
      • My data (22)
      • Affiliate program (4)
      • Invites (3)
      • Priminimai (1)
      • Robots (5)
      • Support (7)
        • How to book the program training? (1)
      • Statistics (4)
      • Other information (20)
    • Encyclopedia (11)
  • For Resellers (135)
    • Brand (Cloud, On-Premises) (27)
      • Cloud (5)
      • On-Premises (22)
    • License (46)
    • Installation (29)
      • Website Builder (23)
      • Website Builder Plugin (6)
    • Hosting/Billing Panels (33)
      • WHMCS (6)
      • cPanel (6)
      • DirectAdmin (9)
      • ISPmanager (3)
      • Plesk (6)
      • Webuzo (2)
      • Control Web Panel (1)

Table of Contents:

Category
Search
Filter
  • All (1386)
  • AI Website Builder (367)
  • Domains (86)
  • Mailboxes (64)
  • Accounting Software (816)
  • For Resellers (461)
  • Table of Contents:

    How to create a sales item for quantity-based products via API?
    When creating a sales position for quantitative items via the API endpoint warehouse/sale-items/create, it is mandatory to specify the purchase position identifier "purchaseItemId" — a reference to the purchase document line from which the item quantity will be deducted. If this field is not provided for a quantitative item, the system returns the error: "The item is not a service, therefore the item sales position must have a reference to the item position in the purchase document." For services, this field is not required — it is mandatory only for quantitative items (when "isQuantitative" = true). Note. This error is only relevant when creating sales documents via the API. When a sales document is created in the Site.pro interface, the system selects the required purchase position automatically. Sales position fields Field requirements are described in more detail in the API documentation. Field Type DescriptionsaleIdNumberSales document ID.itemIdNumberItem ID.warehouseIdNumberWarehouse ID.quantityNumberQuantity.priceWithoutVatNumberPrice excluding VAT.vatRateNumberVAT rate (e.g., 21).priceWithVatNumberPrice including VAT.vatClassificationIdNumberVAT classification ID.purchaseItemIdNumberPurchase position ID, obtained via warehouse/stock-list. Mandatory for quantitative items. How to get the purchase position identifier You do not need to look for the purchase position ID in the item register (reference-book/items/list) — items available for sale and their balances are provided in the stock balance API endpoint warehouse/stock-list. In the request, specify the sales document ID and the item: {"saleId": 388,"filters": {"groupOp": "AND","rules": [{"field": "itemId", "op": "eq", "data": 4221}]}} In the response, find the required balance record and retrieve its purchase position identifier. If you want to deduct from the oldest purchase, filter the balances by item, warehouse, and purchase date. Use the retrieved value in the "purchaseItemId" field when creating the sales position: {"calculationMode": 6,"saleId": 388,"itemId": 4221,"warehouseId": 1,"quantity": 1,"priceWithoutVat": 100,"vatRate": 21,"priceWithVat": 121,"vatClassificationId": 1,"purchaseItemId": 595} Important. The date of the sales document cannot be earlier than the item's purchase date — you cannot sell an item that was not yet in the warehouse at that time. If the balance request returns an empty result, first check the purchase and sales dates. Note. Neither the purchase document ID nor the item ID is suitable for the \ Note. If the quantity being sold is greater than the balance of a single purchase position, split the sale into multiple sales positions — specify the corresponding purchase position and quantity for each. Note. Different API methods are used to search for items in purchase and sales documents: for purchases – “Item list” https://site.pro/My-Accounting/doc/api#api-warehouse-stock-list,, for sales – “Warehouse item balances” https://site.pro/My-Accounting/doc/api#api-reference-book-items-list. Related articles: Where can a programmer find the warehouse ID?How to use the bundle/debundle API endpoint?
    FAQ
    ›
    Accounting Software
    ›
    Settings
    ›
    Integrations
    Accounting Software

    How to create a sales item for quantity-based products via API?

    When creating a sales position for quantitative items via the API endpoint warehouse/sale-items/create, it is mandatory to specify the purchase position identifier "purchaseItemId" — a reference to the purchase document line from which the item quantity will be deducted. If this field is not provided for a quantitative item, the system returns the error: "The item is not a service, therefore the item sales position must have a reference to the item position in the purchase document." For services, this field is not required — it is mandatory only for quantitative items (when "isQuantitative" = true).

    Note. This error is only relevant when creating sales documents via the API. When a sales document is created in the Site.pro interface, the system selects the required purchase position automatically.

    Sales position fields

    Field requirements are described in more detail in the API documentation.

    Field Type Description
    saleIdNumberSales document ID.
    itemIdNumberItem ID.
    warehouseIdNumberWarehouse ID.
    quantityNumberQuantity.
    priceWithoutVatNumberPrice excluding VAT.
    vatRateNumberVAT rate (e.g., 21).
    priceWithVatNumberPrice including VAT.
    vatClassificationIdNumberVAT classification ID.
    purchaseItemIdNumberPurchase position ID, obtained via warehouse/stock-list. Mandatory for quantitative items.

    How to get the purchase position identifier

    You do not need to look for the purchase position ID in the item register (reference-book/items/list) — items available for sale and their balances are provided in the stock balance API endpoint warehouse/stock-list. In the request, specify the sales document ID and the item:

    {
    "saleId": 388,
    "filters": {
    "groupOp": "AND",
    "rules": [
    {"field": "itemId", "op": "eq", "data": 4221}
    ]
    }
    }

    In the response, find the required balance record and retrieve its purchase position identifier. If you want to deduct from the oldest purchase, filter the balances by item, warehouse, and purchase date. Use the retrieved value in the "purchaseItemId" field when creating the sales position:

    {
    "calculationMode": 6,
    "saleId": 388,
    "itemId": 4221,
    "warehouseId": 1,
    "quantity": 1,
    "priceWithoutVat": 100,
    "vatRate": 21,
    "priceWithVat": 121,
    "vatClassificationId": 1,
    "purchaseItemId": 595
    }

    Important. The date of the sales document cannot be earlier than the item's purchase date — you cannot sell an item that was not yet in the warehouse at that time. If the balance request returns an empty result, first check the purchase and sales dates.

    Note. Neither the purchase document ID nor the item ID is suitable for the \

    Note. If the quantity being sold is greater than the balance of a single purchase position, split the sale into multiple sales positions — specify the corresponding purchase position and quantity for each.

    Note. Different API methods are used to search for items in purchase and sales documents: for purchases – “Item list” https://site.pro/My-Accounting/doc/api#api-warehouse-stock-list,, for sales – “Warehouse item balances” https://site.pro/My-Accounting/doc/api#api-reference-book-items-list.

    Related articles:

    • Where can a programmer find the warehouse ID?
    • How to use the bundle/debundle API endpoint?
    © Site.pro 2011. Website Builder. United States.
    Contact SalesContact SalesTerms of ServiceTerms of ServicePrivacy PolicyPrivacy PolicyCookie SettingsCookie Settings