Table of Contents
API : Rackbeat Create Invoices
Introduction
Used to export a month of customer invoices to Rackbeat as order drafts.
Before the export is queued, every invoice's customer and every invoice line's product code is checked against the reseller's Rackbeat data, so the request fails up front when the export cannot succeed. The export itself runs afterwards, which means that by the time this request responds, it will not be done exporting.
An e-mail will be sent to the user (if they are registered with an e-mail address) and the customer's accounting system email when the export is done.
If the export of invoices should fail, then all the invoices that have been exported will also be deleted from Rackbeat as a safety measure.
Request
| URL | https://api.telecomx.dk/integration/rackbeat/invoice/draft | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLER for their own customer. RESELLER_ADMIN or ADMIN for any reseller. |
||
| Query | reseller | Id | [optional] Id of the reseller to export invoices for. Only used for RESELLER_ADMIN and ADMIN, defaults to the user's own customer |
| Body | invoiceDate | String | [optional] Invoice date to export, in YYYY-MM-DD format. Must be the first day of a month, e.g. 2026-09-01. Defaults to the first of the current month |
| invoicesToOmit | Array<Id> | [optional] Ids of invoices not to export |
|
The reseller's Rackbeat integration must have a bearer token.
Query examples
POST https://api.telecomx.dk/integration/rackbeat/invoice/draft POST https://api.telecomx.dk/integration/rackbeat/invoice/draft?reseller=650000000000000000000001
Body example
{ "invoiceDate": "2026-09-01", "invoicesToOmit": [ "650000000000000000000002", "650000000000000000000003" ] }
Response
| Json object | ||
|---|---|---|
| Property | Type | Description |
| success | Boolean | True when the export was queued, or when there was nothing to export |
| total | Number | How many invoices there are in total for the invoice date, including the omitted ones |
| exported | Number | How many invoices are exported. 0 when there is nothing to export, and then no export is queued |
Note that since this data is fetched from a third-party, the data returned can not be guaranteed.
Response Example
{ "success": true, "total": 50, "exported": 48 }
Errors
A single failure found while checking the invoices is returned on its own, with its own error code; two or more are returned together as multiple, with the individual errors inside.
| Error code | Message | Description |
|---|---|---|
| 422 | <property> | Invalid input for the named property - the request body, query or URL parameter failed validation |
| 422 | invoiceDate | Invalid date |
| 403 | access_denied | Insufficient access level |
| 404 | reseller | Reseller not found |
| 404 | integrations.rackbeat.bearerToken | Bearer token not found |
| 400 | rackbeat | Error fetching Rackbeat customers |
| 400 | rackbeat | Error fetching Rackbeat products |
| 422 | customer | Customer was not found for invoice: <invoice id> |
| 404 | finance.accountingSystemId | Accounting system ID is not found for: <customer name> |
| 404 | rackbeat.customer | Customer not found in rackbeat for: <customer name> |
| 404 | rackbeat.product | Product number not found in rackbeat with product code: <product code> |
| 422 | multiple | Multiple errors - see inner |
| 500 | internal_error | <Unspecified> |