---
updatedAt: 2026-08-28T08:29:19.000Z
agentTools:
  projectIndex: https://developers.airsaas.io/llms.txt
---

# Update a gain unit type

Shared write behavior for gain nature, unit, and unit type catalogs.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "API Endpoints",
    "version": "1.0 (v1)",
    "description": "API to access AirSaas resources"
  },
  "paths": {
    "/v1/gain_unit_types/{gain_unit_type_id}/": {
      "patch": {
        "operationId": "gain_unit_types_partial_update",
        "description": "Shared write behavior for gain nature, unit, and unit type catalogs.",
        "summary": "Update a gain unit type",
        "parameters": [
          {
            "in": "path",
            "name": "gain_unit_type_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this gain unit type.",
            "required": true
          }
        ],
        "tags": [
          "Gain Unit Types"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedGainUnitTypeWriteRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedGainUnitTypeWriteRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedGainUnitTypeWriteRequest"
              }
            }
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GainUnitTypePublicAPIDocumentationResponse"
                },
                "examples": {
                  "Example1": {
                    "value": {
                      "id": "11111111-2222-3333-4444-555555555554",
                      "name": "Currency",
                      "name_en": "Currency",
                      "name_fr": "Monnaie",
                      "name_es": "Moneda",
                      "description": "Currency measurement family",
                      "description_en": "Currency measurement family",
                      "description_fr": "Famille de mesure monétaire",
                      "description_es": "Familia de medida monetaria",
                      "code": "currency",
                      "position": 0,
                      "icon": "coins",
                      "is_native": true,
                      "unit_ids": [
                        "11111111-2222-3333-4444-555555555555"
                      ]
                    },
                    "summary": "OK"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GainUnitTypePublicAPIDocumentationResponse": {
        "type": "object",
        "description": "Used for documentation generation with Spectacular, to be able to display\nall fields as non required on Readme.com for responses",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true,
            "maxLength": 100
          },
          "name_en": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Name [en]",
            "maxLength": 100
          },
          "name_fr": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Name [fr]",
            "maxLength": 100
          },
          "name_es": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Name [es]",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "readOnly": true,
            "maxLength": 200
          },
          "description_en": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Description [en]",
            "maxLength": 200
          },
          "description_fr": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Description [fr]",
            "maxLength": 200
          },
          "description_es": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "title": "Description [es]",
            "maxLength": 200
          },
          "code": {
            "type": "string",
            "readOnly": true,
            "maxLength": 64
          },
          "position": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "readOnly": true
          },
          "icon": {
            "type": "string",
            "readOnly": true,
            "maxLength": 64
          },
          "is_native": {
            "type": "boolean",
            "readOnly": true
          },
          "unit_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "readOnly": true
          }
        }
      },
      "PatchedGainUnitTypeWriteRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name_en": {
            "type": "string",
            "nullable": true,
            "title": "Name [en]",
            "maxLength": 100
          },
          "name_fr": {
            "type": "string",
            "nullable": true,
            "title": "Name [fr]",
            "maxLength": 100
          },
          "name_es": {
            "type": "string",
            "nullable": true,
            "title": "Name [es]",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 200
          },
          "description_en": {
            "type": "string",
            "nullable": true,
            "title": "Description [en]",
            "maxLength": 200
          },
          "description_fr": {
            "type": "string",
            "nullable": true,
            "title": "Description [fr]",
            "maxLength": 200
          },
          "description_es": {
            "type": "string",
            "nullable": true,
            "title": "Description [es]",
            "maxLength": 200
          },
          "icon": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "unit_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Token-based authentication with required prefix \"Api-Key\""
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "node",
      "python"
    ]
  },
  "servers": [
    {
      "url": "https://api.airsaas.io"
    }
  ]
}
```