User Tools

Site Tools


api:integration:uniconta:export_invoices

API : Uniconta Create Invoices

Introduction

Used to export a month of invoices to Uniconta as invoice drafts.

Before the export is queued, every invoice's customer and every invoice line's product code is checked against the reseller's Uniconta data, so the request fails up front when the export cannot succeed. The export itself runs afterwards, which means that by the time this request responds, it will not be done exporting.

An e-mail will be sent to the user (if they are registered with an e-mail address) and the customer's accounting system email when the export is done.

If the export of invoices should fail, then all the invoices that have been exported will also be deleted from Uniconta as a safety measure.

Request

URL https://api.telecomx.dk/integration/uniconta/invoice/draft
Method POST
Access level RESELLER for their own customer.
RESELLER_ADMIN or ADMIN for any reseller.
Query reseller Id [optional] Id of the reseller to export invoices for. Only used for RESELLER_ADMIN and ADMIN, defaults to the user's own customer
Body invoiceDate String [optional] Invoice date to export, in YYYY-MM-DD format. Must be the first day of a month, e.g. 2026-09-01. Defaults to the first of the current month
invoicesToOmit Array<Id> [optional] Ids of invoices not to export

The reseller's Uniconta integration must have a username, password and company id.

Query examples

POST https://api.telecomx.dk/integration/uniconta/invoice/draft
POST https://api.telecomx.dk/integration/uniconta/invoice/draft?reseller=650000000000000000000001

Body example

{
  "invoiceDate": "2026-09-01",
  "invoicesToOmit": [ "650000000000000000000002", "650000000000000000000003" ]
}

Response

Json object
success Boolean True when the export was queued, or when there was nothing to export
total Number How many invoices there are in total for the invoice date, including the omitted ones
exported Number How many invoices are exported. 0 when there is nothing to export, and then no export is queued

Example

{
  "success": true,
  "total": 50,
  "exported": 48
}

Errors

A single failure found while checking the invoices is returned on its own; two or more are returned together as multiple, with the individual errors inside.

Error code Message Description
422 <property> Invalid input for the named property - the request body, query or URL parameter failed validation
422 invoiceDate Invalid invoice date
403 access_denied Insufficient access level
404 reseller Reseller not found
404 integration Uniconta integration not found
400 uniconta Error fetching Uniconta customers
400 uniconta Error fetching Uniconta products
422 customer Customer was not found for invoice: <invoice id>
422 finance.accountingSystemId Accounting system ID is not found for: <customer name>
404 finance.accountingSystemId Customer not found in Uniconta: <customer name>
404 uniconta.product Product number not found in uniconta with product code: <product code>
422 multiple Multiple errors - see inner
500 internal_error <Unspecified>
api/integration/uniconta/export_invoices.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki