/reportserver/

The report endpoint is used to generate HTML or PDF reports. Posting report data to the endpoint gives you the report in the chosen format in return.

Headers

Format = html, doc, xls, csv, pdf (default) CompanyKey = xxxxx Authorization = Bearer xxxxxx

Examples

Getting the report ID for CustomerInvoice report using id as parameter

GET https://dev.unieconomy.no/api/statistics?model=ReportDefinition&select=ID&filter=Name eq 'Faktura id'&wrap=false

Header

Authorization: Bearer xxxxxx
CompanyKey: xxxxx
Content-Type: application/json

Example response:

[
    {
        "ReportDefinitionID": 4
    }
]
Posting parameters and getting the report data

POST https://dev.unieconomy.no/api/report/{response[0].ReportDefinitionID}

Payload

{"Id":1}

Example response:

{
    "CustomerInvoice": [
        {
            "Customernumber": 100000,
            "AmountRegards": null,
            "BankAccountID": null,
            "CollectorStatusCode": null,
            "Comment": null,
            "CreatedAt": "2017-09-25T13:41:06.673Z",
            "CreatedBy": "8c676ad7-0279-4a89-9c3d-f5bd60e0927b",
            "CreditDays": 0,
            "Credited": false,
            "CreditedAmount": 0,
            "CreditedAmountCurrency": 0,
            "CurrencyCodeID": 1,
            "CurrencyExchangeRate": 1,
            "CustomerID": 1,
            "CustomerName": "Crypto Business Ltd",
            "CustomerOrgNumber": null,
            "CustomerPerson": null,
            "DefaultDimensionsID": 1,
            "DefaultSellerID": null,
            "Deleted": false,
            "DeliveryDate": "2017-09-25T00:00:00Z",
            "DeliveryMethod": null,
            "DeliveryName": null,
            "DeliveryTerm": null,
            "DeliveryTermsID": null,
            "DontSendReminders": false,
            "EmailAddress": null,
            "FreeTxt": null,
            "ID": 1,
            "InternalNote": null,
            "InvoiceAddressLine1": null,
            "InvoiceAddressLine2": null,
            "InvoiceAddressLine3": null,
            "InvoiceCity": null,
            "InvoiceCountry": null,
            "InvoiceCountryCode": null,
            "InvoiceDate": "2017-09-25T00:00:00Z",
            "InvoiceNumber": "1000",
            "InvoiceNumberSeriesID": 3,
            "InvoicePostalCode": null,
            "InvoiceReceiverName": null,
            "InvoiceReferenceID": null,
            "InvoiceType": 0,
            "JournalEntryID": 1,
            "OurReference": "Terje Pedersen",
            "PayableRoundingAmount": 0,
            "PayableRoundingCurrencyAmount": 0,
            "Payment": null,
            "PaymentDueDate": "2017-10-09T00:00:00Z",
            "PaymentID": "000100001000007",
            "PaymentInformation": null,
            "PaymentTerm": null,
            "PaymentTermsID": null,
            "PrintStatus": null,
            "Requisition": null,
            "RestAmount": 250,
            "RestAmountCurrency": 250,
            "SalesPerson": null,
            "ShippingAddressLine1": null,
            "ShippingAddressLine2": null,
            "ShippingAddressLine3": null,
            "ShippingCity": null,
            "ShippingCountry": null,
            "ShippingCountryCode": null,
            "ShippingPostalCode": null,
            "StatusCode": 42002,
            "SupplierOrgNumber": null,
            "TaxExclusiveAmount": 200,
            "TaxExclusiveAmountCurrency": 200,
            "TaxInclusiveAmount": 250,
            "TaxInclusiveAmountCurrency": 250,
            "UpdatedAt": "2017-09-25T13:41:07.257Z",
            "UpdatedBy": "8c676ad7-0279-4a89-9c3d-f5bd60e0927b",
            "VatTotalsAmount": 50,
            "VatTotalsAmountCurrency": 50,
            "YourReference": null,
            "Items_AccountID": 285,
            "Items_CalculateGrossPriceBasedOnNetPrice": false,
            "Items_Comment": null,
            "Items_CreatedAt": "2017-09-25T13:41:06.69Z",
            "Items_CreatedBy": "8c676ad7-0279-4a89-9c3d-f5bd60e0927b",
            "Items_CurrencyCodeID": 1,
            "Items_CurrencyExchangeRate": 1,
            "Items_CustomerInvoiceID": 1,
            "Items_Deleted": false,
            "Items_DimensionsID": 1,
            "Items_Discount": 0,
            "Items_DiscountCurrency": 0,
            "Items_DiscountPercent": 0,
            "Items_ID": 1,
            "Items_ItemSourceID": null,
            "Items_ItemText": null,
            "Items_NumberOfItems": 1,
            "Items_PriceExVat": 200,
            "Items_PriceExVatCurrency": 200,
            "Items_PriceIncVat": 250,
            "Items_PriceSetByUser": false,
            "Items_ProductID": 1,
            "Items_SortIndex": 1,
            "Items_StatusCode": 41302,
            "Items_SumTotalExVat": 200,
            "Items_SumTotalExVatCurrency": 200,
            "Items_SumTotalIncVat": 250,
            "Items_SumTotalIncVatCurrency": 250,
            "Items_SumVat": 50,
            "Items_SumVatCurrency": 50,
            "Items_Unit": null,
            "Items_UpdatedAt": "2017-09-25T13:41:07.27Z",
            "Items_UpdatedBy": "8c676ad7-0279-4a89-9c3d-f5bd60e0927b",
            "Items_VatPercent": 25,
            "Items_VatTypeID": 11,
            "productPartName": "Pizza",
            "Vkode": "NOK"
        }
    ],
    "CompanySettings": {
        "CustomValues": {},
        "AcceptableDelta4CustomerPayment": 1.2,
        "AcceptableDelta4CustomerPaymentAccountID": 561,
        "AccountGroupSetID": 1,
        "AccountingLockedDate": null,
        "AccountVisibilityGroupID": 1,
        "AgioGainAccountID": 604,
        "AgioLossAccountID": 626,
        "APActivated": false,
        "APContactID": null,
        "APGuid": "00000000-0000-0000-0000-000000000000",
        "APIncludeAttachment": false,
        "AutoJournalPayment": true,
        "BankChargeAccountID": 561,
        "BaseCurrencyCodeID": 1,
        "CompanyBankAccountID": null,
        "CompanyName": "ICO Company",
        "CompanyRegistered": false,
        "CompanyTypeID": 1,
        "CreatedAt": "2017-08-11T13:44:21.943Z",
        "CreatedBy": "99999999-9999-9999-9999-999999999999",
        "CurrentAccountingYear": 0,
        "CustomerAccountID": 94,
        "CustomerCreditDays": 14,
        "CustomerInvoiceReminderSettingsID": 1,
        "DefaultAddressID": null,
        "DefaultEmailID": null,
        "DefaultPhoneID": null,
        "DefaultProductInvoiceReminderID": null,
        "DefaultSalesAccountID": 285,
        "Deleted": false,
        "ForceSupplierInvoiceApproval": false,
        "GLN": null,
        "ID": 1,
        "LogoFileID": null,
        "OfficeMunicipalityNo": null,
        "OrganizationNumber": "-",
        "PaymentBankIdentification": null,
        "PeriodSeriesAccountID": 3,
        "PeriodSeriesVatID": 1,
        "RoundingNumberOfDecimals": 2,
        "RoundingType": 0,
        "SalaryBankAccountID": null,
        "SettlementVatAccountID": 257,
        "ShowKIDOnCustomerInvoice": false,
        "ShowNumberOfDecimals": 2,
        "StatusCode": null,
        "SupplierAccountID": 228,
        "TaxBankAccountID": null,
        "TaxMandatory": false,
        "UpdatedAt": "2017-08-15T07:06:35.863Z",
        "UpdatedBy": "8c676ad7-0279-4a89-9c3d-f5bd60e0927b",
        "UseXtraPaymentOrgXmlTag": false,
        "VatLockedDate": null,
        "VatReportFormID": null,
        "WebAddress": "",
        "DefaultEmail": null,
        "DefaultPhone": null,
        "DefaultAddress": null,
        "CompanyBankAccount": null
    },
    "VatSummary": [
        {
            "invoicenumber": "1000",
            "vatpercent": 25,
            "SumTotalExVatCurrency": 200,
            "SumVatCurrency": 50
        }
    ]
}
Posting data to the report server and getting the format yout want in return

POST https://dev.unieconomy.no/reportserver/{response[0].ReportDefinitionID}

Header

Authorization: Bearer xxxxxx
CompanyKey: xxxxx
Content-Type: application/json

Payload

Data from the previous request