Loading
Uniconta
Search
Generic filters
Free trial signup
  • Visit a Country Site
    • Dansk
    • Uniconta GermanyDeutsch
    • Eesti
    • Uniconta GermanyÍslenska
    • Lietuvis
    • Uniconta NetherlandsNederlands
    • Norsk
    • English
  • Search
  • Uniconta
    • What is Uniconta ?
    • Modules
    • Ledger
    • Customer
    • Sales Order
    • Vendor
    • Purchase
    • Inventory
    • Logistics
    • Project
    • Light Manufacturing
    • CRM
    • Fixed assets
    • Dashboard
    • Company
    • Adaptability
    • Uniconta Assistant App
    • Uniconta Upload App
  • Download
    • Uniconta for Windows
    • Uniconta for Mac
    • Download for Developers
    • Free trial signup
  • Resellers
    • Find a reseller
    • Become a reseller
    • Uniconta Partner info Login
    • Uniconta Partner info Sign up
  • Developers
    • Become an integration partner
    • Documentation
    • Samples
    • Downloads
  • Accountants
    • Become a Univisor
  • News Overview
    • Blog
    • News
    • Uniconta Update
    • Customer cases
  • About us
    • About us
      • Management
      • Contact
      • IT Security ISAE 3402
      • System status
    • Terms & Conditions
      • License Agreement
      • Data Processing Agreement (DPA)
      • Privacy policy
      • Cookie policy
      • Sub-processors

Developers Unipedia

  • API
    • API
    • User defined fields
    • User defined tables
    • Saving a Session
    • Posting an Invoice
    • Post Invoice and get PDF
    • Localization
    • Attach physical voucher to entities
    • Server-Login User
    • How to find C# Property from Uniconta Label
    • Minimize network traffic and optimize speed
  • Plugins
    • Plugins
    • Debug Uniconta Plugins
    • Refreshing UI with plugins
    • How to use Uniconta Plugin
    • Develop a user plugin
    • Event Handling
    • Global Script
    • How to capture menu events
    • How to open a form in Uniconta from Plugin
    • Open new content in a IContentPluginBase plugin
    • Adding plugin in a menu
    • How to add user parameter in plugin menu
    • How to create plugin with Devexpress Library
    • Synchronize Entity Support in form page
    • Develop a PageEventBase Plugin
    • Logging Exceptions on local machine
    • Create Custom Uniconta Pages From Github Code
    • Web frame integration
  • OData
    • CRUD operations in OData
    • ODATA REST API – Testing with Postman

Posting an Invoice

1,970 December 17th, 2018 January 7th, 2021 < 1 minute
Print Friendly, PDF & Email

To post an invoice you must use the InvoiceAPI’s PostInvoice method.

Below is an example of invoicing an order with order number 55.

// Goal: Invoice an order with order number: 55
// Smart way to get a specific order
var order = new DebtorOrderClient { OrderNumber = 55 };
await crud.Read(order);
// Get all orderlines on the order using a master query
var orderLines = await crud.Query<DebtorOrderLineClient>(order);
// Initialize invoice api
var iapi = new InvoiceAPI(crud);
// Post Invoice                        
var result = await iapi.PostInvoice(
    order,          // The order
    orderLines,     // The order lines of the order
    DateTime.Now,   // The DateTime of the invoice
    0,              // The invoice number. 0 means auto generate invoice number
    false);         // Simulation false. Actually invoice the order

Note that in order to post/create an invoice, you must do it from an order with order lines.

In a scenario where you must import invoices from a CSV file (or similar), you must create orders with order lines first and then invoice them.

Categories: API, Developers Unipedia
Home » Developers Unipedia » API » Posting an Invoice

Get in touch with us

Uniconta

  • Uniconta
  • Modules
  • Downloads
  • Free trial signup
  • Subscription Terms
  • System Status

PARTNER

  • Become a Reseller
  • Uniconta API key application
  • For Developers
  • For Accountants (Univisor)
  • Uniconta Partner info

INFO

  • News
  • Updates
  • Customer cases
  • Video
  • IT Security
  • About us
  • Management

Support

  • Unipedia
  • API information
  • Contacts
  • Visit a Country Site
    • Dansk
    • Uniconta GermanyDeutsch
    • Eesti
    • Uniconta GermanyÍslenska
    • Lietuvis
    • Uniconta NetherlandsNederlands
    • Norsk
    • English
Uniconta
© Copyright 2019 | All rights reserved | [email protected] | Terms & Conditions
Facebook LinkedIn Youtube