> ## Documentation Index > Fetch the complete documentation index at: https://www.bloxs.io/llms.txt > Use this file to discover all available pages before exploring further. # Update a bankaccount for a supplier > Update an existing bankaccount connected to a supplier. This will fully overwrite the bankaccount with the data from the request. ## OpenAPI ````json PUT /api/v1/relations/suppliers/bankaccounts { "openapi": "3.0.4", "info": { "title": "Relations V1", "description": "# Relation API Documentation\n\nWelcome to the Relationship Management API documentation. This API allows you to perform CRUD operations on various relationship types, including Owners, Persons, Suppliers, Estate Agents, and Organisations. \n\n## Authentication \n\nTo access the API, include your API key in the headers. Refer to our authentication documentation for details on obtaining and using your API key. \n\n## CRUD Operations \n\nThe API supports CRUD operations for the following relationship types: \n\n- **Owners**\n- **Persons**\n- **Suppliers**\n- **Estate Agents**\n- **Organisations**\n\nFor each relationship type, you can: \n\n- **GET**: Retrieve a list or apply filters.\n- **POST**: Add a new entry.\n- **PUT**: Update existing details.\n- **PATCH**: Apply partial updates.\n- **DELETE**: Remove an entry.\n\nThank you for choosing our Relation API. If you have any questions or need assistance, please contact our support team. \n", "version": "v1" }, "security": [ {} ], "tags": [ { "name": "Common" }, { "name": "CommunicationFormAPI" }, { "name": "EstateAgentAPI" }, { "name": "Metadata" }, { "name": "OrganisationAPI" }, { "name": "OwnerAPI" }, { "name": "PersonAPI" }, { "name": "RelationTypeAPI" }, { "name": "SupplierAPI" }, { "name": "SupplierTypeAPI" } ], "paths": { "/api/v1/relations/suppliers/bankaccounts": { "put": { "tags": [ "Relations" ], "summary": "Update a bankaccount for a supplier", "description": "Update an existing bankaccount connected to a supplier. This will fully overwrite the bankaccount with the data from the request.", "operationId": "UpdateSupplierBankAccount", "parameters": [ { "name": "reference", "in": "query", "description": "The internal identifier of the model (i.e. Reference, Code, Name, depends on model).", "schema": { "type": "string" } }, { "name": "externalIdentifier", "in": "query", "description": "The external API identifier of the model.", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankAccountAPIUpdateModel" } } } }, "responses": { "200": { "description": "The bank account was updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankAccountAPIUpdateModel" } } } }, "400": { "description": "The bank account data has validation issues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIErrorMessageModel" } } } } }, "x-d360-narrative-url": "

Update a Bank Account for a Supplier

Updates the preferred status of an existing bank account linked to a supplier.

This endpoint can only change isPreferredBankAccount from false to true; when that happens, the supplier's current preferred bank account is automatically set to false, since exactly one bank account per supplier can be preferred at any time. It is not possible to use this endpoint to set an account from preferred to not preferred. Neither bankAccountNumber nor bic can be changed through this endpoint.

The supplier is located via reference or externalIdentifier, at least one of which must be supplied. The bank account itself is identified by bankAccountNumber, which must match an account already registered for the supplier.

This endpoint only changes the preferred status of the bank account, from not preferred to preferred. It cannot change the account number or BIC, and it cannot set a preferred account back to not preferred, since a supplier must always have exactly one preferred bank account whenever one or more accounts exist.


Request Fields

Field

Type

Required

Description

reference

string

Required (at least one of reference or externalIdentifier must be given)

The internal identifier (Reference/Code) of the supplier whose bank account should be updated.

externalIdentifier

string

Required (at least one of reference or externalIdentifier must be given)

The external API identifier of the supplier whose bank account should be updated.

bankAccountNumber

string, max 34

Required

The bank account number identifying which existing account to update. Must match an account already registered for the supplier. This endpoint cannot rename or reassign the account number, and cannot change the account's bic.

isPreferredBankAccount

boolean

Optional

Set to true to make this account the supplier's preferred bank account, which automatically un-sets the previously preferred account. If this account is already preferred, sending true again has no effect and simply returns 200 OK with isPreferredBankAccount unchanged (still true). Setting this to false has no effect on the data, whether the account is currently preferred or not: the request still returns 200 OK, but the preferred status is not changed.


Response Fields

Field

Type

Required

Description

bankAccountNumber

string, max 34

Required

The bank account number of the updated account.

isPreferredBankAccount

boolean

Optional

Indicates whether this account is the supplier's preferred bank account after the request. Always true, since this endpoint can never leave an existing preferred account or a targeted account with false as the result.

" } } }, "components": { "schemas": { "BankAccountAPIUpdateModel": { "required": [ "bankAccountNumber" ], "type": "object", "properties": { "bankAccountNumber": { "maxLength": 34, "minLength": 0, "type": "string" }, "isPreferredBankAccount": { "type": "boolean" } }, "additionalProperties": false }, "APIErrorMessageModel": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "traceId": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32" }, "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" }, "nullable": true }, "nullable": true } }, "additionalProperties": false } } } } ````