# AttachmentOfEarningsByEmploymentId
Get a list of attachment of earnings records
__Activity name :__ GetAttachmentOfEarningsByEmploymentId
Get a list of attachment of earnings records
Select loket.nl (REST) API URL: /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
Insert loket.nl (REST) API URL: /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
Update loket.nl (REST) API URL: /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
Delete loket.nl (REST) API URL: /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
Select loket.nl (REST) API Operation: get /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
Insert loket.nl (REST) API Operation: post /providers/employers/employees/employments/{employmentId}/attachmentsofearnings
- Catalog: `LoketNlRest`
- Schema: `AttachmentOfEarnings`
- Retrieve: true
- Insert: true
- Update: false
- Delete: false
- Field Selection Method: NotRequired
- Base Path: `_embedded[*]`
## Parameters of Table Function
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `employmentId` | `guid` | ☑ | | The unique identifier of the employment |
## Columns of Table Function
The columns of the table function `AttachmentOfEarningsByEmploymentId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `beneficiary_city` | `string(24)` | | ☐ | City name of beneficiary |
| `beneficiary_name` | `string(70)` | | ☐ | Name of the beneficiary |
| `creditor_priority` | `int32` | | ☐ | The priority of a creditor within the type of creditors. 0 is the highest priority followed by 1 etc. Priority dictates the order in which creditor receives their payment. The amount of earnings that can be used for payments can be limited (see attachment-exempt threshold). The system will then divide the available earnings starting with the creditor with the highest priority. If all available earnings are spend all other attachments will not receive payment until the time that earnings are available to meet them. |
| `creditor_type_key` | `int32` | | ☐ | |
| `creditor_type_value` | `string(50)` | | ☐ | |
| `description1` | `string(32)` | | ☐ | Description 1. Both description field values will be a line in the (unstructured) description of the SEPA file. |
| `description2` | `string(32)` | | ☐ | Description 2. Both description field values will be a line in the (unstructured) description of the SEPA file. |
| `descriptionPayslip` | `string(14)` | | ☐ | This value is shown on the payslip to identify the attachment. |
| `endDate` | `datetime` | | ☐ | The end date of the record |
| `fixedPaymentPerPayrollPeriod` | `double` | | ☐ | Set a fixed sum to be payed every payroll period. __Note:__ If left empty the "available" earnings will be calculated in the payroll run by subtracting the protected earnings threshold (beslagvrijevoet) from the netwage. This method can lead to variable payments per payroll period. |
| `iban` | `string(35)` | | ☐ | International Bank Account Number (IBAN). Only IBAN without spaces are accepted. |
| `id` | `guid` | | ☐ | The unique identifier of an object (GUID/UUID) |
| `startDate` | `datetime` | | ☐ | Start date of this record __NOTE :__ at the moment of performing a payroll run it will be checked what record is applicable for splitting from net salary at that date (based on the start- and enddate). |
| `totalAmount_owed` | `double` | | ☐ | The total amount to be paid to the creditor |
| `totalAmount_paid_inApprovedPayrollRuns` | `double` | | ☐ | The total amount registerd in payroll run(s) with the status "approved". |
| `totalAmount_paid_inOpenPayrollRun` | `double` | | ☐ | The total amount registerd in payroll run(s) with the status "open". Note that open payroll runs are not final until they get approved, changes are posible until then. |