Skip to main content
Skip table of contents

consolidatedinvoices

The consolidatedinvoices endpoint retrieves your reseller invoices and attempts to match customer sales prices in the same element. This merged set of reseller costs and customer sales prices are provided on a best-effort base.

(warning) Please note (warning)

The cloud platform currently does not provide a unique reference number to reliably match reseller and customer invoices on the line item level. This billing API endpoint uses a custom algorithm that attempts to match reseller invoice lines to customer sales prices. This algorithm/endpoint is not perfect and might not return all lines, return lines more than once, or mismatch to wrong customer lines. See the Versioningsection for currently known issues in this endpoint.

Use this endpoint at your own risk. We recommend using the “Invoices“ and/or “CustomerInvoices“ endpoints instead for reliably retrieving billing data from the cloud platform.

The endpoint returns invoice data, grouped per invoice, per customer, per subscription, and specified per invoice line.

Example response in JSON format.

JSON
{
"Invoices":
    [
        {
        "Customers":
            [
                {
                "AccountID": ......,
                "CompanyName": "......",
                "CustomerCostCenter": ......,
                "CustomerNumber": "......",
                "Subscriptions":
                    [
                        {
                        "PriceLines":
                            [
                                {
                                "Description": "......",
                                "Duration": ......,
                                "DurationType": "......",
                                "EndDate": "......",
                                "LineId": ......,
                                "PurchaseDiscount": ......,
                                "PurchasePrice": ......,
                                "PurchaseVAT": ......,
                                "Quantity": ......,
                                "QuantityType": "......",
                                "SalesDiscount": ......,
                                "SalesPrice": ......,
                                "SalesVAT": ......,
                                "SKU": "......",
                                "StartDate": "......",
                                "TaxPercentage": ......,
                                "TaxZoneID": "......",
                                "UID": "......",
                                "UnitPrice": ......
                                }
                            ],
                        "StartDate": "......",
                        "ExpirationDate": "......",
                        "SubscriptionID": ......,
                        "SubscriptionName": "......"
                        }
                    ]
                }
            ],
        "Header":
            {
            "Currency": "EUR",
            "Date": "......",
            "Description": "......",
            "ExpirationDate": "......",
            "InvoiceID": "......",
            "Language": "......",
            "LanguageCode": "......",
            "TermsOfPaymentDays": ......,
            "Type": "......",
            "TypeIdentifier": ......
            },
        "Receiver":
            {
            "AccountID": ......,
            "Address": "......",
            "City": "......",
            "CompanyName": "......",
            "ContactFirstName": "......",
            "ContactLastName": "......",
            "ContactMiddleName": "......",
            "Country": "......",
            "CountryCode": "......",
            "CustomerNumber": "......",
            "Email": "......",
            "Fax": ......,
            "Telephone": "......",
            "Type": ......,
            "VATNumber": "......",
            "Zip": "......"
            },
        "Sender":
            {
            "AccountID": ......,
            "Address": "......",
            "BankAccount": "......",
            "BIC": "......",
            "ChamberOfCommerce": "......",
            "City": "......",
            "CompanyName": "......",
            "Country": "......",
            "CountryCode": "......",
            "Fax": "......",
            "IBAN": "......",
            "Logo": "......",
            "PostalCode": "......",
            "Telephone": "......",
            "VATNumber": "......",
            "Website": "......"
            },
        "Totals":
            {
            "TotalPurchases":
                {
                "TotalExcludingVAT": ......,
                "TotalIncludingVAT": ......,
                "TotalVAT": ......
                },
            "TotalSales":
                {
                "TotalExcludingVAT": ......,
                "TotalIncludingVAT": ......,
                "TotalVAT": ......
                }
            }
        }
    ]
}

The ConsolidatedInvoice endpoint contains one <Invoices> element which is a collection of 1 or more <Invoice> elements . This <Invoice> consists of a <Header>, <Sender>,  <Receiver>, <Customers>  and <Totals> element.

Invoice element

The Invoices element contains information about one single invoice.

Each Invoice consists of:

Element

Description

Header

element

Sender

element

Receiver

element

Customers

element containing  1 or more Customer elements

Totals

element consisting of sub-elements.

Header element

The Header element contains basic information about the Invoice. It has the following child elements:

Element

Description

InvoiceID

The identifying number of the invoice, like TN0012345

Date

Invoice date, like 20230301 (1st of March 2023)

ExpirationDate

Payment due date of the invoice, like 20230309 (9th of March 2023)

Currency

Currency, like EUR

TermsOfPaymentDays

Terms of payment in days, like 8

Type

Type of document provided, like INVOICE, DEBIT or CREDIT

TypeIdentifier

Type Code of document corresponding to the type, like 20

LanguageCode

Language code used to create the printed version of the document, like en, nl or fr

Language

The language used to create the printed version of the document, like English, Dutch or French

Description

Invoice description, like Monthly Invoice

Sender element

This Sender element has information about the Sender. It has the following child elements:

Element

Description

AccountID

Sender Account ID as shown in the Cloud management portal, like 1000473

CompanyName

Name of the Sender of the document, like Copaco Nederland B.V.

Address

Street the Sender is registered at the chamber of commerce, like Hoevenweg 21

PostalCode

Postal code of the Sender, like 5652AW

City

City the Sender is registered in the Chamber of Commerce, like Eindhoven

CountryCode

Specific code for the country of the Sender

Country

Country the Sender is  registered at the chamber of commerce

Telephone

Sender contact telephone number

Fax

Sender contact fax number

ChamberOfCommerce

Number of the Sender as registered in the Chamber of Commerce

BankAccount

Number of Sender's Bank account

IBAN

IBAN Number of the Sender  

BIC

Bank Identifier Code of the Sender's bank account

VATNumber

VAT number of the Sender

Website

Sender's website

Logo

Publicly accessible URL to your company logo, to place the company logo on the print version of the invoice

 

Receiver element

The Receiver element in an Invoice contains info about the receiving Partner and has the following child elements:

Element

Description

AccountID

Receiver Account ID corresponding to that in the 2tCloud Portal

CustomerNumber

Corresponds with the Copaco customer account number

CompanyName

Name of the Partner

VATNumber

VAT number of the Partner

ContactFirstName

Billing contact first name

ContactMiddleName

Billing contact middle name

ContactLastName

Billing contact last name

Address

Street the partner is registered at the chamber of commerce

Zip

 Zip code the partner is registered at the chamber of commerce

City

City the partner is registered at the chamber of commerce

CountryCode

Specific code for the country of the Receiver

Country

Corresponding country the partner registered at the chamber of commerce

Telephone

Billing contact telephone number

Email

Email Address the invoice is sent to

Fax

Billing contact Fax number

Type

Relates to the Account and specifies whether it is a Reseller or an EndCustomer.

  • Type 2 = Reseller

  • Type 3 = EndCustomer

Customer element

An Invoice normally has a Customers child element. This contains 1 or more Customer elements. The child elements of Customer are:

Element

Description

AccountID

Corresponding to the ID in the Copaco Cloud Portal

CustomerNumber

Can be used by the Partner for reference to own ERP system. This number is set in the Control Panel at the additional information tab in the billing section

CostCenter

 

CompanyName

Name of the Customer

Subscriptions

Element that consists of 1 or more Subscription elements

 

Subscription element

The Subscription contains basic information about a customer's subscription as well as several LineItem elements with detailed info.

Element

Description

SubscriptionID

Corresponds to the subscription in the Platform

SubscriptionName

Name of the subscription

BillingModel

An integer number, referring to a specific billing model like Pay before the subscription period, pay after the subscription period, pay as you go, or Externally rated.

PlanID

An integer number, referring to the unique service plan ID that the subscription is based on.

PlanName

Contains a list of names given to the service plan in different languages.

PlanCategoryName

Internal identifier for the product category for the service plan

StartDate

Initial start date of the subscription

ExpirationDate

Relative date field that contains the current subscription expiration date. Please note that this field will be updated automatically on the renewal moment and set to a new future date as long as the auto-renewal feature is activated.

SubscriptionPONumber

PO Number of the Subscription (can be filled in by the Reseller)

PriceLines

Element containing a collection of 1 or more LineItem elements

 

LineItem element

A LineItem contains detailed information about its parent in this case of a Subscription. Below are the child elements of LineItem further explained:

Element

Description

LineId

Identification number as stored in the Copaco Cloud portal

UID

The first UID is corresponding to the identifying number configured in the plan starting with a P form ‘plan’. The second and every UID after until the next subscription starts with a R from ‘resource’. A resource is an addition to the initial subscription

Description

First line item contains the subscription #number and description. Successive line items contain the resource name of the line item belonging to the subscription

Quantity

First quantity contains the amount of in the subscription included resources. Successive line items contain number of resources of the line item belonging to the subscription

QuantityType

Specifies the type of the Quantity (e.g. item)

UnitPrice

Price of the line item the Customer can order the item for

Discount

The total discount of all included resources

ExtendedPrice

The amount to be paid for the line item

VAT

Amount of VAT applicable for the line item

TaxZoneID

Corresponds to the ID configured in the Platform at a subscription level

TaxPercentage

Percentage applicable to the line item

StartDate

Start date of the subscription period

EndDate

End date of the subscription period

Duration

Duration of one subscription period (1, 3, etc), to be used in combination with DurationType Value

DurationType

Duration type e.g. Month(s), Year

SKU

By the Partner configured SKU number of the subscription period recurring fee. This field is empty by default.

ConsumerCompanyNumber

Unique internal ID (integer value) of the company account.

ConsumerCompanyName

Name of the Customer

SubPONumber

PO Number at LineItem level (currently same as on subscription level)

RatePeriodId

Internal Identifier of the resource rate period in the platform, unique per reseller.

 

Totals element

An Invoice normally ends with a Totals element where the accumulated price data of all the prior elements is stored. As result, it displays information about the total amount the Partner has to pay over all Customers.

Typical for a consolidatedinvoice endpoint result is that the <Totals> element consists of a <TotalPurchases> and <TotalSales> sub-element.

The <TotalPurchases> and <TotalSales> sub-elements consist of:

Element

Description

TotalExcludingVAT

Total amount in Euro excluding VAT

TotalVAT

Total VAT in Euro, exclusive of telecommunication services

TotalIncludingVAT

Total amount in Euro including VAT

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.