Billing API's
The invoices
endpoint retrieves your purchase invoices for a specified period (Reseller Invoices). It contains the price data that you as a reseller pay to Copaco Cloud.
The endpoint returns invoice data, grouped per invoice and specified per customer and subscription.
The customer-specifications
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.
Date filtering
The invoices and customer-specification endpoint can be filtered using query (url) parameters: startDate and endDate. The format required for these parameters is: YYYYMMDD. By default, when no dates or filtering is provided, the invoices for the last three months are returned (startDate = today - 3 months, endDate = today). The filtering applies to the date the invoice is created, not the period the invoice is about. For example: if you'd like to retrieve the invoice for the subscriptions of November, you would have to filter on December 18th till December 25th since the invoice for November will be created around December 23rd.
Invoice consolidation
In the Copaco Cloud platform, invoices are created per vendor. So if you or your customers have subscriptions for Azure and VMWare, two invoices will be created in the Copaco Cloud Platform. The PDF invoice, which is sent by email to the billing contact of your organization, is a consolidated invoice. This means that the invoices of the different vendors for that month will be combined into one. The Billing API does not consolidate the individual vendor invoices. These will be available in the Billing API as separate Invoice elements.
Example response in JSON format.
{
"Invoices":
[
{
"Customers":
[
{
"AccountID": ......,
"CompanyName": "......",
"CostCenter": "......",
"CustomerNumber": "......",
"Subscriptions":
[
{
"BillingModel": ......,
"PlanCategoryName": "......",
"PlanID": ......,
"PlanName": "......",
"PriceLines":
[
{
"ConsumerCompanyName": "......",
"ConsumerCompanyNumber": "......",
"Description": "......",
"Discount": ......,
"Duration": "......",
"DurationType": "......",
"BillingFrequency": "......",
"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 |
---|---|
| element |
| element |
| element |
| element containing 1 or more |
| element consisting of sub-elements. |
Header element
The Header
element contains basic information about the Invoice
. It has the following child elements:
Element | Description |
---|---|
| The identifying number of the invoice |
| Invoice date |
| Due date of the invoice |
| Currency, like |
| Terms of payment days agreed upon |
| Invoice or credit |
| Code corresponding to the type |
| Language code used by Copaco to create the printed version of the invoice |
| The language used by Copaco to create the printed version of the invoice |
| Invoice description |
Sender element
This Sender
element has information about the Sender. It has the following child elements:
Element | Description |
---|---|
| Sender Account ID as shown in the Cloud Platform |
| Company name of the sender |
| Street the sender is registered at the chamber of commerce |
| Postal code of the sender |
| City the sender is registered in the Chamber of Commerce |
| Specific code for the country of the sender |
| Country the sender is registered at the chamber of commerce |
| Sender contact telephone number |
| Sender contact fax number |
| Number of the sender as registered in the Chamber of Commerce |
| Number of sender's Bank account |
| IBAN Number of the sender |
| Bank Identifier Code of the sender's bank account |
| VAT number of the sender |
| Sender's website |
| 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 |
---|---|
| Receiver Account ID corresponding to that in the Cloud Platform |
| Corresponds with the Copaco customer account number. |
| Company name of the receiver |
| VAT number of the receiver |
| Billing contact first name |
| Billing contact middle name |
| Billing contact last name |
| Street the receiver is registered at the chamber of commerce |
| Zip code the receiver is registered at the chamber of commerce |
| City the receiver is registered at the chamber of commerce |
| Specific code for the country of the receiver |
| Corresponding country the receiver registered at the chamber of commerce |
| Billing contact telephone number |
| Email address the invoice is sent to |
| Billing contact fax number |
| Relates to the account and specifies whether it is a reseller or an end-customer.
|
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 |
---|---|
| Corresponding to the ID in the Cloud Platform |
| Can be used by the Partner for reference to own ERP system. This value is set in the Basic details of the customer in the Cloud Platform. This field is called External Customer ID |
| N/A |
| Company name of the customer |
| Element that consists of 1 or more |
Subscription element
The Subscription
contains basic information about a customer's subscription as well as several PriceLine
elements with detailed info.
Element | Description |
---|---|
| Corresponds to the subscription in the Cloud platform |
| Name of the subscription |
| N/A |
| Corresponding to the unique offer ID that the subscription is based on |
| Corresponding to the name of the offer that the subscription is based on |
| Corresponding to the name of the vendor that the subscription is based on |
| Initial start date of the subscription |
| PO Number of the subscription (can be filled in by the Reseller) |
| Element containing a collection of 1 or more |
PriceLine element
A PriceLine
contains detailed information about its parent in this case of a Subscription. Below are the child elements of PriceLine
further explained:
Element | Description |
---|---|
| Identification number as stored in the Cloud platform |
| Corresponding to the unique offer ID that the subscription is based on |
| A combination of the vendor name and subscription name |
| Amount of licenses/services purchased |
| Specifies the type of the Quantity (e.g. item) |
| Purchase price of an individual license or service |
| The total discount of all included resources |
| The total price of the licenses or services purchased |
| Amount of VAT applicable for the line item |
| Corresponds to the tax zone ID determined by Copaco. Based on country and offer. |
| Percentage applicable to the line item |
| Start date of the subscription period |
| End date of the subscription period |
| Duration of one subscription period (1, 3, etc), to be used in combination with |
| Duration type e.g. Month(s), Year(s) |
| N/A |
| Unique internal ID corresponding to that in the Cloud platform |
| Company name of the consumer |
| PO Number at PriceLine level (currently same as on subscription level) |
| N/A |
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 |
---|---|
| Total amount in Euro excluding VAT |
| Total VAT in Euro, exclusive of telecommunication services |
| Total amount in Euro including VAT |