api:invoice:list
Table of Contents
API : Invoice List
Introduction
This request will return a list of invoices for a customer.
Request
| URL | https://api.telecomx.dk/invoice | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER - invoices for customers , ADMIN. | |
| Query | customer | [optional] Id of customer to return invoices for (RESELLER/ADMIN only). |
| externalLicenses | Boolean - if true, returns the external license invoice lines instead. | |
| offset | [optional] Index of the first product to return, default 0. |
|
| limit | [optional] The number of products to return, default 50, min 1, max 500. |
|
| reseller | [optional] Id of reseller to get customer invoices for. Documentation for the data send and received is found here: API : Invoice List (reseller overview of their customer invoices) |
|
| expand | [optional] If true, full customer data (name, address, invoicing e-mail address) is included in the reply. Subtotals will also be calculated for all invoices. |
|
| format | [optional] Can be “csv” or “json”. If not given, defaults to json. If none of the headers below are given, then they are all included in the CSV. |
|
| customerName | [optional] If format is CSV - adds this column to the csv file. |
|
| vatNumber | [optional] If format is CSV - adds this column to the csv file. |
|
| productCode | [optional] If format is CSV - adds this column to the csv file. |
|
| amount | [optional] If format is CSV - adds this column to the csv file. |
|
| wholesalePrice | [optional] If format is CSV - adds this column to the csv file. |
|
| customerPrice | [optional] If format is CSV - adds this column to the csv file. |
|
| name | [optional] If format is CSV - adds this column to the csv file. |
|
| description | [optional] If format is CSV - adds this column to the csv file. |
|
| customerId | [optional] If format is CSV - adds this column to the csv file. |
|
Query examples
https://api.telecomx.dk/invoice https://api.telecomx.dk/invoice?offset=50&limit=25 https://api.telecomx.dk/invoice?customer=1234567890ABCDEF12345678
Response
| JSON object | |
|---|---|
| offset | Index of the first invoice returned. |
| limit | Number of invoices to return. Note that the actual number of invoices returned may be lower. |
| total | Number of invoices that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| invoices | Array of invoices, see definition below. |
| Invoice object (JSON) | ||
|---|---|---|
| _id | Id | Unique invoice id. |
| customer | Id | Id of customer invoice is for. |
| sent | Boolean | True if invoice has been sent to the customer. |
| invoiceNumber | String | Invoice number. If it is -1, then it is waiting to be set by the accounting system. |
| period | Boolean | True if this is a monthly period invoice. |
| invoiceDate | Date | The invoice date. |
| dueDate | Date | The payment date. |
| paid | Boolean | True if payment has been received - set by accounting system. |
| headline | String | Optional headline for the invoice. For description, tracking id, reference number etc. |
| subTotalCost | Number | Total cost before tax (ADMIN only). |
| subTotalWholesale | Number | Total wholesale cost before tax (RESELLER/ADMIN only). |
| subTotal | Number | Total price before tax. |
| vat | Double | Value added tax. |
| vatCost | Double | Value added tax on cost (ADMIN only). |
| vatWholesale | Double | Value added tax on wholesale (RESELLER/ADMIN only). |
| total | Double | Sales price including VAT. |
Note that properties holding no value may be omitted from the object.
Response examples
Normal condensed
{ offset: 0, limit: 50, total: 87, invoices: [ { "_id": "54a978806d30733986cfa817", "customer": "54463ed73fc6ea53780080cf", "sent": false, "invoiceNumber": -1, "period": true, "invoiceDate": "2014-12-31T23:00:00.000Z", "dueDate": "2015-01-07T23:00:00.000Z", "paid": false, "headline": "Periode faktura", "subTotalWholesale": 499.81, "subTotal": 600, "vatWholesale": 124.95, "vat": 230.19, "total": 730.0 }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/invoice/list.txt · Last modified: 2023/03/21 10:52 by Joakim Andersen