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

# Retrieve a governance entity

> This endpoint retrieves a governance entity by its code.



## OpenAPI

````yaml GET /usage_attribution_types/{code}
openapi: 3.1.0
info:
  title: Lago API documentation
  description: >-
    Lago API allows your application to push customer information and metrics
    (events) from your application to the billing application.
  version: 1.57.0
  license:
    name: AGPLv3
    url: https://github.com/getlago/lago-openapi/blob/main/LICENSE
  contact:
    email: tech@getlago.com
servers:
  - url: https://api.getlago.com/api/v1
    description: US Lago cluster
  - url: https://api.eu.getlago.com/api/v1
    description: EU Lago cluster
security:
  - bearerAuth: []
tags:
  - name: activity_logs
    description: Everything about Activity logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/activity-logs-object
  - name: analytics
    description: Everything about Analytics
  - name: api_logs
    description: Everything about API logs
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/audit-logs/api-logs-object
  - name: billable_metrics
    description: Everything about Billable metric collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billable-metrics/object
  - name: features
    description: Everything about Feature collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/features/feature-object
  - name: entitlements
    description: Everything about Entitlement collection
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object
  - name: billing_entities
    description: Everything about Billing Entities
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/billing-entities/object
  - name: customers
    description: Everything about Customer collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/customers/object
  - name: plans
    description: Everything about Plan collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/plans/object
  - name: subscriptions
    description: Everything about Subscription collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/subscriptions/subscription-object
  - name: events
    description: Everything about Event collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/events/event-object
  - name: organizations
    description: Everything about Organization collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/organizations/organization-object
  - name: taxes
    description: Everything about Tax collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/taxes/tax-object
  - name: coupons
    description: Everything about Coupon collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/coupons/coupon-object
  - name: add_ons
    description: Everything about Add-on collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/add-ons/add-on-object
  - name: fees
    description: Everything about Fees
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object
  - name: invoices
    description: Everything about Invoice collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/invoices/invoice-object
  - name: wallets
    description: Everything about Wallet collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/wallets/wallet-object
  - name: credit_notes
    description: Everything about Credit notes collection
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/credit-notes/credit-note-object
  - name: webhooks
    description: Everything about Webhooks
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key
  - name: webhook_endpoints
    description: Everything about Webhook Endpoints
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object
  - name: payment_receipts
    description: Everything about Payment receipts
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object
  - name: payment_requests
    description: Everything about PaymentRequests
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-requests/payment-request-object
  - name: payments
    description: Everything about Payments
    externalDocs:
      description: Find out more
      url: https://getlago.com/docs/api-reference/payments/payment-object
  - name: payment_methods
    description: Everything about Payment Methods
    externalDocs:
      description: Find out more
      url: >-
        https://getlago.com/docs/api-reference/payment-methods/payment-method-object
  - name: quotes
    description: Everything about Quote collection
  - name: order_forms
    description: Everything about Order form collection
  - name: orders
    description: Everything about Order collection
  - name: usage_attribution_types
    description: Everything about Usage attribution type collection
externalDocs:
  description: Lago Github
  url: https://github.com/getlago
paths:
  /usage_attribution_types/{code}:
    parameters:
      - name: code
        in: path
        description: Code of the existing usage attribution type.
        required: true
        schema:
          type: string
          example: team
    get:
      tags:
        - usage_attribution_types
      summary: Retrieve a usage attribution type
      description: This endpoint retrieves an existing usage attribution type by its code.
      operationId: findUsageAttributionType
      responses:
        '200':
          description: Usage attribution type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageAttributionType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    UsageAttributionType:
      type: object
      required:
        - usage_attribution_type
      properties:
        usage_attribution_type:
          $ref: '#/components/schemas/UsageAttributionTypeObject'
    UsageAttributionTypeObject:
      type: object
      required:
        - lago_id
        - lago_organization_id
        - code
        - name
        - description
        - attribution_keys
        - role
        - lago_parent_id
        - parent_code
        - created_at
        - updated_at
      properties:
        lago_id:
          type: string
          format: uuid
          description: Unique identifier of the usage attribution type, created by Lago.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        lago_organization_id:
          type: string
          format: uuid
          description: Unique identifier of the organization, created by Lago.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        code:
          type: string
          description: >-
            Unique code used to identify the usage attribution type within the
            organization.
          example: team
        name:
          type:
            - string
            - 'null'
          description: Name of the usage attribution type.
          example: Team
        description:
          type:
            - string
            - 'null'
          description: Description of the usage attribution type.
          example: Team that consumed the usage.
        attribution_keys:
          type: array
          items:
            type: string
          description: >-
            Keys of the event properties that attribute usage to this type. A
            key belongs to a single usage attribution type of the organization.
          example:
            - team
            - team_id
        role:
          $ref: '#/components/schemas/UsageAttributionTypeRoleEnum'
        lago_parent_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Unique identifier of the parent usage attribution type, created by
            Lago. It is `null` when the type has no parent.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        parent_code:
          type:
            - string
            - 'null'
          description: >-
            Code of the parent usage attribution type. It is `null` when the
            type has no parent.
          example: department
        created_at:
          type: string
          format: date-time
          description: Creation date of the usage attribution type, in UTC.
          example: '2022-04-29T08:59:51Z'
        updated_at:
          type: string
          format: date-time
          description: Date of the last update of the usage attribution type, in UTC.
          example: '2022-04-29T08:59:51Z'
    ApiErrorUnauthorized:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
          format: int32
          example: 401
        error:
          type: string
          example: Unauthorized
    ApiErrorForbidden:
      type: object
      required:
        - status
        - error
        - code
      properties:
        status:
          type: integer
          format: int32
          example: 403
        error:
          type: string
          example: Forbidden
        code:
          type: string
          example: feature_unavailable
    ApiErrorNotFound:
      type: object
      required:
        - status
        - error
        - code
      properties:
        status:
          type: integer
          format: int32
          example: 404
        error:
          type: string
          example: Not Found
        code:
          type: string
          example: object_not_found
    UsageAttributionTypeRoleEnum:
      type: string
      description: >-
        Role of the usage attribution type:

        - `hierarchical`: the type can have a parent and children, and forms a
        level of the account tree.

        - `flat`: the type stands on its own. It cannot have a parent or
        children.
      enum:
        - hierarchical
        - flat
      example: hierarchical
  responses:
    Unauthorized:
      description: Unauthorized error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorUnauthorized'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorForbidden'
    NotFound:
      description: Not Found error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorNotFound'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.