# RecurringAccrualLinesById
Get a recurring by ID
Returns the full representation of a single recurring contract, including its rows, accrual, tax reductions, calculated totals and any accumulated error logs. The `ETag` and `Last-Modified` response headers can be used for later conditional updates.
## Documentation
Returns the full representation of a single recurring contract, including its rows, accrual, tax reductions, calculated totals and any accumulated error logs. The `ETag` and `Last-Modified` response headers can be used for later conditional updates.
- Catalog: `Fortnox`
- Schema: `RecurringBillings`
This is a read-only table function. The Fortnox API may not support changing the data or the Invantive UniversalSQL driver for Fortnox does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Fortnox API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `RecurringAccrualLinesById`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `financialyear` | `` | ☐ | | Selects what financial year that should be used (does not work on every table). |
| `financialyeardate` | `` | ☐ | | Selects by date, what financial year that should be used (does not work on every table). |
| `fromdate` | `` | ☐ | | Defines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). |
| `lastmodified` | `` | ☐ | | Retrieves all records since the provided timestamp (does not work on every table). |
| `recurring-id` | `` | ☑ | | The unique identifier of the recurring contract. |
| `todate` | `` | ☐ | | Defines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). |
## Columns of Table Function
The columns of the table function `RecurringAccrualLinesById` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `account_number` | `int64` | Account Number | ☐ | General ledger account this accrual distribution row books to. |
| `accrual_account_number` | `int64` | | ☐ | General ledger account holding the deferred (not yet recognised) revenue. |
| `accrual_id` | `guid` | | ☐ | Identifier of the accrual this row belongs to. Read-only. |
| `amount_per_invoicing` | `int64` | | ☐ | Number of recurring periods combined onto a single invoice. For example, with a monthly recurring an amount of 3 invoices a full quarter at once. Must be between 1 and 12. Defaults to 1. |
| `amount` | `decimal` | Amount | ☐ | Total amount to be periodised (accrued) across accounting periods. |
| `cost_center_id_2` | `varchar2` | | ☐ | Identifier of the cost center this distribution row is booked against. |
| `cost_center_id` | `varchar2` | | ☐ | Identifier of the cost center the recurring and its invoices are booked against. |
| `created_at_2` | `datetime` | | ☐ | Timestamp when the accrual was created. Read-only. |
| `created_at_3` | `datetime` | | ☐ | Timestamp when the recurring was created. Read-only. |
| `created_at` | `datetime` | | ☐ | Timestamp when the accrual row was created. Read-only. |
| `created_by` | `varchar2` | | ☐ | Id of the user who created the recurring. Read-only. |
| `credit` | `decimal` | Credit | ☐ | Credit amount booked for this distribution row. |
| `currency` | `varchar2` | Currency | ☐ | ISO 4217 currency code the recurring is invoiced in (e.g. SEK, EUR). |
| `customer_address` | `varchar2` | | ☐ | Street address of the customer. |
| `customer_city` | `varchar2` | Customer City | ☐ | City of the customer address. |
| `customer_country_code` | `varchar2` | | ☐ | ISO 3166-1 alpha-2 country code of the customer address. |
| `customer_name` | `varchar2` | Customer Name | ☐ | Customer name printed on the invoice. |
| `customer_number` | `varchar2` | Customer Number | ☐ | Customer number identifying the customer in the customer register. Required. |
| `customer_phone` | `varchar2` | | ☐ | Customer phone number. |
| `customer_zip` | `varchar2` | | ☐ | Postal/ZIP code of the customer address. |
| `dates_dates_invoice_date` | `datetime` | | ☐ | The date printed on the invoice. Server-computed — not a client input. Null until it has been
computed, and null when the recurring is FINISHED or has no further invoice. |
| `dates_dates_invoice_processing_date` | `datetime` | | ☐ | The date the next invoice is generated and processed. |
| `dates_dates_period_start_date` | `datetime` | | ☐ | The start date of the next billing period. |
| `dates_rules_end_date` | `datetime` | | ☐ | The last date this recurring produces invoices. Omit for an open-ended recurring. |
| `dates_rules_frequency` | `varchar2` | | ☐ | |
| `dates_rules_interval` | `int64` | | ☐ | How many `frequency` units between occurrences. Combined with `frequency` this reads as
"every {interval} {frequency}" — e.g. interval 2 with frequency MONTH means every 2 months. Defaults to 1. |
| `dates_rules_invoice_anchor` | `varchar2` | | ☐ | |
| `dates_rules_period_anchor` | `varchar2` | | ☐ | |
| `debit` | `decimal` | Debit | ☐ | Debit amount booked for this distribution row. |
| `delivery_address` | `varchar2` | | ☐ | Delivery street address. |
| `delivery_city` | `varchar2` | | ☐ | City of the delivery address. |
| `delivery_country_code` | `varchar2` | | ☐ | ISO 3166-1 alpha-2 country code of the delivery address. |
| `delivery_name` | `varchar2` | | ☐ | Delivery recipient name. |
| `delivery_phone` | `varchar2` | | ☐ | Contact phone number for the delivery. |
| `delivery_term_code` | `varchar2` | | ☐ | Delivery terms code (e.g. Incoterm) printed on the invoice. |
| `delivery_type_code` | `varchar2` | | ☐ | Delivery method/type code printed on the invoice. |
| `delivery_zip` | `varchar2` | | ☐ | Postal/ZIP code of the delivery address. |
| `distribution_method` | `varchar2` | | ☐ | |
| `email_to` | `varchar2` | | ☐ | Recipient email address used to deliver the invoice when the distribution method is EMAIL. |
| `id_2` | `guid` | ID | ☐ | Server-generated unique identifier of the accrual. |
| `id_3` | `guid` | | ☐ | Server-generated unique identifier of the recurring. |
| `id` | `guid` | ID | ☐ | Server-generated unique identifier of the accrual row. |
| `invoice_handling` | `varchar2` | | ☐ | |
| `modified_at_2` | `datetime` | | ☐ | Timestamp when the accrual was last modified. Read-only. |
| `modified_at_3` | `datetime` | | ☐ | Timestamp when the recurring was last modified. Read-only. |
| `modified_at` | `datetime` | | ☐ | Timestamp when the accrual row was last modified. Read-only. |
| `modified_by` | `varchar2` | | ☐ | Id of the user who last modified the recurring. Read-only. |
| `order_number` | `varchar2` | | ☐ | Customer purchase order number printed on the generated invoices. |
| `our_reference` | `varchar2` | | ☐ | The seller's own reference (e.g. the responsible employee) printed on the invoice. |
| `payment_terms` | `varchar2` | | ☐ | Payment terms applied to the generated invoices (e.g. days until due). |
| `price_list_id` | `varchar2` | | ☐ | Identifier of the price list used to resolve article prices for this recurring. |
| `print_configuration_language` | `varchar2` | | ☐ | |
| `print_configuration_template` | `varchar2` | | ☐ | if no value provided its fetched from settings |
| `project_id_2` | `varchar2` | | ☐ | Identifier of the project this distribution row is booked against. |
| `project_id` | `varchar2` | Project ID | ☐ | Identifier of the project the recurring and its invoices are booked against. |
| `recurring_id` | `guid` | | ☐ | Identifier of the recurring this accrual belongs to. Read-only. |
| `remark` | `varchar2` | | ☐ | Free-text remark printed on the generated invoices. |
| `revenue_account_number` | `int64` | | ☐ | General ledger account the revenue is recognised to as each period is released. |
| `serial_number` | `int64` | | ☐ | Server-assigned sequential number identifying the recurring within the tenant. |
| `status` | `varchar2` | Status | ☐ | |
| `totals_excl_vat` | `double` | | ☐ | Total amount excluding VAT. |
| `totals_incl_vat` | `double` | | ☐ | Total amount including VAT. |
| `totals_roundoff` | `double` | | ☐ | Rounding adjustment applied to the total. |
| `totals_vat` | `double` | | ☐ | Total VAT amount. |
| `transaction_info` | `varchar2` | | ☐ | Free-text transaction information attached to the bookkeeping entry. |
| `vat_option_2` | `varchar2` | | ☐ | |
| `vat_option` | `varchar2` | | ☐ | |
| `vat_payment_type` | `varchar2` | | ☐ | |
| `your_reference` | `varchar2` | | ☐ | The customer's reference (e.g. their contact person) printed on the invoice. |