---
title: "Edit the details of an attachment of earnings record"
method: PUT
path: "/v2/providers/employers/employees/employments/attachmentsofearnings/{attachmentOfEarningsId}"
tags: ["Attachment of earnings"]
---

# Edit the details of an attachment of earnings record

`PUT /v2/providers/employers/employees/employments/attachmentsofearnings/{attachmentOfEarningsId}`

## Request

- Base URL: `https://api.loket.nl`
- URL: `https://api.loket.nl/v2/providers/employers/employees/employments/attachmentsofearnings/{attachmentOfEarningsId}`
- Auth: none required

__Activity name :__ <a href="https://developer.loket.nl/Activities/PutAttachmentOfEarningsByAttachmentOfEarningsId" target="_blank">PutAttachmentOfEarningsByAttachmentOfEarningsId</a>

Update the details of a single attachment of earnings record

__Metadata :__ Possible values for fields of the type 'metadata' can be acquired (GET) by adding `/metadata` to the URL

## Path parameters

- `attachmentOfEarningsId` string, uuid, required

## Headers

- `Authorization` string, required
- `Accept` string, required

## Request body

- AttachmentOfEarnings
  - `id` string, uuid: The unique identifier of an object (GUID/UUID)
  - `startDate` string, date: Start date of this record
  - `endDate` string, date, nullable: The end date of the record
  - `descriptionPayslip` string: This value is shown on the payslip to identify the attachment.
  - `creditor` object: Information regarding the creditor
    - `type` object: The type of creditor. A preferent creditor has priority over non-preferent creditors.
      - `key` integer
      - `value` string
    - `priority` integer: 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.
  - `totalAmount` object
    - `owed` number, double: The total amount to be paid to the creditor
    - `paid` object
      - `inApprovedPayrollRuns` number, double: The total amount registerd in payroll run(s) with the status "approved".
      - `inOpenPayrollRun` number, 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 possible until then.
  - `fixedPaymentPerPayrollPeriod` number, double, nullable: 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: International Bank Account Number (IBAN). Only IBAN without spaces are accepted.
  - `beneficiary` object: Information regarding the beneficiary coresponding with the bank account number
    - `name` string: Name of the beneficiary
    - `city` string, nullable: City name of beneficiary
  - `description1` string: Description 1. Both description field values will be a line in the (unstructured) description of the SEPA file.
  - `description2` string, nullable: Description 2. Both description field values will be a line in the (unstructured) description of the SEPA file.

## Response `200`

OK

- object: a warning indacateds that the given payload is valide, however take notice of the warning this might ifluence behavour.
  - `version` Version
    - `obsoleteDate` string, date, nullable: The date (can be null) on which the `resourceVersion` is no longer supported/available
    - `resourceVersion` string, date: The resource version of the object in the response
  - `messages` object[]
    - `type` string: Indication of the type of message. See [the general documentation for more information](./#section/Response/Messages)
    - `description` string: Describes the message
    - `id` string, uuid, nullable: In some cases when the message may relate to a specific entity, or specific group of entities, this field provides the identifier of that entity
    - `code` integer: Identifying code for the message
    - `properties` string[]: An array that can contain additional information
  - `content` AttachmentOfEarnings
    - `id` string, uuid: The unique identifier of an object (GUID/UUID)
    - `startDate` string, date: Start date of this record
    - `endDate` string, date, nullable: The end date of the record
    - `descriptionPayslip` string: This value is shown on the payslip to identify the attachment.
    - `creditor` object: Information regarding the creditor
      - `type` object: The type of creditor. A preferent creditor has priority over non-preferent creditors.
        - `key` integer
        - `value` string
      - `priority` integer: 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.
    - `totalAmount` object
      - `owed` number, double: The total amount to be paid to the creditor
      - `paid` object
        - `inApprovedPayrollRuns` number, double: The total amount registerd in payroll run(s) with the status "approved".
        - `inOpenPayrollRun` number, 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 possible until then.
    - `fixedPaymentPerPayrollPeriod` number, double, nullable: 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: International Bank Account Number (IBAN). Only IBAN without spaces are accepted.
    - `beneficiary` object: Information regarding the beneficiary coresponding with the bank account number
      - `name` string: Name of the beneficiary
      - `city` string, nullable: City name of beneficiary
    - `description1` string: Description 1. Both description field values will be a line in the (unstructured) description of the SEPA file.
    - `description2` string, nullable: Description 2. Both description field values will be a line in the (unstructured) description of the SEPA file.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/loket/apis/loket-api.md) - [All operations](https://skmtc.dev/loket/apis/loket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loket/apis/loket-api/revisions/32170564148f?raw)
