> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crosoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Asset Type

> Add asset type.



## OpenAPI

````yaml /spec/oas.yaml post /locations/{location_id}/asset_types
openapi: 3.0.3
info:
  title: CRO Software API
  version: 2.x
  description: >-
    REST API for the CRO Software waste management and logistics platform.
    Authenticate via OAuth2 (client_credentials or authorization_code). All
    requests require a Bearer token and an X-Tenant-Id header.
servers:
  - url: https://api.crosoftware.com/v0
    description: Production
security: []
paths:
  /locations/{location_id}/asset_types:
    post:
      tags:
        - Asset Types
      summary: Add Asset Type
      description: Add asset type.
      operationId: asset_types_add_asset_type
      parameters:
        - name: location_id
          in: path
          required: true
          schema:
            type: integer
            format: int64
            description: Location identifier.
        - name: x-api-version
          in: header
          required: false
          schema:
            type: string
            description: Version identifier (date format).
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: integer
            format: int64
            description: >-
              Tenant identifier. Contact [CRO
              Software](https://crosoftwaresolutions.com/) for more info if you
              don't already have this id. See [list tenant
              ids](/docs/requests/tenants_list_tenants) for info on listing the
              tenants you have access to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAssetTypeModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetTypeModel'
      security:
        - oauth2:
            - api
components:
  schemas:
    CreateAssetTypeModel:
      type: object
      description: Create asset type.
      properties:
        category_id:
          type: integer
          format: int64
          description: Category identifier.
        name:
          type: string
          description: Asset type name.
        quantity:
          type: integer
          description: Asset type quantity.
        require_numbers:
          type: boolean
          description: Require asset numbers.
        weight:
          type: string
      required:
        - category_id
        - name
        - quantity
        - require_numbers
    AssetTypeModel:
      type: object
      description: Asset type profile.
      properties:
        deleted:
          type: boolean
          description: Is record deleted (soft delete).
        id:
          type: integer
          format: int64
          description: Asset type identifier.
        is_default:
          type: boolean
          description: Is asset the default asset.
        location_id:
          type: integer
          format: int64
          description: Location identifier.
        name:
          type: string
          description: Asset type name.
        quantity:
          type: integer
          description: Asset type quantity.
        require_numbers:
          type: boolean
          description: Require asset numbers.
        valid_trucks:
          $ref: '#/components/schemas/asset_type.valid_trucks'
        weight:
          type: string
      required:
        - deleted
        - id
        - is_default
        - location_id
        - name
        - quantity
        - require_numbers
        - valid_trucks
        - weight
    asset_type.valid_trucks:
      type: array
      items:
        type: integer
        format: int64
        description: Truck identifier.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes:
            api: General API access
            webhook: Webhook management
        authorizationCode:
          authorizationUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/auth
          tokenUrl: REPLACE_WITH_AUTH_BASE_URL/oauth2/token
          scopes:
            api: General API access
            webhook: Webhook management

````