> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/banks/partially-update-a-bank.md).

# Partially update a bank

Updates one or more fields of a bank. Only the fields included in the request body are changed; everything left out keeps its current value, including the slug.

When `slug` is included it must stay unique across all banks. As with a full update, omitting `logo` and `logo_path` keeps the current logo.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Banks","description":"Administrative endpoints for **banks** — the bank records that the rest of the payment configuration is built on. Both cards and bank transfer accounts are attached to a bank, and through the cards a bank indirectly carries the installment options offered to customers.\n\nA bank consists of a display name, a unique slug that acts as its stable reference in integrations, and an optional logo.\n\n## Core Capabilities\n\n**1. Bank Listing & Filtering**\n* Retrieve a paginated list of banks.\n* Filter by identifier, name, or slug.\n* Order the results by identifier, name, or slug.\n\n**2. Bank Lifecycle Management**\n* Create a bank with a display name and a unique slug.\n* Update a bank fully or partially.\n* Delete a bank, provided nothing else refers to it.\n\n**3. Logo Handling**\n* Upload a logo image directly as part of a multipart request.\n* Or point the bank at an image that already exists in media storage by giving its storage path.\n\n## Bank Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `pk` | integer | The unique identifier of the bank. Assigned by the server; supplying it in a request body has no effect. |\n| `name` | string | The display name of the bank. Required on create and on full update. Maximum 64 characters. |\n| `slug` | string | The unique reference of the bank. Required on create and on full update, optional on a partial update. Maximum 64 characters, and may contain only letters, digits, underscores, and hyphens. |\n| `logo` | string or `null` | In responses, the absolute URL of the bank's logo, or `null` when the bank has no logo. In requests, the image file itself, sent as a multipart upload. |\n| `logo_path` | string or `null` | Write-only. The storage path of an image that is already present in media storage, used instead of uploading a file. See **Logo Handling** below. |\n\n## Logo Handling\n\nA bank's logo can be set in two ways, and both are optional:\n\n* **Uploading a file** — send the request as `multipart/form-data` with the image in the `logo` field. The file is stored in media storage and the resulting address is returned in `logo`.\n* **Referencing an existing file** — send `logo_path` with the storage path of a file that is already in media storage (for example `banks/example-bank.png`). No upload takes place; the bank is simply pointed at that file, and the resulting address is returned in `logo`.\n\nWhen both are supplied in the same request, the uploaded file takes precedence and `logo_path` is ignored.\n\nTwo details are worth knowing when working with these fields:\n\n* `logo_path` is an input-only field. It is present in every response, but its value is always `null` — the address the bank actually resolves to is reported in `logo`. Read the logo from `logo`, never from `logo_path`.\n* On a full update, omitting both `logo` and `logo_path` leaves the current logo untouched rather than clearing it. There is no way to remove a logo through these endpoints once it has been set.\n\n## Filtering & Ordering\n\nBanks can be filtered with the `id`, `name`, and `slug` query parameters. Each is an **exact, case-sensitive** match — `?name=Example Bank` returns the bank, while `?name=example bank` returns an empty page. Partial-match and multi-value forms of these parameters are not available, and query parameters that are not listed here are ignored rather than rejected.\n\nResults can be ordered with the `sort` parameter on `pk`, `name`, and `slug`. Prefix the field with a hyphen for descending order, and separate several fields with commas. Any other value is ignored and the default ordering is kept.\n\n## Dynamic Settings & Environment Variables\n\nNo dynamic settings (`dj_dynamic_settings`) are read by these endpoints. Listing, filtering, creation, update, and deletion behave identically regardless of how the management panel is configured. The payment module's dynamic settings — such as the 3D Secure and installment settings — govern how payments are processed on the storefront and have no effect on the administrative endpoints in this section.\n\n**Environment variables:** No environment variables are read directly by these endpoints. The only related server configuration is the platform's media storage configuration, which determines where an uploaded logo is stored and the address returned in the `logo` field."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"schemas":{"BankPatchRequest":{"type":"object","description":"The body of a bank partial update request sent as JSON. Only the fields included in the body are changed; every field is optional.","properties":{"name":{"type":"string","maxLength":64,"description":"The display name of the bank."},"slug":{"type":"string","maxLength":64,"pattern":"^[-a-zA-Z0-9_]+$","description":"The unique reference of the bank. Omitting it keeps the current slug."},"logo_path":{"type":["string","null"],"writeOnly":true,"description":"The storage path of an image that is already present in media storage, used instead of uploading a file. Omitting it keeps the current logo."}}},"BankPatchUploadRequest":{"type":"object","description":"The body of a bank partial update request sent as `multipart/form-data`, used when the logo is uploaded as a file. As with the JSON form, every field is optional.","properties":{"name":{"type":"string","maxLength":64,"description":"The display name of the bank."},"slug":{"type":"string","maxLength":64,"pattern":"^[-a-zA-Z0-9_]+$","description":"The unique reference of the bank. Omitting it keeps the current slug."},"logo":{"type":"string","format":"binary","description":"The logo image file. Takes precedence over `logo_path` when both are sent."},"logo_path":{"type":"string","writeOnly":true,"description":"The storage path of an image that is already present in media storage, used instead of uploading a file."}}},"Bank":{"type":"object","description":"A bank record.","properties":{"pk":{"type":"integer","readOnly":true,"description":"The unique identifier of the bank."},"name":{"type":"string","maxLength":64,"description":"The display name of the bank."},"slug":{"type":"string","maxLength":64,"description":"The unique reference of the bank."},"logo":{"type":["string","null"],"format":"uri","description":"The absolute address of the bank's logo, or `null` when the bank has no logo."},"logo_path":{"type":["string","null"],"description":"Always `null`. This field only carries a value on the way in; the address the logo resolves to is reported in `logo`."}}},"ValidationError":{"type":"object","description":"Returned when the request contains invalid or missing data. Errors are grouped by the field they apply to: each key is the name of a field from the request and its value is a list of one or more messages describing what is wrong with that field. Messages that do not belong to any single field are grouped under `non_field_errors`.","properties":{"non_field_errors":{"type":"array","description":"Error messages that apply to the request as a whole rather than to a specific field.","items":{"type":"string"}}},"additionalProperties":{"type":"array","description":"The list of error messages for the field named by the key.","items":{"type":"string"}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"ValidationError":{"description":"The request contains invalid or missing data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BankNotFound":{"description":"The requested bank does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/banks/{id}/":{"patch":{"tags":["Banks"],"operationId":"partialUpdateBank","summary":"Partially update a bank","description":"Updates one or more fields of a bank. Only the fields included in the request body are changed; everything left out keeps its current value, including the slug.\n\nWhen `slug` is included it must stay unique across all banks. As with a full update, omitting `logo` and `logo_path` keeps the current logo.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankPatchRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BankPatchUploadRequest"}}}},"responses":{"200":{"description":"The updated bank.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bank"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/BankNotFound"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/banks/partially-update-a-bank.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
