# Update account limits Update account limits for a specific account. This endpoint triggers validation against the global program limit configured in the [Configure program limit](ref:post-v1-global-configs) endpoint. This endpoint generates the [Account limit changed](https://developers.pismo.io/events/docs/ledger-limit-changed-1) event. Refer to the [Account limits](doc:working-with-limits-objects) guide for more information. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Balances and limits", "version": "1.0.0", "description": "recover the description with the PM", "contact": { "name": "API Support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/balances-limits", "description": "Sandbox API server for testing" } ], "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } }, "schemas": { "AccountLimitPatch": { "type": "object", "properties": { "max_credit_limit": { "description": "Maximum credit amount approved for this account. This value must not be less than the `total_credit_limit` or the program’s minimum credit limit parameter, and must not exceed the program’s maximum credit limit parameter. The ledger stores and reports this amount using the exact number of decimal places provided in the request payload.", "type": "number", "example": 800.01 }, "total_credit_limit": { "description": "Total credit limit as set by the user. This can be any value up to the `max_credit_limit`. The ledger stores and reports the amount using the same number of decimal places as supplied in the request payload.", "type": "number", "example": 15.51 }, "total_overdraft_limit": { "description": "Maximum limit amount for overdraft spending on the account. The ledger stores and reports the amount using the same number of decimal places as supplied in the request payload.", "type": "number", "example": 340.61 }, "percentage_over_limit": { "description": "Percentage of the maximum credit limit (`max_credit_limit`) made available for purchases over the credit limit on the account.", "type": "number", "example": 15.5 }, "total_installment_credit_limit": { "description": "Amount limit for installments on this credit account. This value must not exceed the program’s maximum credit limit parameter. The ledger stores and reports this amount using the exact number of decimal places provided in the request payload.", "type": "number", "example": 145.78 } } }, "ErrorModel": { "type": "object", "properties": { "message": { "type": "string", "description": "Message that describes the error.", "example": "An Internal Server Error found, please contact the administrator" }, "code": { "type": "string", "description": "Code that identifies the error type.", "example": "EBLS9999" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorDetails" } } } }, "ErrorDetails": { "type": "object", "properties": { "location": { "description": "Location describes the attribute when the error is present", "type": "string", "example": "payload.attribute" }, "message": { "type": "string", "description": "Message that describes the error detail", "example": "attribute is null" } } } } }, "tags": [ { "name": "Account limits", "description": "Endpoints to manage account limits." } ], "security": [ { "BearerAuth": [] } ], "paths": { "/v1/accounts/{accountId}/limits": { "patch": { "summary": "Update account limits", "description": "Update account limits for a specific account. This endpoint triggers validation against the global program limit configured in the [Configure program limit](https://developers.pismo.io/pismo-docs/reference/post-v1-global-configs) endpoint.\n\nThis endpoint generates the [Account limit changed](https://developers.pismo.io/events/docs/ledger-limit-changed-1) event.\n\nRefer to the [Account limits](https://developers.pismo.io/pismo-docs/docs/working-with-limits-objects) guide for more information.\n", "operationId": "patch-v1-account-limits", "security": [ { "BearerAuth": [] } ], "tags": [ "Account limits" ], "parameters": [ { "in": "path", "name": "accountId", "required": true, "description": "Account ID", "schema": { "type": "number", "example": 123456 } }, { "name": "x-tenant", "in": "header", "required": true, "description": "Tenant ID", "schema": { "type": "string", "example": "org-123" } } ], "requestBody": { "required": true, "description": "Body description to update limits", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountLimitPatch" } } } }, "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorModel" } } } } } } } } } ```