# Update quota
Updates a quota by its ID.
A quota is the number of asset shares. One asset can consist of a single share or multiple shares.
You can get quota IDs with the List asset quotas endpoint.
This endpoint generates a [Quota updated](https://developers.pismo.io/events/docs/assets-quota-update-1) event.
# OpenAPI definition
```json
{
"openapi": "3.0.3",
"info": {
"title": "Banking - Assets",
"version": "1.0.0",
"description": "API to handle banking assets operations and management",
"contact": {
"name": "API Support",
"url": "https://developers.pismo.io/support"
},
"license": {
"name": "Copyright Pismo"
}
},
"servers": [
{
"url": "https://sandbox.pismolabs.io/assets-accrual",
"description": "Sandbox API server for testing"
},
{
"url": "https://sandbox.pismolabs.io/assets-accrual",
"description": "Sandbox API for oauth2"
},
{
"url": "https://api.pismolabs.io/assets-accrual",
"description": "API server for production"
}
],
"security": [
{
"BearerAuth": []
}
],
"tags": [
{
"name": "Quotas",
"description": "Quota endpoints"
}
],
"components": {
"parameters": {
"AssetID": {
"name": "asset_id",
"in": "path",
"description": "Client assigned asset ID. Must consist of the characters [a-z,A-Z,0-9,-,:] with a range from 1 to 128.\n",
"required": true,
"schema": {
"type": "string"
},
"example": "2345"
},
"CorrelationID": {
"in": "header",
"name": "x-cid",
"schema": {
"type": "string"
},
"description": "The Correlation IDentifier field is used to link related API requests and events. The x-cid can help the Pismo engineering team track everything related to a call. You can find the x-cid field in the response header from an API endpoint call.\n\nIf this field isn't passed, one is automatically generated.\n",
"example": "5bb05174-4e80-11ea-b77f-2e728ce88125"
},
"IssuerID": {
"name": "issuer_id",
"in": "path",
"required": true,
"description": "Issuer ID. For more information, refer to [issuer identification number](https://www.investopedia.com/terms/i/issuer-identification-number-iin.asp)",
"schema": {
"type": "string"
},
"example": "24"
},
"QuotaID": {
"name": "quota_id",
"in": "path",
"required": true,
"description": "Quota ID",
"schema": {
"type": "string"
},
"example": "3456"
}
},
"schemas": {
"AssetID": {
"type": "string",
"description": "Asset ID. This ID is client-generated. It must be between 1 and 128 characters long and consist of only the characters [a-z,A-Z,0-9,-,:].",
"minLength": 1,
"maxLength": 128,
"example": "6ea8094b-73ba-4737-93ad-370c27c54813"
},
"CreatedAt": {
"type": "string",
"description": "Date/time (UTC) asset registered on Pismo platform",
"example": "2023-03-30T12:26:41"
},
"CustomerName": {
"type": "string",
"description": "Customer name - max length is 128 chars",
"minLength": 1,
"maxLength": 128,
"example": "Bud Whyser"
},
"CustomerType": {
"type": "string",
"description": "Customer type - `natural` or `legal`. A `natural` customer is an individual, a `legal` customer is a corporation or other legal entitiy type.",
"enum": [
"natural",
"legal"
],
"example": "natural"
},
"DocumentNumber": {
"type": "string",
"description": "A government document number, such as a social security number (US). Must be numeric with 11-14 digits.\n",
"minLength": 1,
"maxLength": 14,
"example": "123412341234"
},
"IssuerID": {
"type": "string",
"description": "Issuer ID. For more information, see [issuer identification number](https://www.investopedia.com/terms/i/issuer-identification-number-iin.asp)\n",
"example": "98400-0-0d"
},
"OperationType": {
"type": "string",
"description": "Quota operation type. Must be `amendment` (update quota).",
"enum": [
"amendment"
]
},
"PurchasedUnits": {
"type": "integer",
"format": "int32",
"description": "Number of purchased units",
"example": 20
},
"QuotaID": {
"type": "string",
"description": "Quota ID",
"example": "c2d581cb-5c9c-40ab-8783-724feb372132"
},
"Units": {
"type": "integer",
"format": "int32",
"description": "Number of asset units",
"example": 20
},
"UpdateQuota": {
"title": "UpdateQuota",
"example": {
"operation_type": "amendment",
"purchased_units": 1,
"customer_name": "Patti Waggin"
},
"type": "object",
"properties": {
"operation_type": {
"$ref": "#/components/schemas/OperationType"
},
"purchased_units": {
"$ref": "#/components/schemas/PurchasedUnits"
},
"customer_name": {
"$ref": "#/components/schemas/CustomerName"
}
},
"required": [
"operation_type"
]
},
"UpdateQuotaResponse": {
"type": "object",
"properties": {
"asset_id": {
"$ref": "#/components/schemas/AssetID"
},
"quota_id": {
"$ref": "#/components/schemas/QuotaID"
},
"issuer_id": {
"$ref": "#/components/schemas/IssuerID"
},
"units": {
"$ref": "#/components/schemas/Units"
},
"created_at": {
"$ref": "#/components/schemas/CreatedAt"
},
"customer_type": {
"$ref": "#/components/schemas/CustomerType"
},
"document_number": {
"$ref": "#/components/schemas/DocumentNumber"
},
"customer_name": {
"$ref": "#/components/schemas/CustomerName"
},
"deposit_number": {
"$ref": "#/components/schemas/DocumentNumber"
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
},
"responses": {
"400BadRequest": {
"description": "Bad Request"
},
"401Unauthorized": {
"description": "Unauthorized"
},
"500InternalServerError": {
"description": "Internal server error"
},
"404NotFound": {
"description": "Not found"
}
}
},
"paths": {
"/v1/issuer/{issuer_id}/assets/{asset_id}/quotas/{quota_id}": {
"patch": {
"summary": "Update quota",
"description": "Updates a quota by its ID.\n\nA quota is the number of asset shares. One asset can consist of a single share or multiple shares. \n\nYou can get quota IDs with the List asset quotas endpoint.\n\nThis endpoint generates a [Quota updated](https://developers.pismo.io/events/docs/assets-quota-update-1) event.\n",
"tags": [
"Quotas"
],
"operationId": "UpdateQuota",
"parameters": [
{
"$ref": "#/components/parameters/CorrelationID"
},
{
"$ref": "#/components/parameters/IssuerID"
},
{
"$ref": "#/components/parameters/AssetID"
},
{
"$ref": "#/components/parameters/QuotaID"
}
],
"requestBody": {
"description": "Request body",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateQuota"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateQuotaResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/400BadRequest"
},
"401": {
"$ref": "#/components/responses/401Unauthorized"
},
"404": {
"$ref": "#/components/responses/404NotFound"
},
"500": {
"$ref": "#/components/responses/500InternalServerError"
}
}
}
}
}
}
```