The structure of the XML is straightforward and easy to read. Some tags require additional information
which is given in this chapter.

Empty elements

Empty XML elements do not have a closing tag. Instead, they are self-closing.

<AccountID />
CODE

Purchase invoice XML structure

The XML returned by the Purchase Invoices endpoint has the following structure. The structure of the
Sales Invoices is similar with the exception that it contains information about the invoice from the
Partner to one single Customer.

<InvoiceResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Invoice>
<Header>
<InvoiceID>......</InvoiceID>
<Date>......</Date>
<ExpirationDate>......</ExpirationDate>
<Currency>......</Currency>
<TermsOfPaymentDays>......</TermsOfPaymentDays>
<TaxZoneID>......</TaxZoneID>
<TaxPercentage>......</TaxPercentage>
<Type>......</Type>
<TypeIdentifier>......</TypeIdentifier>
<LanguageCode>......</LanguageCode>
<Language>......</Language>
</Header>
<Sender>
<CompanyName>......</CompanyName>
<Address>......</Address>
<PostalCode>......</PostalCode>
<City>......</City>
<CountryCode>......</CountryCode>
<Country>......</Country>
<Telephone......</Telephone>
<Fax>......</Fax>
<ChamberOfCommerce>......</ChamberOfCommerce>
<BankAccount>......</BankAccount>
<IBAN>......</IBAN>
<BIC>......</BIC>
<VATNumber>......</VATNumber>
<Website>....../</Website>
<Logo>......</Logo>
</Sender>
<Receiver>
<AccountID>......</AccountID>
<CustomerNumber>......</CustomerNumber>
<CompanyName>......</CompanyName>
<VATNumber>......</VATNumber>
<ContactFirstName>......</ContactFirstName>
<ContactMiddleName>......</ContactMiddleName>
<ContactLastName>......</ContactLastName>
<Street>......</Street>
<Zip>......</Zip>
<City>......</City>
<Country>......</Country>
<Telephone>......</Telephone>
<Email>......</Email>
</Receiver>
<Customers>
<Customer>
<AccountID>......</AccountID>
<CustomerNumber>......</CustomerNumber>
<CompanyName>......</CompanyName>
<Subscriptions>
<Subscription>
<SubscriptionID>......</SubscriptionID>
<SubscriptionName>......</SubscriptionName>
<StartDate>......</StartDate>
<LineItems>
<LineItem>
<UID>......</UID>
<Description>...... </Description>
<Quantity>......</Quantity>
<UnitPrice>......</UnitPrice>
<Discount>......</Discount>
<ExtendedPrice>......</ExtendedPrice>
<VAT>......</VAT>
<TaxZoneID>......</TaxZoneID>
<TaxPercentage>......</TaxPercentage>
<StartDate>......</StartDate>
<EndDate>......</EndDate>
<Duration>......</Duration>
<DurationType>......</DurationType>
<SKU />......</SKU>
</LineItem>
</LineItems>
</Subscription>
</Subscriptions>
</Customer>
</Customers>
<Totals>
<TotalExcludingVAT>......</TotalExcludingVAT>
<TotalVAT>......</TotalVAT>
<TotalIncludingVAT>......</TotalIncludingVAT>
</Totals>
</Invoice>
</InvoiceResponse>
XML

<InvoiceResponse>

This is the root element of the XML response, containing one or more <Invoices> depending on the
start- and end date selected.


<Invoice>

Element containing information about one single invoice.


<Header>
Element with basic information about the <Invoice>. The <Header> has the following attributes:
<InvoiceID> The identifying number of the invoice
<Date> Invoice date
<ExpirationDate> Due date of the invoice
<Currency> Currency
<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> Print out name of the language used by Copaco to create the printed version of
the invoice

<Sender>

Element with information about the <Sender>. The <Sender> has the following attributes:
<CompanyName>
<Address>
<PostalCode>
<City>
<CountryCode>
<Country>
<Telephone>
<Fax>
<ChamberOfCommerce>
<BankAccount>
<IBAN>
<BIC>
<VATNumber>
<Website>
<Logo> url used by Copaco to place the company logo on the print version of the invoice

<Receiver>

<AccountID> # Corresponding to the ID in the 2tCloud Portal
<CustomerNumber> # Corresponding 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
<Street> Corresponding street the partner registered at the chamber of commerce
<Zip> Corresponding zip code the partner registered at the chamber of commerce
<City> Corresponding city the partner registered at the chamber of commerce
<Country> Corresponding country the partner registered at the chamber of commerce
<Telephone> Billing contact telephone number
<Email> Address the invoice is send to

<Customers>

Element with information about one or more <Customers> and their <Subscriptions>

<Customer>

Element with information about the <Customer>. The <Customer> has the following attributes:
<AccountID> # Corresponding to the ID in the 2tCloud 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
<CompanyName> Name of the Customer

<Subscriptions>
Element with information about one or more <Subscriptions> and <LineItems> inside.

<Subscription>
Element with information about the <Subscription>. The <Subscription> has the following attributes:
<SubscriptionID> Corresponding to the subscription in the Platform
<SubscriptionName> Name of the subscription
<StartDate> Initial start date of the subscription

<LineItems>
Element with information about one or more <LineItems> belonging to the <Subscription>.

<LineItem>
Element with information about the <LineItem>. The <LineItem> has the following attributes:
<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 # and description. Successive line items contain the resource name of the of the line item belonging to the subscription
<Quantity> First quantity contains the # of in the subscription included resources. Successive line items contain # of resources of the line item belonging to the subscription
<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> Corresponding to the ID configured in the Platform at the 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
<DurationType> Duration type e.g. Month(s), Year
<SKU> By the Partner configured SKU number

<Totals>
Element with information about the total amount the Partner has to pay over all <Customers>.
<Totals> has the following attributes:
<TotalExcludingVAT> Total amount in Euro excluding VAT
<TotalVAT> Total VAT in Euro, exclusive of telecommunication services
<TotalIncludingVAT> Total amount including VAT

Calculating the correctness of the line item

The formula to calculate the line item:
((<Quantity> *<UnitPrice>) - <Discount>)*<Duration> = <ExtendedPrice>

Calculating the correctness of invoice totals

Total excluding VAT

The formula to calculate the total excluding VAT:
Total of <ExtendedPrice> = <TotalExcludingVAT>

Total VAT

The formula to calculate the total VAT:
<TotalVAT> is the sum of all line items where <VAT> amount is calculated, for all Services for which
VAT is applicable.

Total including VAT

<TotalIncludingVAT> = <TotalExcludingVAT> + <TotalVAT>

Telecommunication Services

VAT is applicable to all Services excluding Telecommunication Services such as Internet Connectivity
and SIP Trunk. These services are subject to VAT Reverse-charged (Btw verlegd) when sold via the
Partner to a Customer. If the Partner consumes these services within the own organization VAT is
applicable.

Please note that: Copaco is responsible for selecting the tax zone and for generating a correct invoice for
Telecommunication Services to the Partner and Customers regarding these services. The Partner is responsible
to register a Customer under the Partner account when he wants to use these services for his own benefit.

When the invoice crosses a border

VAT Reverse Charge (Btw verlegd) is applicable to all services when the invoice crosses a border. For instance, when your office is registered in Belgium and you sell services to Customers in
Luxembourg.

Please note that: The Partner is responsible for selecting the correct country of the Customer and for selecting
the tax zone which influences the calculation of VAT on the invoice for all Services where VAT is applicable.

Delegations/representatives of a state or embassy

Delegations/representatives of a state such as a king or prince, or an embassy, are also exempt from
VAT (this has not been shifted but is actually 0%). These only concerns countries that are members of
NATO.

Please note that: The Partner is responsible for selecting the correct country of the Customer and for selecting
the tax zone which influences the calculation of VAT on the invoice.