Skip to main content
Skip table of contents

customerinvoices

The customerinvoices endpoint retrieves your sales invoices for a specified period (Customer Invoices). It contains the price data that your customers should pay to you as a reseller.

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

Example response in JSON format.

JSON
{
"Invoices":
    [
        {
        "Customers":
            [
                {
                "AccountID": ......,
                "CompanyName": "......",
                "CostCenter": "......",
                "CustomerNumber": "......",
                "Subscriptions":
                    [
                        {
                        "BillingModel": ......,
                        "PlanCategoryName": "......",
                        "PlanID": ......,
                        "PlanName": "......",
                        "PriceLines":
                            [
                                {
                                "ConsumerCompanyName": "......",
                                "ConsumerCompanyNumber": "......",
                                "Description": "......",
                                "Discount": ......,
                                "Duration": "......",
                                "DurationType": "......",
                                "EndDate": "......",
                                "ExtendedPrice": ......,
                                "LineId": ......,
                                "Quantity": ......,
                                "QuantityType": "......",
                                "RatePeriodID": ......,
                                "SKU": "......",
                                "StartDate": "......",
                                "SubPONumber": ......,
                                "TaxPercentage": ......,
                                "TaxZoneID": "......",
                                "UID": "......",
                                "UnitPrice": ......,
                                "VAT": ......
                                }
                            ],
                        "StartDate": "......",
                        "SubscriptionID": ......,
                        "SubscriptionName": "......",
                        "SubscriptionPONumber": ......
						} 
                    ]
                }
            ],
        "Header":
            {
            "Currency": "......",
            "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":
            {
            "TotalExcludingVAT": ......,
            "TotalIncludingVAT": ......,
            "TotalVAT": ......
            }
        }
    ]
}

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

Date

Invoice date

ExpirationDate

Due date of the invoice

Currency

Currency, like EUR

TermsOfPaymentDays

Terms of payment days agreed upon

Type

Invoice or credit

TypeIdentifier

Code corresponding to the type

LanguageCode

Language code used by Copaco to create the printed version of the invoice

Language

The language used by Copaco to create the printed version of the invoice

Description

Invoice description

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 2tCloud Portal

CompanyName

Name of the Sender

Address

Street the Sender is registered at the chamber of commerce

PostalCode

Postal code of the Sender

City

City the Sender is registered in the Chamber of Commerce

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

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

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. The Totals generally 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.